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
(cherry picked from commit f5d46996139593f6249138bcc9f09b6120f0034a)
Reviewed: https:/ /review. opendev. org/726914 /git.openstack. org/cgit/ openstack/ glance_ store/commit/ ?id=b37e7f2f3c3 faf3b6e4d11eeb3 e866211e13b85e
Committed: https:/
Submitter: Zuul
Branch: stable/ussuri
commit b37e7f2f3c3faf3 b6e4d11eeb3e866 211e13b85e
Author: whoami-rajat <email address hidden>
Date: Wed Apr 1 14:18:44 2020 +0000
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: I9197f64e29a0ae 2e0a58186f1a70a a134f7f1db6 6249138bcc9f09b 6120f0034a)
(cherry picked from commit f5d46996139593f