Add an option to prevent putting the shim in a new mount namespace
This is needed for users on kernel older than 3.18 so they can avoid EBUSY errors when trying to unlink, rename or remove a mountpoint that is present in a shim namespace. Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
@@ -73,10 +73,10 @@ type bundle struct {
|
||||
type shimOpt func(*bundle, string, *runcopts.RuncOptions) (client.Config, client.ClientOpt)
|
||||
|
||||
// ShimRemote is a shimOpt for connecting and starting a remote shim
|
||||
func ShimRemote(shim, daemonAddress, cgroup string, debug bool, exitHandler func()) shimOpt {
|
||||
func ShimRemote(shim, daemonAddress, cgroup string, nonewns, debug bool, exitHandler func()) shimOpt {
|
||||
return func(b *bundle, ns string, ropts *runcopts.RuncOptions) (client.Config, client.ClientOpt) {
|
||||
return b.shimConfig(ns, ropts),
|
||||
client.WithStart(shim, b.shimAddress(ns), daemonAddress, cgroup, debug, exitHandler)
|
||||
client.WithStart(shim, b.shimAddress(ns), daemonAddress, cgroup, nonewns, debug, exitHandler)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user