diff --git a/Cinder/Mitaka/huawei_driver.py b/Cinder/Mitaka/huawei_driver.py index 00f3729..5cd90c5 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): @@ -3193,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) @@ -3514,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/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: 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) diff --git a/RELEASE.md b/RELEASE.md index 3a28426..5c59626 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| +|---|---| +|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 + +# 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