]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Storwize: Add force flag on vdisk mapping call
authorGerald McBrearty <gfm@us.ibm.com>
Fri, 20 Nov 2015 19:23:21 +0000 (13:23 -0600)
committerGerald McBrearty <gfm@us.ibm.com>
Thu, 7 Jan 2016 18:08:08 +0000 (12:08 -0600)
commitcffad569f82bb5b6b52129015e37cfd62701622c
tree0a107c1161819e9b8ce8ed13b7b2b819c66d58e3
parent7df01a599ac40b28ad8bd753660d9a466cec6250
Storwize: Add force flag on vdisk mapping call

If a vdisk is already mapped and multihostmap is True,
use the force flag on the first call to mkvdiskhostmap.
There is no functional change associated with this defect
for this method, a vdisk that is already mapped to a
host without the multihostmap flag will fail and it
will be successful if the multihostmap is True.

The code was waiting for the first call to svcinfo
mkvdiskhostmap to fail before trying a second time with
the force option if multihostmap is set to true. This fix
adds the force option before the call to svcinfo
mkvdiskhostmap to avoid this overhead. The svcinfo
mkvdiskhostmap call accepts the force option when
a volume is not already mapped, and mkvdiskhostmap()
already has a force parameter,
so the existing testcase is still valid.

Fixed a bug where mkvdiskhostmap() was returning
data, and add a testcase to check that it is not
returning data.

Change-Id: I2320aeec9422625ce2a01aa5d28801207e8671a5
Closes-Bug: 1511751
cinder/tests/unit/test_storwize_svc.py
cinder/volume/drivers/ibm/storwize_svc/storwize_svc_common.py