From b9be248dc471fde4934a15460444def8809fc662 Mon Sep 17 00:00:00 2001 From: James Page Date: Mon, 24 Oct 2016 19:32:52 +0000 Subject: [PATCH] Revert "Disable ext4 userns when running in a container" This reverts commit c0d0fc50418867e702430f4d655da89f794e1f73. Change-Id: I995a77ecd8b73dc1577325dd05ccb7198df8e658 --- hooks/lxd_utils.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hooks/lxd_utils.py b/hooks/lxd_utils.py index 7cfc121..a66d3db 100644 --- a/hooks/lxd_utils.py +++ b/hooks/lxd_utils.py @@ -425,9 +425,7 @@ def configure_lxd_host(): if ubuntu_release >= 'xenial': modprobe('netlink_diag') - # /sys is read-only when using a container - container_check = check_output(['systemd-detect-virt']).strip() - if (container_check != 'lxc' and os.path.exists(EXT4_USERNS_MOUNTS)): + if os.path.exists(EXT4_USERNS_MOUNTS): with open(EXT4_USERNS_MOUNTS, 'w') as userns_mounts: userns_mounts.write( 'Y\n' if config('enable-ext4-userns') else 'N\n'