diff --git a/cinder/tests/unit/volume/drivers/dell_emc/vnx/mocked_vnx.yaml b/cinder/tests/unit/volume/drivers/dell_emc/vnx/mocked_vnx.yaml index 4629df389a0..b2a3adbf294 100644 --- a/cinder/tests/unit/volume/drivers/dell_emc/vnx/mocked_vnx.yaml +++ b/cinder/tests/unit/volume/drivers/dell_emc/vnx/mocked_vnx.yaml @@ -2067,6 +2067,8 @@ test_terminate_connection_cleanup_remove_sg: delete: disconnect_host: get_alu_hlu_map: {} + update: + with_poll: _context test_terminate_connection_cleanup_sg_absent: sg: @@ -2080,6 +2082,8 @@ test_terminate_connection_cleanup_deregister: delete: disconnect_host: get_alu_hlu_map: {} + update: + with_poll: _context vnx: _methods: delete_hba: diff --git a/cinder/volume/drivers/dell_emc/vnx/adapter.py b/cinder/volume/drivers/dell_emc/vnx/adapter.py index 2c0d7071e27..411323007c9 100644 --- a/cinder/volume/drivers/dell_emc/vnx/adapter.py +++ b/cinder/volume/drivers/dell_emc/vnx/adapter.py @@ -1091,6 +1091,11 @@ class CommonAdapter(replication.ReplicationAdapter): LOG.info("Storage Group %s is empty.", sg.name) sg.disconnect_host(sg.name) sg.delete() + + # Update sg with poll makes the one in client.sg_cache is with + # latest status which is un-exist. This makes sure the sg is + # created during next attaching. + self.update_storage_group_if_required(sg) if host is not None and self.itor_auto_dereg: # `host` is None when force-detach self._deregister_initiator(host) diff --git a/cinder/volume/drivers/dell_emc/vnx/driver.py b/cinder/volume/drivers/dell_emc/vnx/driver.py index 4f70cd749f7..e809a279635 100644 --- a/cinder/volume/drivers/dell_emc/vnx/driver.py +++ b/cinder/volume/drivers/dell_emc/vnx/driver.py @@ -81,9 +81,12 @@ class VNXDriver(driver.ManageableVD, 12.1.0 - Adjust max_luns_per_storage_group and check_max_pool_luns_threshold 12.1.1 - Fix perf issue when create/delete volume + 12.1.2 - Fix bug https://bugs.launchpad.net/cinder/+bug/1817385 to + make sure sg can be created again after it was destroyed + under `destroy_empty_stroage_group` setting to `True` """ - VERSION = '12.01.01' + VERSION = '12.01.02' VENDOR = 'Dell EMC' # ThirdPartySystems wiki page CI_WIKI_NAME = "EMC_VNX_CI" diff --git a/releasenotes/notes/vnx-update-sg-in-cache-3ecb673727bea79b.yaml b/releasenotes/notes/vnx-update-sg-in-cache-3ecb673727bea79b.yaml new file mode 100644 index 00000000000..35256a9b8bc --- /dev/null +++ b/releasenotes/notes/vnx-update-sg-in-cache-3ecb673727bea79b.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Dell EMC VNX Driver: Fixes `bug 1817385 + `__ to make sure the sg can + be created again after it was destroyed under `destroy_empty_storage_group` + setting to `True`.