summaryrefslogtreecommitdiffhomepage
path: root/runsc/sandbox/sandbox.go
diff options
context:
space:
mode:
authorKevin Krakauer <krakauer@google.com>2018-06-22 14:30:33 -0700
committerShentubot <shentubot@google.com>2018-06-22 14:31:25 -0700
commit04bdcc7b65ac03eeca9b14608a12067e1205081b (patch)
treee88ce30df1c5b433f44a51e8cbb211f56f6306dc /runsc/sandbox/sandbox.go
parente0e640981282ece051c33700f4e272047fa4e5b6 (diff)
runsc: Enable waiting on individual containers within a sandbox.
PiperOrigin-RevId: 201742160 Change-Id: Ia9fa1442287c5f9e1196fb117c41536a80f6bb31
Diffstat (limited to 'runsc/sandbox/sandbox.go')
-rw-r--r--runsc/sandbox/sandbox.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/runsc/sandbox/sandbox.go b/runsc/sandbox/sandbox.go
index 870a0ccd3..ed2c40e57 100644
--- a/runsc/sandbox/sandbox.go
+++ b/runsc/sandbox/sandbox.go
@@ -99,7 +99,7 @@ func (s *Sandbox) StartRoot(spec *specs.Spec, conf *boot.Config) error {
// Send a message to the sandbox control server to start the root
// container.
- if err := conn.Call(boot.RootContainerStart, nil, nil); err != nil {
+ if err := conn.Call(boot.RootContainerStart, &s.ID, nil); err != nil {
return fmt.Errorf("error starting root container %v: %v", spec.Process.Args, err)
}
@@ -107,7 +107,7 @@ func (s *Sandbox) StartRoot(spec *specs.Spec, conf *boot.Config) error {
}
// Start starts running a non-root container inside the sandbox.
-func (s *Sandbox) Start(spec *specs.Spec, conf *boot.Config) error {
+func (s *Sandbox) Start(spec *specs.Spec, conf *boot.Config, cid string) error {
log.Debugf("Start non-root container sandbox %q, pid: %d", s.ID, s.Pid)
conn, err := s.connect()
if err != nil {
@@ -118,6 +118,7 @@ func (s *Sandbox) Start(spec *specs.Spec, conf *boot.Config) error {
args := boot.StartArgs{
Spec: spec,
Conf: conf,
+ CID: cid,
}
if err := conn.Call(boot.ContainerStart, args, nil); err != nil {
return fmt.Errorf("error starting non-root container %v: %v", spec.Process.Args, err)