Clean up error handling for the sandbox overlay
This commit is contained in:
@@ -219,7 +219,7 @@ func (ms *MinionServer) launchHyperkubeServer(server string, args []string, logF
|
|||||||
}
|
}
|
||||||
pwd, err := os.Getwd()
|
pwd, err := os.Getwd()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("Cannot get current directory: %v", err)
|
panic(fmt.Errorf("Cannot get current directory: %v", err))
|
||||||
}
|
}
|
||||||
kmEnv = append(kmEnv, fmt.Sprintf("%s:%s", e, path.Join(pwd, "bin")))
|
kmEnv = append(kmEnv, fmt.Sprintf("%s:%s", e, path.Join(pwd, "bin")))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -366,7 +366,7 @@ func (s *SchedulerServer) prepareExecutorInfo(hks hyperkube.Interface) (*mesos.E
|
|||||||
|
|
||||||
if s.sandboxOverlay != "" {
|
if s.sandboxOverlay != "" {
|
||||||
if _, err := os.Stat(s.sandboxOverlay); os.IsNotExist(err) {
|
if _, err := os.Stat(s.sandboxOverlay); os.IsNotExist(err) {
|
||||||
log.Fatalf("Sandbox overlay archive not found: %s", s.sandboxOverlay)
|
return nil, nil, fmt.Errorf("Sandbox overlay archive not found: %s", s.sandboxOverlay)
|
||||||
}
|
}
|
||||||
uri, _ := s.serveFrameworkArtifact(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)})
|
ci.Uris = append(ci.Uris, &mesos.CommandInfo_URI{Value: proto.String(uri), Executable: proto.Bool(false), Extract: proto.Bool(true)})
|
||||||
|
|||||||
Reference in New Issue
Block a user