summaryrefslogtreecommitdiffhomepage
path: root/runsc/cmd/restore.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2019-06-12 16:49:53 +0000
committergVisor bot <gvisor-bot@google.com>2019-06-12 16:49:53 +0000
commit095902985ff143b8ec34691c30e735f62521ee4c (patch)
treecd39d992f8cd96efe5fd9a15755ae458c3e727c5 /runsc/cmd/restore.go
parent19b473c6e2fe412c0e96c8b9e4672922da19471a (diff)
parent356d1be140bb51f2a50d2c7fe24242cbfeedc9d6 (diff)
Merge 356d1be1 (automated)
Diffstat (limited to 'runsc/cmd/restore.go')
-rw-r--r--runsc/cmd/restore.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/runsc/cmd/restore.go b/runsc/cmd/restore.go
index 3ab2f5676..a78a0dce6 100644
--- a/runsc/cmd/restore.go
+++ b/runsc/cmd/restore.go
@@ -80,25 +80,29 @@ func (r *Restore) Execute(_ context.Context, f *flag.FlagSet, args ...interface{
conf := args[0].(*boot.Config)
waitStatus := args[1].(*syscall.WaitStatus)
+ if conf.Rootless {
+ return Errorf("Rootless mode not supported with %q", r.Name())
+ }
+
bundleDir := r.bundleDir
if bundleDir == "" {
bundleDir = getwdOrDie()
}
spec, err := specutils.ReadSpec(bundleDir)
if err != nil {
- Fatalf("reading spec: %v", err)
+ return Errorf("reading spec: %v", err)
}
specutils.LogSpec(spec)
if r.imagePath == "" {
- Fatalf("image-path flag must be provided")
+ return Errorf("image-path flag must be provided")
}
conf.RestoreFile = filepath.Join(r.imagePath, checkpointFileName)
ws, err := container.Run(id, spec, conf, bundleDir, r.consoleSocket, r.pidFile, r.userLog, r.detach)
if err != nil {
- Fatalf("running container: %v", err)
+ return Errorf("running container: %v", err)
}
*waitStatus = ws