]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Fix concurrent attaches on HNAS iSCSI driver
authorErlon R. Cruz <erlon.cruz@fit-tecnologia.org.br>
Fri, 10 Jul 2015 18:36:22 +0000 (15:36 -0300)
committerErlon R. Cruz <erlon.cruz@fit-tecnologia.org.br>
Wed, 29 Jul 2015 19:33:19 +0000 (16:33 -0300)
commita95fef70b407a400c27195bd1cfbf09858511e9f
tree5db32aac7a28f5a9fd98774e3534b468c5b49abc
parentcaacf04544d8a09a3fe48caace41f6af1bcc29a0
Fix concurrent attaches on HNAS iSCSI driver

It might happen that multiple cinder nodes/backends are trying to add
volumes to the same target. In this situation, the driver can get an
error trying to add a volume to a hlun just taken by other instance.
This patch fix this avoiding concurrency using mutual exclusion and adds
retries to the failed attempts to cover scenarios where multiple cinder
hosts are used.

Closes-bug: #1475007
Change-Id: Ie2d3b286eecbf0299ac0c0e32d3e098bb5d11e4f
cinder/exception.py
cinder/tests/unit/test_hitachi_hnas_backend.py
cinder/tests/unit/test_hitachi_hnas_iscsi.py
cinder/volume/drivers/hitachi/hnas_backend.py
cinder/volume/drivers/hitachi/hnas_iscsi.py