diff options
author | Fabricio Voznika <fvoznika@google.com> | 2019-05-02 17:16:30 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2019-05-02 17:17:39 -0700 |
commit | bbb65391143d48a4781e48d0875897a857a69d67 (patch) | |
tree | 7f5786f31ee7efe1cc749d73b6b7547759ebdd4b /runsc/sandbox | |
parent | 2c1c1c9917617ddac0042aa0e7ae14d5032100c5 (diff) |
Add [simple] network support to 'runsc do'
Sandbox always runsc with IP 192.168.10.2 and the peer
network adds 1 to the address (192.168.10.3). Sandbox
IP can be changed using --ip flag.
Here a few examples:
sudo runsc do curl www.google.com
sudo runsc do --ip=10.10.10.2 bash -c "echo 123 | netcat -l -p 8080"
PiperOrigin-RevId: 246421277
Change-Id: I7b3dce4af46a57300350dab41cb27e04e4b6e9da
Diffstat (limited to 'runsc/sandbox')
-rw-r--r-- | runsc/sandbox/sandbox.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runsc/sandbox/sandbox.go b/runsc/sandbox/sandbox.go index dac35ca0b..9d8cfa451 100644 --- a/runsc/sandbox/sandbox.go +++ b/runsc/sandbox/sandbox.go @@ -601,7 +601,7 @@ func (s *Sandbox) createSandboxProcess(spec *specs.Spec, conf *boot.Config, bund log.Debugf("Starting sandbox: %s %v", binPath, cmd.Args) log.Debugf("SysProcAttr: %+v", cmd.SysProcAttr) if err := specutils.StartInNS(cmd, nss); err != nil { - return err + return fmt.Errorf("Sandbox: %v", err) } s.child = true s.Pid = cmd.Process.Pid |