'storwize_svc_flashcopy_timeout': 20,
# Test ignore capitalization
'storwize_svc_connection_protocol': 'iScSi',
- 'storwize_svc_multipath_enabled': False,
'storwize_svc_allow_tenant_qos': True}
wwpns = [str(random.randint(0, 9999999999999999)).zfill(16),
str(random.randint(0, 9999999999999999)).zfill(16)]
'storwize_svc_volpool_name': 'openstack',
# Test ignore capitalization
'storwize_svc_connection_protocol': 'iScSi',
- 'storwize_svc_multipath_enabled': False,
'storwize_svc_allow_tenant_qos': True,
'ssh_conn_timeout': 0}
config_group = self.driver.configuration.config_group
'compression': False,
'easytier': True,
'protocol': 'iSCSI',
- 'multipath': False,
'iogrp': 0,
'qos': None,
'replication': False,
expected = {'FC': {'driver_volume_type': 'fibre_channel',
'data': {'target_lun': 0,
- 'target_wwn': 'AABBCCDDEEFF0011',
+ 'target_wwn': ['AABBCCDDEEFF0011'],
'target_discovered': False}},
'iSCSI': {'driver_volume_type': 'iscsi',
'data': {'target_discovered': False,
self.assertIsNotNone(host_name)
- def test_storwize_initiator_multiple_preferred_nodes_matching(self):
+ def test_storwize_initiator_multiple_wwpns_connected(self):
# Generate us a test volume
volume = self._create_volume()
with mock.patch.object(storwize_svc_common.StorwizeHelpers,
'get_conn_fc_wwpns') as get_mappings:
- get_mappings.return_value = ['AABBCCDDEEFF0001',
- 'AABBCCDDEEFF0002',
- 'AABBCCDDEEFF0010',
- 'AABBCCDDEEFF0012']
+ mapped_wwpns = ['AABBCCDDEEFF0001', 'AABBCCDDEEFF0002',
+ 'AABBCCDDEEFF0010', 'AABBCCDDEEFF0012']
+ get_mappings.return_value = mapped_wwpns
# Initialize the connection
init_ret = self.driver.initialize_connection(volume, connector)
- # Make sure we use the preferred WWPN.
- self.assertEqual('AABBCCDDEEFF0010',
- init_ret['data']['target_wwn'])
-
- def test_storwize_initiator_multiple_preferred_nodes_no_matching(self):
- # Generate us a test volume
- volume = self._create_volume()
-
- # Fibre Channel volume type
- extra_spec = {'capabilities:storage_protocol': '<in> FC'}
- vol_type = volume_types.create(self.ctxt, 'FC', extra_spec)
-
- volume['volume_type_id'] = vol_type['id']
-
- # Make sure that the volumes have been created
- self._assert_vol_exists(volume['name'], True)
-
- # Set up WWPNs that will not match what is available.
- self.driver._state['storage_nodes']['1']['WWPN'] = ['123456789ABCDEF0',
- '123456789ABCDEF1']
-
- wwpns = ['ff00000000000000', 'ff00000000000001']
- connector = {'host': 'storwize-svc-test', 'wwpns': wwpns}
-
- with mock.patch.object(storwize_svc_common.StorwizeHelpers,
- 'get_conn_fc_wwpns') as get_mappings:
- get_mappings.return_value = ['AABBCCDDEEFF0001',
- 'AABBCCDDEEFF0002',
- 'AABBCCDDEEFF0010',
- 'AABBCCDDEEFF0012']
-
- # Initialize the connection
- init_ret = self.driver.initialize_connection(volume, connector)
-
- # Make sure we use the first available WWPN.
- self.assertEqual('AABBCCDDEEFF0001',
- init_ret['data']['target_wwn'])
-
- def test_storwize_initiator_single_preferred_node_matching(self):
- # Generate us a test volume
- volume = self._create_volume()
-
- # Fibre Channel volume type
- extra_spec = {'capabilities:storage_protocol': '<in> FC'}
- vol_type = volume_types.create(self.ctxt, 'FC', extra_spec)
-
- volume['volume_type_id'] = vol_type['id']
-
- # Make sure that the volumes have been created
- self._assert_vol_exists(volume['name'], True)
-
- # Set up one WWPN.
- self.driver._state['storage_nodes']['1']['WWPN'] = ['AABBCCDDEEFF0012']
-
- wwpns = ['ff00000000000000', 'ff00000000000001']
- connector = {'host': 'storwize-svc-test', 'wwpns': wwpns}
-
- with mock.patch.object(storwize_svc_common.StorwizeHelpers,
- 'get_conn_fc_wwpns') as get_mappings:
- get_mappings.return_value = ['AABBCCDDEEFF0001',
- 'AABBCCDDEEFF0002',
- 'AABBCCDDEEFF0010',
- 'AABBCCDDEEFF0012']
-
- # Initialize the connection
- init_ret = self.driver.initialize_connection(volume, connector)
-
- # Make sure we use the preferred WWPN.
- self.assertEqual('AABBCCDDEEFF0012',
+ # Make sure we return all wwpns which where mapped as part of the
+ # connection
+ self.assertEqual(mapped_wwpns,
init_ret['data']['target_wwn'])
def test_storwize_terminate_connection(self):
'ff00000000000001': ['AABBCCDDEEFF0011']},
'target_discovered': False,
'target_lun': 0,
- 'target_wwn': 'AABBCCDDEEFF0011',
+ 'target_wwn': ['AABBCCDDEEFF0011'],
'volume_id': volume['id']
}
}
import six
from cinder import exception
-from cinder.i18n import _, _LE, _LI, _LW
+from cinder.i18n import _, _LE, _LI
from cinder import utils
import cinder.volume.driver
from cinder.volume.drivers.ibm import flashsystem_common as fscommon
flashsystem_fc_opts = [
cfg.BoolOpt('flashsystem_multipath_enabled',
default=False,
- help='Connect with multipath (FC only).'
- '(Default is false.)')
+ help='This option no longer has any affect. It is deprecated '
+ 'and will be removed in the next release.',
+ deprecated_for_removal=True)
]
CONF = cfg.CONF
'enter: _get_vdisk_map_properties: vdisk '
'%(vdisk_name)s.', {'vdisk_name': vdisk_name})
- preferred_node = '0'
IO_group = '0'
- # Get preferred node and other nodes in I/O group
- preferred_node_entry = None
io_group_nodes = []
for k, node in self._storage_nodes.items():
if vdisk_params['protocol'] != node['protocol']:
continue
- if node['id'] == preferred_node:
- preferred_node_entry = node
if node['IO_group'] == IO_group:
io_group_nodes.append(node)
LOG.error(msg)
raise exception.VolumeBackendAPIException(data=msg)
- if not preferred_node_entry and not vdisk_params['multipath']:
- # Get 1st node in I/O group
- preferred_node_entry = io_group_nodes[0]
- LOG.warning(_LW('_get_vdisk_map_properties: Did not find a '
- 'preferred node for vdisk %s.'), vdisk_name)
properties = {}
properties['target_discovered'] = False
properties['target_lun'] = lun_id
'(Default: Enabled)'),
cfg.BoolOpt('storwize_svc_multipath_enabled',
default=False,
- help='Connect with multipath (FC only; iSCSI multipath is '
- 'controlled by Nova)'),
+ help='This option no longer has any affect. It is deprecated '
+ 'and will be removed in the next release.',
+ deprecated_for_removal=True),
cfg.BoolOpt('storwize_svc_multihostmap_enabled',
default=True,
help='Allows vdisk to multi host mapping'),
LOG.error(msg)
raise exception.VolumeBackendAPIException(data=msg)
- if not preferred_node_entry and not vol_opts['multipath']:
+ if not preferred_node_entry:
# Get 1st node in I/O group
preferred_node_entry = io_group_nodes[0]
LOG.warning(_LW('initialize_connection: Did not find a '
for node in self._state['storage_nodes'].values():
conn_wwpns.extend(node['WWPN'])
- if not vol_opts['multipath']:
- # preferred_node_entry can have a list of WWPNs while only
- # one WWPN may be available on the storage host. Here we
- # walk through the nodes until we find one that works,
- # default to the first WWPN otherwise.
- for WWPN in preferred_node_entry['WWPN']:
- if WWPN in conn_wwpns:
- properties['target_wwn'] = WWPN
- break
- else:
- LOG.warning(_LW('Unable to find a preferred node match'
- ' for node %(node)s in the list of '
- 'available WWPNs on %(host)s. '
- 'Using first available.'),
- {'node': preferred_node,
- 'host': host_name})
- properties['target_wwn'] = conn_wwpns[0]
- else:
- properties['target_wwn'] = conn_wwpns
+ properties['target_wwn'] = conn_wwpns
i_t_map = self._make_initiator_target_map(connector['wwpns'],
conn_wwpns)
'diff': diff,
'host': host})
- ignore_keys = ['protocol', 'multipath']
+ ignore_keys = ['protocol']
no_copy_keys = ['warning', 'autoexpand', 'easytier']
copy_keys = ['rsize', 'grainsize', 'compression']
all_keys = ignore_keys + no_copy_keys + copy_keys