]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
NetApp: Cleanup if E-Series volume create fails
authorErik Johannes <erik.johannes@netapp.com>
Mon, 5 Oct 2015 21:24:55 +0000 (14:24 -0700)
committerErik Johannes <erik.johannes@netapp.com>
Tue, 20 Oct 2015 15:53:22 +0000 (15:53 +0000)
commita4bcb1e11bf48207c81e42ba3b9c96f5e13d3ef6
treeaf140df8a32a8e0c42c30dcd759b9d9da1cc5ed2
parente9f3351b5c0344f5dfbaaf6cc50f4e1218aadf29
NetApp: Cleanup if E-Series volume create fails

The creation of a volume may fail in such a manner
that a volume in a partial state has been created.
When Openstack comes back re-attempting the creation
operation it fails because the partial volume with
the name already exists.

Solution: When there is a failure creating a volume,
check if a partial volume was created and delete it
so any retry will be successful and the storage device
does not contain any dead volumes.

Closes-Bug: 1506940
Change-Id: Id93527a4cab314f27a13d8c08b772fed538d1092
cinder/tests/unit/volume/drivers/netapp/eseries/test_library.py
cinder/volume/drivers/netapp/eseries/library.py