From 8adc772b72bbdd9dca41d86d615c3c090688e39e Mon Sep 17 00:00:00 2001 From: huangpeng5 <47136588+huangpeng5@users.noreply.github.com> Date: Sat, 28 Dec 2024 16:37:09 +0800 Subject: [PATCH 1/4] Update RELEASE.md --- RELEASE.md | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/RELEASE.md b/RELEASE.md index 3a28426..f935198 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,3 +1,61 @@ +# 2.6.4 +## Mappings between Driver and OpenStack versions + +| OpenStack |Mitaka|Newton|Ocata|Pike|Queens|Rocky|Stein|Train|Ussuri|Victoria|Wallaby|Xena|Yoga|Zed|Antelope|Bobcat +|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---| +|Cinder Driver|√|√|√|√|√|√|√|√|√|√|√|√|√|√|√|√| +|Manila Driver|√|√|√|√|√|√|√|√|√|√|√|√|√|√|√|×| + + +We have tested OpenStack Newton with OceanStor Dorado V6 6.1.3 +## Version mappings among Cinder Driver, Huawei storage, and OpenStack +| OpenStack |Huawei Storage| +|---|---| +|Cinder Driver|OceanStor V5 V500R007C61/V500R007C70/V500R007C71| +| |OceanStor V6 6.1.3/6.1.5/6.1.6/6.1.7 +| |OceanStor Dorado V3 V300R002C10/V300R002C20| +| |OceanStor Dorado V6 6.1.0/6.1.2/6.1.3/6.1.5/6.1.6/6.1.7 + +## Version mappings among Manila Driver, Huawei storage, and OpenStack +| OpenStack |Huawei Storage| +|---|---| +|Manila Driver|OceanStor V5 V500R007C61/V500R007C70| +| |OceanStor V6 6.1.3/6.1.5/6.1.6 +| |OceanStor Dorado V6 6.1.0/6.1.2/6.1.3/6.1.5/6.1.6 + +## Version mappings among PowerVC, Huawei storage, and OpenStack +| OpenStack |Huawei Storage| +|---|---| +|PowerVC |OceanStor DoradoV3 V300R002| +| IBM PowerVC 2.0.0/2.0.1/2.0.2/2.0.3/2.1.0/2.1.1/2.2.0|OceanStor V5 V500R007 +| |OceanStor V6 6.1.3/6.1.5/6.1.6 +| |OceanStor Dorado V6 6.1.0/6.1.2/6.1.3/6.1.5/6.1.6 + +# 2.6.3 +## Mappings between Driver and OpenStack versions + +| OpenStack |Mitaka|Newton|Ocata|Pike|Queens|Rocky|Stein|Train|Ussuri|Victoria|Wallaby|Xena|Yoga|Zed|Antelope| +|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---| +|Cinder Driver|√|√|√|√|√|√|√|√|√|√|√|√|√|√|√| +|Manila Driver|√|√|√|√|√|√|√|√|√|√|√|√|√|√|√| + + +We have tested OpenStack Newton with OceanStor Dorado V6 6.1.3 +## Version mappings among Cinder Driver, Huawei storage, and OpenStack +| OpenStack |Huawei Storage| +|---|---| +|Cinder Driver|OceanStor V5 V500R007C61/V500R007C70/V500R007C71| +| |OceanStor V6 6.1.3/6.1.5/6.1.6 +| |OceanStor Dorado V3 V300R002C10/V300R002C20| +| |OceanStor Dorado V6 6.1.0/6.1.2/6.1.3/6.1.5/6.1.6 + +## Version mappings among Manila Driver, Huawei storage, and OpenStack +| OpenStack |Huawei Storage| +|---|---| +|Manila Driver|OceanStor V5 V500R007C61/V500R007C70| +| |OceanStor V6 6.1.3/6.1.5/6.1.6 +| |OceanStor Dorado V6 6.1.0/6.1.2/6.1.3/6.1.5/6.1.6 + # 2.6.2 ## Mappings between Driver and OpenStack versions From 3bd64dcef27fbd564f24d94c6b322446a95c10fe Mon Sep 17 00:00:00 2001 From: huangpeng5 <47136588+huangpeng5@users.noreply.github.com> Date: Sat, 28 Dec 2024 16:37:55 +0800 Subject: [PATCH 2/4] Update RELEASE.md --- RELEASE.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index f935198..5c59626 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -26,8 +26,8 @@ We have tested OpenStack Newton with OceanStor Dorado V6 6.1.3 ## Version mappings among PowerVC, Huawei storage, and OpenStack | OpenStack |Huawei Storage| |---|---| -|PowerVC |OceanStor DoradoV3 V300R002| -| IBM PowerVC 2.0.0/2.0.1/2.0.2/2.0.3/2.1.0/2.1.1/2.2.0|OceanStor V5 V500R007 +|IBM PowerVC 2.0.0/2.0.1/2.0.2/2.0.3/2.1.0/2.1.1/2.2.0|OceanStor DoradoV3 V300R002| +| |OceanStor V5 V500R007 | |OceanStor V6 6.1.3/6.1.5/6.1.6 | |OceanStor Dorado V6 6.1.0/6.1.2/6.1.3/6.1.5/6.1.6 From 81a02ae2b8e940c4be1dd2fc30c264dc574f0f0f Mon Sep 17 00:00:00 2001 From: huangpeng5 <1298695987@qq.com> Date: Thu, 13 Mar 2025 21:01:12 +0800 Subject: [PATCH 3/4] Set LUN WWN for Mitaka for 2.6.4 --- Cinder/Mitaka/huawei_driver.py | 3 ++- Cinder/Mitaka/huawei_utils.py | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Cinder/Mitaka/huawei_driver.py b/Cinder/Mitaka/huawei_driver.py index 00f3729..c1535ae 100644 --- a/Cinder/Mitaka/huawei_driver.py +++ b/Cinder/Mitaka/huawei_driver.py @@ -745,7 +745,7 @@ def _common_create_volume(self, volume, src_obj=None, src_type=None, huawei_lun_wwn=lun_info.get('WWN'), hypermetro=hypermetro) model_update = {'provider_location': provider_location} model_update.update(replica_info) - + huawei_utils.set_volume_lun_wwn(model_update, lun_info, volume) return model_update def create_volume(self, volume): @@ -1995,6 +1995,7 @@ def manage_existing(self, volume, external_ref): model_update['provider_location'] = huawei_utils.to_string( **provider_location) + huawei_utils.set_volume_lun_wwn(model_update, lun_info, volume) return model_update def _get_lun_info_by_ref(self, external_ref): diff --git a/Cinder/Mitaka/huawei_utils.py b/Cinder/Mitaka/huawei_utils.py index 7faba56..87807ae 100644 --- a/Cinder/Mitaka/huawei_utils.py +++ b/Cinder/Mitaka/huawei_utils.py @@ -107,6 +107,12 @@ def get_volume_metadata(volume): return {} +def set_volume_lun_wwn(model_update, lun_info, volume): + metadata = get_volume_metadata(volume) + metadata['lun_wwn'] = lun_info.get('WWN') + model_update.update({"metadata": metadata}) + + def get_admin_metadata(volume): admin_metadata = {} if 'admin_metadata' in volume: From 112b4d7054ccbf41bedb539e576297e3dcc6cabe Mon Sep 17 00:00:00 2001 From: huangpeng5 <1298695987@qq.com> Date: Mon, 29 Sep 2025 14:56:22 +0800 Subject: [PATCH 4/4] fix error --- Cinder/Mitaka/huawei_driver.py | 12 ------------ Cinder/Newton/huawei_driver.py | 12 ------------ Cinder/Ocata/huawei_driver.py | 12 ------------ Cinder/Pike/huawei_driver.py | 12 ------------ 4 files changed, 48 deletions(-) diff --git a/Cinder/Mitaka/huawei_driver.py b/Cinder/Mitaka/huawei_driver.py index c1535ae..5cd90c5 100644 --- a/Cinder/Mitaka/huawei_driver.py +++ b/Cinder/Mitaka/huawei_driver.py @@ -3194,12 +3194,6 @@ def lock_host_when_terminate_connection(): def _terminate_connection_locked(self, volume, connector, **kwargs): """Delete map between a volume and a host.""" - attachments = volume.volume_attachment - if volume.multiattach and len(attachments) > 1 and sum( - 1 for a in attachments if a.connector == connector) > 1: - LOG.info("Volume is multi-attach and attached to the same host" - " multiple times") - return metadata = huawei_utils.get_lun_metadata(volume) LOG.info("terminate_connection, metadata is: %s.", metadata) @@ -3515,12 +3509,6 @@ def lock_host_when_terminate_connection(volume, connector): def _terminate_connection_locked(self, volume, connector, **kwargs): """Delete map between a volume and a host.""" - attachments = volume.volume_attachment - if volume.multiattach and len(attachments) > 1 and sum( - 1 for a in attachments if a.connector == connector) > 1: - LOG.info("Volume is multi-attach and attached to the same host" - " multiple times") - return {} lun_id, lun_type = self.get_lun_id_and_type( volume, constants.VOLUME_NOT_EXISTS_WARN) diff --git a/Cinder/Newton/huawei_driver.py b/Cinder/Newton/huawei_driver.py index bce97e7..097cff2 100644 --- a/Cinder/Newton/huawei_driver.py +++ b/Cinder/Newton/huawei_driver.py @@ -3193,12 +3193,6 @@ def lock_host_when_terminate_connection(): def _terminate_connection_locked(self, volume, connector, **kwargs): """Delete map between a volume and a host.""" - attachments = volume.volume_attachment - if volume.multiattach and len(attachments) > 1 and sum( - 1 for a in attachments if a.connector == connector) > 1: - LOG.info("Volume is multi-attach and attached to the same host" - " multiple times") - return metadata = huawei_utils.get_lun_metadata(volume) LOG.info("terminate_connection, metadata is: %s.", metadata) @@ -3514,12 +3508,6 @@ def lock_host_when_terminate_connection(volume, connector): def _terminate_connection_locked(self, volume, connector, **kwargs): """Delete map between a volume and a host.""" - attachments = volume.volume_attachment - if volume.multiattach and len(attachments) > 1 and sum( - 1 for a in attachments if a.connector == connector) > 1: - LOG.info("Volume is multi-attach and attached to the same host" - " multiple times") - return {} lun_id, lun_type = self.get_lun_id_and_type( volume, constants.VOLUME_NOT_EXISTS_WARN) diff --git a/Cinder/Ocata/huawei_driver.py b/Cinder/Ocata/huawei_driver.py index 6f7b0ad..2207102 100644 --- a/Cinder/Ocata/huawei_driver.py +++ b/Cinder/Ocata/huawei_driver.py @@ -3193,12 +3193,6 @@ def lock_host_when_terminate_connection(): def _terminate_connection_locked(self, volume, connector, **kwargs): """Delete map between a volume and a host.""" - attachments = volume.volume_attachment - if volume.multiattach and len(attachments) > 1 and sum( - 1 for a in attachments if a.connector == connector) > 1: - LOG.info("Volume is multi-attach and attached to the same host" - " multiple times") - return metadata = huawei_utils.get_lun_metadata(volume) LOG.info("terminate_connection, metadata is: %s.", metadata) @@ -3514,12 +3508,6 @@ def lock_host_when_terminate_connection(volume, connector): def _terminate_connection_locked(self, volume, connector, **kwargs): """Delete map between a volume and a host.""" - attachments = volume.volume_attachment - if volume.multiattach and len(attachments) > 1 and sum( - 1 for a in attachments if a.connector == connector) > 1: - LOG.info("Volume is multi-attach and attached to the same host" - " multiple times") - return {} lun_id, lun_type = self.get_lun_id_and_type( volume, constants.VOLUME_NOT_EXISTS_WARN) diff --git a/Cinder/Pike/huawei_driver.py b/Cinder/Pike/huawei_driver.py index 256e298..0b87b5e 100644 --- a/Cinder/Pike/huawei_driver.py +++ b/Cinder/Pike/huawei_driver.py @@ -3193,12 +3193,6 @@ def lock_host_when_terminate_connection(): def _terminate_connection_locked(self, volume, connector, **kwargs): """Delete map between a volume and a host.""" - attachments = volume.volume_attachment - if volume.multiattach and len(attachments) > 1 and sum( - 1 for a in attachments if a.connector == connector) > 1: - LOG.info("Volume is multi-attach and attached to the same host" - " multiple times") - return metadata = huawei_utils.get_lun_metadata(volume) LOG.info("terminate_connection, metadata is: %s.", metadata) @@ -3514,12 +3508,6 @@ def lock_host_when_terminate_connection(volume, connector): def _terminate_connection_locked(self, volume, connector, **kwargs): """Delete map between a volume and a host.""" - attachments = volume.volume_attachment - if volume.multiattach and len(attachments) > 1 and sum( - 1 for a in attachments if a.connector == connector) > 1: - LOG.info("Volume is multi-attach and attached to the same host" - " multiple times") - return {} lun_id, lun_type = self.get_lun_id_and_type( volume, constants.VOLUME_NOT_EXISTS_WARN)