diff options
author | Kevin Krakauer <krakauer@google.com> | 2018-09-18 13:21:13 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-09-18 13:22:26 -0700 |
commit | 7e00f3705480313a63c9db7d087db711abc720bc (patch) | |
tree | 29e658ff1ef4a3e13296d0dde861e56a79cf9861 /runsc/boot/controller.go | |
parent | ed08597d121a624592e5517a28ae40ddbcc59cb0 (diff) |
Automated rollback of changelist 213307171
PiperOrigin-RevId: 213504354
Change-Id: Iadd42f0ca4b7e7a9eae780bee9900c7233fb4f3f
Diffstat (limited to 'runsc/boot/controller.go')
-rw-r--r-- | runsc/boot/controller.go | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/runsc/boot/controller.go b/runsc/boot/controller.go index dc9359092..f5b0d371c 100644 --- a/runsc/boot/controller.go +++ b/runsc/boot/controller.go @@ -186,10 +186,8 @@ type StartArgs struct { // CID is the ID of the container to start. CID string - // FilePayload contains, in order: - // * stdin, stdout, and stderr. - // * the file descriptor over which the sandbox will - // request files from its root filesystem. + // FilePayload contains the file descriptor over which the sandbox will + // request files from its root filesystem. urpc.FilePayload } @@ -217,8 +215,8 @@ func (cm *containerManager) Start(args *StartArgs, _ *struct{}) error { if path.Clean(args.CID) != args.CID { return fmt.Errorf("container ID shouldn't contain directory traversals such as \"..\": %q", args.CID) } - if len(args.FilePayload.Files) < 4 { - return fmt.Errorf("start arguments must contain stdin, stderr, and stdout followed by at least one file for the container root gofer") + if len(args.FilePayload.Files) == 0 { + return fmt.Errorf("start arguments must contain at least one file for the container root") } err := cm.l.startContainer(cm.l.k, args.Spec, args.Conf, args.CID, args.FilePayload.Files) @@ -320,7 +318,7 @@ func (cm *containerManager) Restore(o *RestoreOpts, _ *struct{}) error { cm.l.k = k // Set up the restore environment. - fds := &fdDispenser{fds: cm.l.goferFDs} + fds := &fdDispenser{fds: cm.l.ioFDs} renv, err := createRestoreEnvironment(cm.l.spec, cm.l.conf, fds) if err != nil { return fmt.Errorf("error creating RestoreEnvironment: %v", err) |