+++ This bug was initially created as a clone of Bug #1555188 +++ A synchronization lock was added to fix a problem that allowed multiple redundant entries in the image volume cache [1],[2]. [1] https://bugs.launchpad.net/cinder/+bug/1649636 [2] https://review.openstack.org/446590 Unfortunately, the scope of the lock is too broad and impacts performance in a couple of scenarios. 1) When the cache is not enabled, simultaneous attempts to download the image from glance are serialized. 2) Even when the volume image is cached, simultaneous requests to create a volume from the image are serialized. The scope of the lock needs to be reduced to only serialize the portion of the process that results in an entry being added to the cache.
Patch has merged upstream, and needs to be backported to OSP.
The upstream patch merged in time to be included in the latest OSP-13 puddle.
Verified on: openstack-cinder-12.0.1-0.20180418194613.c476898.el7ost.noarch With-> image_volume_cache_enabled = false Uploaded cloud image, simultaneously created two volumes from image, looking good, both volumes created in parallel, as expected. Now with image cache enable Set image_volume_cache_enabled = true cinder_internal_tenant_project_id = ea6a84721c25439bbee43448e658942b cinder_internal_tenant_user_id = 9206a87622184de58a7c00d32eae7bb3 restart dockers Create 3 volumes from same image. See the same cached image reference being reused. Temporary image fdc45365-c737-4dd4-bc91-006b 227fa6ef is fetched for user 9206a87622184de58a7c00d32eae7bb3. fetch /usr/lib/python2.7/site-packages/cinder/image/image_utils.py:763 Looking fine.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2018:2086