Skip to content

Commit 1d79082

Browse files
ticpuk8s-infra-cherrypick-robot
authored andcommitted
core/mount/manager: fix bind mount missing rbind option
The bind mount created for temporary activations was missing the Options field, causing mount to fail with "no such device" because the MS_BIND flag wasn't being set. Fixes #12549 Signed-off-by: Jérôme Poulin <[email protected]>
1 parent 3d509bc commit 1d79082

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

core/mount/manager/manager.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -430,9 +430,9 @@ func (mm *mountManager) Activate(ctx context.Context, name string, mounts []moun
430430
// TODO: Add config for whether to add the bind mount?
431431
if config.Temporary && firstSystemMount > 0 {
432432
mounts = append(mounts, mount.Mount{
433-
Type: "bind",
434-
Source: mounted[firstSystemMount-1].MountPoint,
435-
// TODO : Configurable bind mount options?
433+
Type: "bind",
434+
Source: mounted[firstSystemMount-1].MountPoint,
435+
Options: []string{"rbind"},
436436
})
437437
}
438438

0 commit comments

Comments
 (0)