Skip to content

Commit

Permalink
Storwize: Fix iogrp availability check
Browse files Browse the repository at this point in the history
Do not check if vdisk_count is greater than zero to determine iogrp
availability. This is wrong, and leads to the driver not being able to
use empty iogrps.

Change-Id: Ia73189a11cfcc0641c1527293675361c4e78443f
Closes-Bug: #1240395
  • Loading branch information
avishay-traeger committed Oct 16, 2013
1 parent 1f34b96 commit cf16029
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cinder/tests/test_storwize_svc.py
Expand Up @@ -742,8 +742,8 @@ def _cmd_lsvdisk(self, **kwargs):
def _cmd_lsiogrp(self, **kwargs):
rows = [None] * 6
rows[0] = ['id', 'name', 'node_count', 'vdisk_count', 'host_count']
rows[1] = ['0', 'io_grp0', '2', '22', '4']
rows[2] = ['1', 'io_grp1', '2', '22', '4']
rows[1] = ['0', 'io_grp0', '2', '0', '4']
rows[2] = ['1', 'io_grp1', '2', '0', '4']
rows[3] = ['2', 'io_grp2', '0', '0', '4']
rows[4] = ['3', 'io_grp3', '0', '0', '4']
rows[5] = ['4', 'recovery_io_grp', '0', '0', '0']
Expand Down
3 changes: 1 addition & 2 deletions cinder/volume/drivers/storwize_svc.py
Expand Up @@ -245,8 +245,7 @@ def do_setup(self, ctxt):
for iogrp_line in iogrps:
try:
iogrp_data = self._get_hdr_dic(header, iogrp_line, '!')
if (int(iogrp_data['node_count']) > 0 and
int(iogrp_data['vdisk_count']) > 0):
if int(iogrp_data['node_count']) > 0:
self._available_iogrps.append(int(iogrp_data['id']))
except exception.VolumeBackendAPIException:
with excutils.save_and_reraise_exception():
Expand Down

0 comments on commit cf16029

Please sign in to comment.