diff --git a/cinder/volume/drivers/pure.py b/cinder/volume/drivers/pure.py index eec75ad810e..9d5fc527d79 100644 --- a/cinder/volume/drivers/pure.py +++ b/cinder/volume/drivers/pure.py @@ -2821,6 +2821,31 @@ class PureBaseVolumeDriver(san.SanDriver): " eradicated - will recreate.", name) source_array.delete_pods(names=[name]) self._create_pod_if_not_exist(source_array, name) + else: + if self._array.safemode: + # Now we check to ensure that the created pod does not have a + # safemode protection group attached to it as this is not + # supported by Cinder + safemode_pg = list( + source_array.get_container_default_protections( + names=[name]).items)[0].default_protections + if safemode_pg: + pgname = safemode_pg[0].name + res = source_array.patch_container_default_protections( + names=[name], + container_default_protection=( + flasharray.ContainerDefaultProtection( + default_protections=[]))) + if res.status_code != 200: + LOG.warning("Failed to remove Default Protection " + "Container: %s", res.errors[0]) + else: + source_array.patch_protection_groups( + names=[pgname], + protection_group=flasharray.ProtectionGroup( + destroyed=True)) + source_array.delete_protection_groups( + names=[pgname]) @pure_driver_debug_trace def _create_protection_group_if_not_exist(self, source_array, pgname): diff --git a/releasenotes/notes/pure_pod_safemode-d64b0705828529e5.yaml b/releasenotes/notes/pure_pod_safemode-d64b0705828529e5.yaml new file mode 100644 index 00000000000..62b33decb7f --- /dev/null +++ b/releasenotes/notes/pure_pod_safemode-d64b0705828529e5.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + [Pure Storage] When using synchronous replication, ensure that + FlashArray pods used by Cinder do not have SafeMode protection + groups attached, as SafeMode is not supported by Cinder.