]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Fixes race condition in LVMVolumeDriver create_cloned_volume method
authorRongze Zhu <rongze@unitedstack.com>
Wed, 17 Jul 2013 10:15:04 +0000 (18:15 +0800)
committerRongze Zhu <rongze@unitedstack.com>
Wed, 17 Jul 2013 10:15:04 +0000 (18:15 +0800)
commit201890c17e0f29d1ec8e5040206ecd1be09e22f7
tree0cdeb540e61e90847a4dc762bb95e10019174281
parente9b5abbaf67c8109d4548753bfd87480afe4a0a7
Fixes race condition in LVMVolumeDriver create_cloned_volume method

When we create a clone volume, LVMVolumeDriver will firstly create a temp
snapshot for copying, the temp snapshot name is
"clone-snap-%s" % source_volume['id']. When we create multiple clone volumes
of the same volume simultaneously, which would trigger the race issuse.

I changes the temp snapshot name template to "clone-snap-%s" % volume['id'],
so temp snapshot name will be unique.

Fixes bug #1202139

Change-Id: I3a4f2585ea9e6f70b6f6f9889e900f19559b8176
cinder/volume/drivers/lvm.py