Skip to content

Commit

Permalink
lxd/instance/drivers/driver/lxc: Add support for disabling idmapped m…
Browse files Browse the repository at this point in the history
…ounts via LXD_IDMAPPED_MOUNTS_DISABLE env var

Signed-off-by: Thomas Parrott <[email protected]>
  • Loading branch information
tomponline committed Jun 24, 2024
1 parent 66c5925 commit 885f47e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lxd/instance/drivers/driver_lxc.go
Original file line number Diff line number Diff line change
Expand Up @@ -1299,7 +1299,7 @@ func (d *lxc) IdmappedStorage(path string) idmap.IdmapStorageType {
mode = idmap.IdmapStorageShiftfs
}

if !d.state.OS.LXCFeatures["idmapped_mounts_v2"] {
if !d.state.OS.LXCFeatures["idmapped_mounts_v2"] || shared.IsTrue(os.Getenv("LXD_IDMAPPED_MOUNTS_DISABLE")) {
return mode
}

Expand Down

0 comments on commit 885f47e

Please sign in to comment.