From f5d46996139593f6249138bcc9f09b6120f0034a Mon Sep 17 00:00:00 2001 From: whoami-rajat Date: Wed, 1 Apr 2020 14:18:44 +0000 Subject: Add lock per share for cinder nfs mount/umount With cinder configured as glance store and nfs as cinder backend, if we create multiple images concurrently into the same share, there might be race conditions. This patch ensures a lock per export to avoid the race conditions. This patch also introduces a reference counting mechamism for unmounting which will unmount the share if no active thread/process is using it. Closes-Bug: #1870289 Change-Id: I9197f64e29a0ae2e0a58186f1a70aa134f7f1db6 --- etc/glance/rootwrap.d/glance_cinder_store.filters | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'etc') diff --git a/etc/glance/rootwrap.d/glance_cinder_store.filters b/etc/glance/rootwrap.d/glance_cinder_store.filters index 46c389b..9aaf8b4 100644 --- a/etc/glance/rootwrap.d/glance_cinder_store.filters +++ b/etc/glance/rootwrap.d/glance_cinder_store.filters @@ -10,3 +10,7 @@ disk_chown: RegExpFilter, chown, root, chown, \d+, /dev/(?!.*/\.\.).* # This line ties the superuser privs with the config files, context name, # and (implicitly) the actual python code invoked. privsep-rootwrap: RegExpFilter, privsep-helper, root, privsep-helper, --config-file, /etc/(?!\.\.).*, --privsep_context, os_brick.privileged.default, --privsep_sock_path, /tmp/.* + +chown: CommandFilter, chown, root +mount: CommandFilter, mount, root +umount: CommandFilter, umount, root \ No newline at end of file -- cgit v1.2.1