summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorwhoami-rajat <rajatdhasmana@gmail.com>2020-04-01 14:18:44 +0000
committerRajat Dhasmana <rajatdhasmana@gmail.com>2020-05-01 11:35:01 +0000
commitf5d46996139593f6249138bcc9f09b6120f0034a (patch)
treecf51b33ee3f7505666c3a4f1d2297270080877d8 /etc
parent2aa892d4dfb1cf8beb5f9bdba4e468486d4bae44 (diff)
downloadglance_store-f5d46996139593f6249138bcc9f09b6120f0034a.tar.gz
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
Diffstat (limited to 'etc')
-rw-r--r--etc/glance/rootwrap.d/glance_cinder_store.filters4
1 files changed, 4 insertions, 0 deletions
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