diff --git a/cinder/tests/unit/volume/drivers/dell_emc/powermax/test_powermax_common.py b/cinder/tests/unit/volume/drivers/dell_emc/powermax/test_powermax_common.py index b7e1cc6875b..214813666cc 100644 --- a/cinder/tests/unit/volume/drivers/dell_emc/powermax/test_powermax_common.py +++ b/cinder/tests/unit/volume/drivers/dell_emc/powermax/test_powermax_common.py @@ -2301,12 +2301,18 @@ class PowerMaxCommonTest(test.TestCase): self.common.manage_existing_snapshot, snapshot, existing_ref) - @mock.patch.object(common.PowerMaxCommon, '_sync_check') @mock.patch.object(rest.PowerMaxRest, 'modify_volume_snap') - def test_unmanage_snapshot_success(self, mock_mod, mock_sync): + def test_unmanage_snapshot_success(self, mock_mod, ): self.common.unmanage_snapshot(self.data.test_snapshot_manage) mock_mod.assert_called_once() + @mock.patch.object(common.PowerMaxCommon, '_sync_check') + @mock.patch.object(rest.PowerMaxRest, 'modify_volume_snap') + def test_unmanage_snapshot_no_sync_check(self, mock_mod, mock_sync): + self.common.unmanage_snapshot(self.data.test_snapshot_manage) + mock_mod.assert_called_once() + mock_sync.assert_not_called() + @mock.patch.object(utils.PowerMaxUtils, 'is_volume_failed_over', return_value=True) def test_unmanage_snapshot_fail_failover(self, mock_failed): diff --git a/cinder/volume/drivers/dell_emc/powermax/common.py b/cinder/volume/drivers/dell_emc/powermax/common.py index 38d6a8110ed..1acb3d469cb 100644 --- a/cinder/volume/drivers/dell_emc/powermax/common.py +++ b/cinder/volume/drivers/dell_emc/powermax/common.py @@ -2602,12 +2602,15 @@ class PowerMaxCommon(object): raise exception.VolumeBackendAPIException( message=exception_message) - self._sync_check(array, device_id, extra_specs) - LOG.info("Snapshot %(snap_name)s is no longer managed in " "OpenStack but still remains on PowerMax/VMAX source " "%(array_id)s", {'snap_name': snap_name, 'array_id': array}) + LOG.warning("In order to remove the snapshot source volume from " + "OpenStack you will need to either delete the linked " + "SnapVX snapshot on the array or un-manage the volume " + "from Cinder.") + def get_manageable_volumes(self, marker, limit, offset, sort_keys, sort_dirs): """Lists all manageable volumes.