Merge "PowerMax Driver - Exception when multipath not enabled for metro"
This commit is contained in:
commit
0fed431e9c
|
@ -194,9 +194,9 @@ class PowerMaxReplicationTest(test.TestCase):
|
|||
@mock.patch.object(utils.PowerMaxUtils, 'is_metro_device',
|
||||
return_value=True)
|
||||
def test_initialize_connection_no_multipath_iscsi(self, mock_md):
|
||||
info_dict = self.iscsi_common.initialize_connection(
|
||||
self.data.test_volume, self.data.connector)
|
||||
self.assertIsNone(info_dict)
|
||||
self.assertRaises(exception.VolumeBackendAPIException,
|
||||
self.iscsi_common.initialize_connection,
|
||||
self.data.test_volume, self.data.connector)
|
||||
|
||||
@mock.patch.object(
|
||||
masking.PowerMaxMasking, 'pre_multiattach',
|
||||
|
|
|
@ -918,12 +918,15 @@ class PowerMaxCommon(object):
|
|||
remote_port_group = None
|
||||
if (self.utils.is_metro_device(rep_config, extra_specs)
|
||||
and not is_multipath and self.protocol.lower() == 'iscsi'):
|
||||
LOG.warning("Either multipathing is not correctly/currently "
|
||||
"enabled on your system or the volume was created "
|
||||
"prior to multipathing being enabled. Please refer "
|
||||
"to the online PowerMax Cinder driver documentation "
|
||||
"for this release for further details.")
|
||||
return
|
||||
exception_message = _(
|
||||
"Either multipathing is not correctly/currently "
|
||||
"enabled on your system or the volume was created "
|
||||
"prior to multipathing being enabled. Please refer "
|
||||
"to the online PowerMax Cinder driver documentation "
|
||||
"for this release for further details.")
|
||||
LOG.error(exception_message)
|
||||
raise exception.VolumeBackendAPIException(
|
||||
message=exception_message)
|
||||
|
||||
if self.utils.is_volume_failed_over(volume):
|
||||
extra_specs = rep_extra_specs
|
||||
|
|
Loading…
Reference in New Issue