]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
VMware: Handle concurrent inventory folder create
authorVipin Balachandran <vbala@vmware.com>
Thu, 26 Mar 2015 13:10:27 +0000 (06:10 -0700)
committerVipin Balachandran <vbala@vmware.com>
Thu, 23 Apr 2015 08:49:20 +0000 (01:49 -0700)
commit2a20781029f9f978269bba508a6d6873917839d8
treeb359fe3712802e14d89a998cedf63199086d4b35
parent8d27e2939617053eb5c26e9479140578ef257737
VMware: Handle concurrent inventory folder create

Cinder volumes are organized under vCenter inventory folder
with name given by config option vmware_volume_folder. During
volume creation, this folder is created only if it doesn't
exist. Concurrent volume create operations when there is no
such folder can result in a race condition-- some of the
create operations will fail due to already existing folder.
This patch fix this by ignoring the exception and returning a
reference to the existing folder.

Change-Id: Ic9371957bb76a032985363880fbebda523574305
Closes-Bug: #1436844
cinder/tests/unit/test_vmware_volumeops.py
cinder/volume/drivers/vmware/volumeops.py