mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 21:53:52 +00:00
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()
|
||||
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")))
|
||||
}
|
||||
|
@@ -366,7 +366,7 @@ 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)
|
||||
return nil, nil, fmt.Errorf("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)})
|
||||
|
Reference in New Issue
Block a user