From 1fca76c8d39860c27d8c541a8fe300b427dfb129 Mon Sep 17 00:00:00 2001 From: cloudnull Date: Wed, 13 Feb 2019 14:56:52 -0600 Subject: [PATCH] Allow containers to remount volumes when needed This change allows containers to mount and remount volumes as needed. Before this change, when users had a mounted volume within a container, like in the case of services using NFS or RBD, it was not possible to remount a volume within the container runtime. While a user could unmount and mount a volume or restart a container, these actions results in service interuption where as a remount would simply reload the mounted volume without service interuption. Change-Id: Iff588cad451320167b92f2d79e4693a1037be966 Closes-Bug: #1814200 Signed-off-by: cloudnull --- templates/lxc-openstack.apparmor.j2 | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/lxc-openstack.apparmor.j2 b/templates/lxc-openstack.apparmor.j2 index bda9eab5..f78e67fa 100644 --- a/templates/lxc-openstack.apparmor.j2 +++ b/templates/lxc-openstack.apparmor.j2 @@ -24,5 +24,6 @@ profile lxc-openstack flags=(attach_disconnected,mediate_deleted) { mount fstype=cgroup2 -> /sys/fs/cgroup/**, mount fstype=proc -> {{ lxc_container_cache_path }}/**, mount fstype=sysfs -> {{ lxc_container_cache_path }}/**, + mount options=(rw,remount), mount options=(rw,bind) {{ lxc_container_cache_path }}/**/dev/shm/ -> {{ lxc_container_cache_path }}/**/run/shm/, }