Exit scheduler if sandbox overlay does not exist

pull/6/head
Dr. Stefan Schimanski 2015-11-03 11:25:56 +01:00
parent 1cebf2f014
commit 8fb77ce13e
1 changed files with 3 additions and 0 deletions

View File

@ -362,6 +362,9 @@ func (s *SchedulerServer) prepareExecutorInfo(hks hyperkube.Interface) (*mesos.E
}
if s.SandboxOverlay != "" {
if _, err := os.Stat(s.SandboxOverlay); os.IsNotExist(err) {
log.Fatalf("Sandbox overlay archive not found: %s", s.SandboxOverlay)
}
uri, _ := s.serveFrameworkArtifact(s.SandboxOverlay)
ci.Uris = append(ci.Uris, &mesos.CommandInfo_URI{Value: proto.String(uri), Executable: proto.Bool(false), Extract: proto.Bool(true)})
}