diff options
author | Justine Olshan <justineolshan@google.com> | 2018-07-18 16:57:29 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-07-18 16:58:30 -0700 |
commit | c05660373e8bda36ddf5181220c76f4327f2abc6 (patch) | |
tree | 019da46831903e23e9a2283e127835659dcadbfb /runsc/cmd/create.go | |
parent | e5d8f99c6071c09aa7bca4e79d28b26f95dc7716 (diff) |
Moved restore code out of create and made to be called after create.
Docker expects containers to be created before they are restored.
However, gVisor restoring requires specificactions regarding the kernel
and the file system. These actions were originally in booting the sandbox.
Now setting up the file system is deferred until a call to a call to
runsc start. In the restore case, the kernel is destroyed and a new kernel
is created in the same process, as we need the same process for Docker.
These changes required careful execution of concurrent processes which
required the use of a channel.
Full docker integration still needs the ability to restore into the same
container.
PiperOrigin-RevId: 205161441
Change-Id: Ie1d2304ead7e06855319d5dc310678f701bd099f
Diffstat (limited to 'runsc/cmd/create.go')
-rw-r--r-- | runsc/cmd/create.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runsc/cmd/create.go b/runsc/cmd/create.go index 5a887c73c..94a889077 100644 --- a/runsc/cmd/create.go +++ b/runsc/cmd/create.go @@ -87,7 +87,7 @@ 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, ""); err != nil { + if _, err := container.Create(id, spec, conf, bundleDir, c.consoleSocket, c.pidFile); err != nil { Fatalf("error creating container: %v", err) } return subcommands.ExitSuccess |