runsc: Don't create __runsc_containers__ unless we are in multi-container mode.
PiperOrigin-RevId: 213715511 Change-Id: I3e41b583c6138edbdeba036dfb9df4864134fc12
This commit is contained in:
parent
2e497de2d9
commit
2ad3228cd0
|
@ -84,12 +84,14 @@ func (f *fdDispenser) empty() bool {
|
||||||
// and all mounts. 'rootCtx' is used to walk directories to find mount points.
|
// and all mounts. 'rootCtx' is used to walk directories to find mount points.
|
||||||
func createMountNamespace(userCtx context.Context, rootCtx context.Context, spec *specs.Spec, conf *Config, ioFDs []int) (*fs.MountNamespace, error) {
|
func createMountNamespace(userCtx context.Context, rootCtx context.Context, spec *specs.Spec, conf *Config, ioFDs []int) (*fs.MountNamespace, error) {
|
||||||
mounts := compileMounts(spec)
|
mounts := compileMounts(spec)
|
||||||
// Create a tmpfs mount where we create and mount a root filesystem for
|
if conf.MultiContainer {
|
||||||
// each child container.
|
// Create a tmpfs mount where we create and mount a root filesystem for
|
||||||
mounts = append(mounts, specs.Mount{
|
// each child container.
|
||||||
Type: tmpfs,
|
mounts = append(mounts, specs.Mount{
|
||||||
Destination: childContainersDir,
|
Type: tmpfs,
|
||||||
})
|
Destination: childContainersDir,
|
||||||
|
})
|
||||||
|
}
|
||||||
fds := &fdDispenser{fds: ioFDs}
|
fds := &fdDispenser{fds: ioFDs}
|
||||||
rootInode, err := createRootMount(rootCtx, spec, conf, fds, mounts)
|
rootInode, err := createRootMount(rootCtx, spec, conf, fds, mounts)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue