summaryrefslogtreecommitdiffhomepage
path: root/runsc/sandbox
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2018-09-27 10:25:19 -0700
committerShentubot <shentubot@google.com>2018-09-27 10:26:34 -0700
commitb514ab05897bca53c1d4f71c912f2977b3134daf (patch)
treefd900cccf6d4f8d9fe9a54ec4ea1e8de13df1bb8 /runsc/sandbox
parent6910ff36434f4bc5aa8c6b3094b617c7c92a9803 (diff)
Refactor 'runsc boot' to take container ID as argument
This makes the flow slightly simpler (no need to call Loader.SetRootContainer). And this is required change to tag tasks with container ID inside the Sentry. PiperOrigin-RevId: 214795210 Change-Id: I6ff4af12e73bb07157f7058bb15fd5bb88760884
Diffstat (limited to 'runsc/sandbox')
-rw-r--r--runsc/sandbox/sandbox.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/runsc/sandbox/sandbox.go b/runsc/sandbox/sandbox.go
index 67244c725..c3d90d5f4 100644
--- a/runsc/sandbox/sandbox.go
+++ b/runsc/sandbox/sandbox.go
@@ -460,6 +460,9 @@ func (s *Sandbox) createSandboxProcess(spec *specs.Spec, conf *boot.Config, bund
}
}
+ // Add container as the last argument.
+ cmd.Args = append(cmd.Args, s.ID)
+
// Log the fds we are donating to the sandbox process.
for i, f := range cmd.ExtraFiles {
log.Debugf("Donating FD %d: %q", i+3, f.Name())