Fix incorrect reference to the gRPC runtime name as a binary
Until we have a way to preserve the initial command used to start the container, we have to default to the default `runc` found on the $PATH. This code after the last refactor of shim/API is incorrectly using the gRPC object reference of the v1 runtime as a binary name which causes os.Exec() errors. Signed-off-by: Phil Estes <estesp@gmail.com> Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
This commit is contained in:
parent
1f478be14d
commit
79e6a93624
@ -434,7 +434,9 @@ func (r *Runtime) getRuntime(ctx context.Context, ns, id string) (*runc.Runc, er
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return &runc.Runc{
|
return &runc.Runc{
|
||||||
Command: c.Runtime.Name,
|
// TODO: until we have a way to store/retrieve the original command
|
||||||
|
// we can only rely on runc from the default $PATH
|
||||||
|
Command: runc.DefaultCommand,
|
||||||
LogFormat: runc.JSON,
|
LogFormat: runc.JSON,
|
||||||
PdeathSignal: unix.SIGKILL,
|
PdeathSignal: unix.SIGKILL,
|
||||||
Root: filepath.Join(client.RuncRoot, ns),
|
Root: filepath.Join(client.RuncRoot, ns),
|
||||||
|
Loading…
Reference in New Issue
Block a user