bump containerd/go-runc e029b79d8cda8374981c64eba71f28ec38e5526f
- github.com/containerd/go-runc 7d11b49dc0...e029b79d8c
- containerd/go-runc#52 Fix Method of judging command execution failure
- fixes "init.pid: no such file or directory: unknown" errors
- containerd/go-runc#54 avoid setting NOTIFY_SOCKET from calling process
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
parent
12f9887c8e
commit
1617be92d3
3 changed files with 27 additions and 4 deletions
|
@ -122,7 +122,7 @@ github.com/containerd/fifo a9fb20d87448d386e6d50b1f2e1f
|
|||
github.com/containerd/continuity aaeac12a7ffcd198ae25440a9dff125c2e2703a7
|
||||
github.com/containerd/cgroups 4994991857f9b0ae8dc439551e8bebdbb4bf66c1
|
||||
github.com/containerd/console 0650fd9eeb50bab4fc99dceb9f2e14cf58f36e7f
|
||||
github.com/containerd/go-runc 7d11b49dc0769f6dbb0d1b19f3d48524d1bad9ad
|
||||
github.com/containerd/go-runc e029b79d8cda8374981c64eba71f28ec38e5526f
|
||||
github.com/containerd/typeurl 2a93cfde8c20b23de8eb84a5adbc234ddf7a9e8d
|
||||
github.com/containerd/ttrpc 92c8520ef9f86600c650dd540266a007bf03670f
|
||||
github.com/gogo/googleapis d31c731455cb061f42baff3bda55bad0118b126b # v1.2.0
|
||||
|
|
17
vendor/github.com/containerd/go-runc/command_linux.go
generated
vendored
17
vendor/github.com/containerd/go-runc/command_linux.go
generated
vendored
|
@ -20,6 +20,7 @@ import (
|
|||
"context"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
|
@ -32,10 +33,24 @@ func (r *Runc) command(context context.Context, args ...string) *exec.Cmd {
|
|||
cmd.SysProcAttr = &syscall.SysProcAttr{
|
||||
Setpgid: r.Setpgid,
|
||||
}
|
||||
cmd.Env = os.Environ()
|
||||
cmd.Env = filterEnv(os.Environ(), "NOTIFY_SOCKET") // NOTIFY_SOCKET introduces a special behavior in runc but should only be set if invoked from systemd
|
||||
if r.PdeathSignal != 0 {
|
||||
cmd.SysProcAttr.Pdeathsig = r.PdeathSignal
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
func filterEnv(in []string, names ...string) []string {
|
||||
out := make([]string, 0, len(in))
|
||||
loop0:
|
||||
for _, v := range in {
|
||||
for _, k := range names {
|
||||
if strings.HasPrefix(v, k+"=") {
|
||||
continue loop0
|
||||
}
|
||||
}
|
||||
out = append(out, v)
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
|
12
vendor/github.com/containerd/go-runc/runc.go
generated
vendored
12
vendor/github.com/containerd/go-runc/runc.go
generated
vendored
|
@ -275,7 +275,11 @@ func (r *Runc) Run(context context.Context, id, bundle string, opts *CreateOpts)
|
|||
if err != nil {
|
||||
return -1, err
|
||||
}
|
||||
return Monitor.Wait(cmd, ec)
|
||||
status, err := Monitor.Wait(cmd, ec)
|
||||
if err == nil && status != 0 {
|
||||
err = fmt.Errorf("%s did not terminate sucessfully", cmd.Args[0])
|
||||
}
|
||||
return status, err
|
||||
}
|
||||
|
||||
type DeleteOpts struct {
|
||||
|
@ -570,7 +574,11 @@ func (r *Runc) Restore(context context.Context, id, bundle string, opts *Restore
|
|||
}
|
||||
}
|
||||
}
|
||||
return Monitor.Wait(cmd, ec)
|
||||
status, err := Monitor.Wait(cmd, ec)
|
||||
if err == nil && status != 0 {
|
||||
err = fmt.Errorf("%s did not terminate sucessfully", cmd.Args[0])
|
||||
}
|
||||
return status, err
|
||||
}
|
||||
|
||||
// Update updates the current container with the provided resource spec
|
||||
|
|
Loading…
Add table
Reference in a new issue