From 885f47ec51e298cc098abd9fb22370179c7dd5b6 Mon Sep 17 00:00:00 2001 From: Thomas Parrott Date: Mon, 24 Jun 2024 15:21:43 +0100 Subject: [PATCH] lxd/instance/drivers/driver/lxc: Add support for disabling idmapped mounts via LXD_IDMAPPED_MOUNTS_DISABLE env var Signed-off-by: Thomas Parrott --- lxd/instance/drivers/driver_lxc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lxd/instance/drivers/driver_lxc.go b/lxd/instance/drivers/driver_lxc.go index 1df713fc16cf..d76a7d672b59 100644 --- a/lxd/instance/drivers/driver_lxc.go +++ b/lxd/instance/drivers/driver_lxc.go @@ -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 }