]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Fix Storwize terminate_connection with no host
authorAvishay Traeger <avishay@il.ibm.com>
Tue, 26 Nov 2013 19:10:22 +0000 (21:10 +0200)
committerJay S. Bryant <jsbryant@us.ibm.com>
Wed, 27 Nov 2013 02:56:39 +0000 (20:56 -0600)
commit8185d1b5db421441ebba128f23f840a42f9bf050
tree2f62174408daa50620dd9f628f7440427be9ebe8
parent384e0bdf9f5b2dd0dc7d3e539d8af8f1bdbcb21f
Fix Storwize terminate_connection with no host

Nova may pass a connector to Cinder with no 'host' field, which was
causing a KeyError in the Storwize driver. This patch resolves this case
by doing the following:
1. If the volume is mapped to only 1 host, unmap it
2. If the volume was not mapped or mapped to multiple hosts, print a
   warning but don't raise an exception

Change-Id: I0ec1c24adbdfbcf1c4868b4981a2e2618d4b411c
Closes-Bug: #1244257
cinder/tests/test_storwize_svc.py
cinder/volume/drivers/storwize_svc.py