From bbb65391143d48a4781e48d0875897a857a69d67 Mon Sep 17 00:00:00 2001 From: Fabricio Voznika Date: Thu, 2 May 2019 17:16:30 -0700 Subject: 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 --- runsc/sandbox/sandbox.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runsc/sandbox') 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 -- cgit v1.2.3