summaryrefslogtreecommitdiffhomepage
path: root/runsc/cmd
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2019-06-18 21:54:36 +0000
committergVisor bot <gvisor-bot@google.com>2019-06-18 21:54:36 +0000
commitdfbde70e972d909e0c10d4b85841b908325095be (patch)
treec2962c7a40a06ccd80128a185c6eca9beac288c8 /runsc/cmd
parent14776d859bc4fc788d0fb6d4def2dd9ec6dcf5e3 (diff)
parentbdb19b82ef2aa1638d98da4b1c55ae7928437f55 (diff)
Merge bdb19b82 (automated)
Diffstat (limited to 'runsc/cmd')
-rw-r--r--runsc/cmd/checkpoint.go7
-rw-r--r--runsc/cmd/create.go10
-rw-r--r--runsc/cmd/do.go7
-rw-r--r--runsc/cmd/restore.go10
-rw-r--r--runsc/cmd/run.go10
5 files changed, 39 insertions, 5 deletions
diff --git a/runsc/cmd/checkpoint.go b/runsc/cmd/checkpoint.go
index 7298a0828..d8b3a8573 100644
--- a/runsc/cmd/checkpoint.go
+++ b/runsc/cmd/checkpoint.go
@@ -133,7 +133,12 @@ func (c *Checkpoint) Execute(_ context.Context, f *flag.FlagSet, args ...interfa
Fatalf("destroying container: %v", err)
}
- cont, err = container.Create(id, spec, conf, bundleDir, "", "", "")
+ contArgs := container.Args{
+ ID: id,
+ Spec: spec,
+ BundleDir: bundleDir,
+ }
+ cont, err = container.New(conf, contArgs)
if err != nil {
Fatalf("restoring container: %v", err)
}
diff --git a/runsc/cmd/create.go b/runsc/cmd/create.go
index 42663c05c..a4e3071b3 100644
--- a/runsc/cmd/create.go
+++ b/runsc/cmd/create.go
@@ -99,7 +99,15 @@ func (c *Create) Execute(_ context.Context, f *flag.FlagSet, args ...interface{}
// Create the container. A new sandbox will be created for the
// container unless the metadata specifies that it should be run in an
// existing container.
- if _, err := container.Create(id, spec, conf, bundleDir, c.consoleSocket, c.pidFile, c.userLog); err != nil {
+ contArgs := container.Args{
+ ID: id,
+ Spec: spec,
+ BundleDir: bundleDir,
+ ConsoleSocket: c.consoleSocket,
+ PIDFile: c.pidFile,
+ UserLog: c.userLog,
+ }
+ if _, err := container.New(conf, contArgs); err != nil {
return Errorf("creating container: %v", err)
}
return subcommands.ExitSuccess
diff --git a/runsc/cmd/do.go b/runsc/cmd/do.go
index 876e674c4..16d135b51 100644
--- a/runsc/cmd/do.go
+++ b/runsc/cmd/do.go
@@ -164,7 +164,12 @@ func (c *Do) Execute(_ context.Context, f *flag.FlagSet, args ...interface{}) su
return Errorf("Error write spec: %v", err)
}
- ws, err := container.Run(cid, spec, conf, tmpDir, "", "", "", false)
+ runArgs := container.Args{
+ ID: cid,
+ Spec: spec,
+ BundleDir: tmpDir,
+ }
+ ws, err := container.Run(conf, runArgs, false)
if err != nil {
return Errorf("running container: %v", err)
}
diff --git a/runsc/cmd/restore.go b/runsc/cmd/restore.go
index a5124697d..e18910325 100644
--- a/runsc/cmd/restore.go
+++ b/runsc/cmd/restore.go
@@ -100,7 +100,15 @@ func (r *Restore) Execute(_ context.Context, f *flag.FlagSet, args ...interface{
conf.RestoreFile = filepath.Join(r.imagePath, checkpointFileName)
- ws, err := container.Run(id, spec, conf, bundleDir, r.consoleSocket, r.pidFile, r.userLog, r.detach)
+ runArgs := container.Args{
+ ID: id,
+ Spec: spec,
+ BundleDir: bundleDir,
+ ConsoleSocket: r.consoleSocket,
+ PIDFile: r.pidFile,
+ UserLog: r.userLog,
+ }
+ ws, err := container.Run(conf, runArgs, r.detach)
if err != nil {
return Errorf("running container: %v", err)
}
diff --git a/runsc/cmd/run.go b/runsc/cmd/run.go
index c1734741d..ee14dc3d9 100644
--- a/runsc/cmd/run.go
+++ b/runsc/cmd/run.go
@@ -81,7 +81,15 @@ func (r *Run) Execute(_ context.Context, f *flag.FlagSet, args ...interface{}) s
}
specutils.LogSpec(spec)
- ws, err := container.Run(id, spec, conf, bundleDir, r.consoleSocket, r.pidFile, r.userLog, r.detach)
+ runArgs := container.Args{
+ ID: id,
+ Spec: spec,
+ BundleDir: bundleDir,
+ ConsoleSocket: r.consoleSocket,
+ PIDFile: r.pidFile,
+ UserLog: r.userLog,
+ }
+ ws, err := container.Run(conf, runArgs, r.detach)
if err != nil {
return Errorf("running container: %v", err)
}