From 181c2108281fb58bca5d806834f45c429bb7cc5f Mon Sep 17 00:00:00 2001 From: doubletao318 Date: Tue, 22 Sep 2020 02:36:05 -0700 Subject: [PATCH] Fix create backup by using snapshot issue --- Cinder/Rocky/huawei_base_driver.py | 8 ++++---- Cinder/Rocky/huawei_flow.py | 4 ++-- Cinder/Stein/huawei_base_driver.py | 8 ++++---- Cinder/Stein/huawei_flow.py | 4 ++-- Cinder/Train/huawei_base_driver.py | 8 ++++---- Cinder/Train/huawei_flow.py | 4 ++-- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Cinder/Rocky/huawei_base_driver.py b/Cinder/Rocky/huawei_base_driver.py index 09a4c0e..01a5e2a 100644 --- a/Cinder/Rocky/huawei_base_driver.py +++ b/Cinder/Rocky/huawei_base_driver.py @@ -564,7 +564,7 @@ def delete_group(self, context, group, volumes): if hypermetro_group: hypermetro_mgr = hypermetro.HuaweiHyperMetro( self.local_cli, self.hypermetro_rmt_cli, - self.configuration.hypermetro) + self.configuration) hypermetro_mgr.delete_consistencygroup(group.id, volumes) replication_group = any(opt for opt in opts @@ -572,7 +572,7 @@ def delete_group(self, context, group, volumes): if replication_group: replication_mgr = replication.ReplicationManager( self.local_cli, self.replication_rmt_cli, - self.configuration.replication) + self.configuration) replication_mgr.delete_group(group.id, volumes) model_update = {'status': fields.GroupStatus.DELETED} @@ -598,7 +598,7 @@ def update_group(self, context, group, if hypermetro_group: hypermetro_mgr = hypermetro.HuaweiHyperMetro( self.local_cli, self.hypermetro_rmt_cli, - self.configuration.hypermetro) + self.configuration) hypermetro_mgr.update_consistencygroup( group.id, add_volumes, remove_volumes) @@ -607,7 +607,7 @@ def update_group(self, context, group, if replication_group: replication_mgr = replication.ReplicationManager( self.local_cli, self.replication_rmt_cli, - self.configuration.replication) + self.configuration) replication_mgr.update_group( group.id, add_volumes, remove_volumes) diff --git a/Cinder/Rocky/huawei_flow.py b/Cinder/Rocky/huawei_flow.py index 199d408..77e426b 100644 --- a/Cinder/Rocky/huawei_flow.py +++ b/Cinder/Rocky/huawei_flow.py @@ -2364,7 +2364,7 @@ def initialize_iscsi_connection(lun, lun_type, connector, client, else: work_flow.add( CheckSnapshotExistTask( - client, provides=('snapshot_info', 'lun_id'), + client, provides=('lun_info', 'lun_id'), rebind={'snapshot': 'lun'})) work_flow.add( @@ -2455,7 +2455,7 @@ def initialize_fc_connection(lun, lun_type, connector, fc_san, client, else: work_flow.add( CheckSnapshotExistTask( - client, provides=('snapshot_info', 'lun_id'), + client, provides=('lun_info', 'lun_id'), rebind={'snapshot': 'lun'})) work_flow.add( diff --git a/Cinder/Stein/huawei_base_driver.py b/Cinder/Stein/huawei_base_driver.py index 09a4c0e..01a5e2a 100644 --- a/Cinder/Stein/huawei_base_driver.py +++ b/Cinder/Stein/huawei_base_driver.py @@ -564,7 +564,7 @@ def delete_group(self, context, group, volumes): if hypermetro_group: hypermetro_mgr = hypermetro.HuaweiHyperMetro( self.local_cli, self.hypermetro_rmt_cli, - self.configuration.hypermetro) + self.configuration) hypermetro_mgr.delete_consistencygroup(group.id, volumes) replication_group = any(opt for opt in opts @@ -572,7 +572,7 @@ def delete_group(self, context, group, volumes): if replication_group: replication_mgr = replication.ReplicationManager( self.local_cli, self.replication_rmt_cli, - self.configuration.replication) + self.configuration) replication_mgr.delete_group(group.id, volumes) model_update = {'status': fields.GroupStatus.DELETED} @@ -598,7 +598,7 @@ def update_group(self, context, group, if hypermetro_group: hypermetro_mgr = hypermetro.HuaweiHyperMetro( self.local_cli, self.hypermetro_rmt_cli, - self.configuration.hypermetro) + self.configuration) hypermetro_mgr.update_consistencygroup( group.id, add_volumes, remove_volumes) @@ -607,7 +607,7 @@ def update_group(self, context, group, if replication_group: replication_mgr = replication.ReplicationManager( self.local_cli, self.replication_rmt_cli, - self.configuration.replication) + self.configuration) replication_mgr.update_group( group.id, add_volumes, remove_volumes) diff --git a/Cinder/Stein/huawei_flow.py b/Cinder/Stein/huawei_flow.py index 199d408..77e426b 100644 --- a/Cinder/Stein/huawei_flow.py +++ b/Cinder/Stein/huawei_flow.py @@ -2364,7 +2364,7 @@ def initialize_iscsi_connection(lun, lun_type, connector, client, else: work_flow.add( CheckSnapshotExistTask( - client, provides=('snapshot_info', 'lun_id'), + client, provides=('lun_info', 'lun_id'), rebind={'snapshot': 'lun'})) work_flow.add( @@ -2455,7 +2455,7 @@ def initialize_fc_connection(lun, lun_type, connector, fc_san, client, else: work_flow.add( CheckSnapshotExistTask( - client, provides=('snapshot_info', 'lun_id'), + client, provides=('lun_info', 'lun_id'), rebind={'snapshot': 'lun'})) work_flow.add( diff --git a/Cinder/Train/huawei_base_driver.py b/Cinder/Train/huawei_base_driver.py index 09a4c0e..01a5e2a 100644 --- a/Cinder/Train/huawei_base_driver.py +++ b/Cinder/Train/huawei_base_driver.py @@ -564,7 +564,7 @@ def delete_group(self, context, group, volumes): if hypermetro_group: hypermetro_mgr = hypermetro.HuaweiHyperMetro( self.local_cli, self.hypermetro_rmt_cli, - self.configuration.hypermetro) + self.configuration) hypermetro_mgr.delete_consistencygroup(group.id, volumes) replication_group = any(opt for opt in opts @@ -572,7 +572,7 @@ def delete_group(self, context, group, volumes): if replication_group: replication_mgr = replication.ReplicationManager( self.local_cli, self.replication_rmt_cli, - self.configuration.replication) + self.configuration) replication_mgr.delete_group(group.id, volumes) model_update = {'status': fields.GroupStatus.DELETED} @@ -598,7 +598,7 @@ def update_group(self, context, group, if hypermetro_group: hypermetro_mgr = hypermetro.HuaweiHyperMetro( self.local_cli, self.hypermetro_rmt_cli, - self.configuration.hypermetro) + self.configuration) hypermetro_mgr.update_consistencygroup( group.id, add_volumes, remove_volumes) @@ -607,7 +607,7 @@ def update_group(self, context, group, if replication_group: replication_mgr = replication.ReplicationManager( self.local_cli, self.replication_rmt_cli, - self.configuration.replication) + self.configuration) replication_mgr.update_group( group.id, add_volumes, remove_volumes) diff --git a/Cinder/Train/huawei_flow.py b/Cinder/Train/huawei_flow.py index d27a223..87185a7 100644 --- a/Cinder/Train/huawei_flow.py +++ b/Cinder/Train/huawei_flow.py @@ -2364,7 +2364,7 @@ def initialize_iscsi_connection(lun, lun_type, connector, client, else: work_flow.add( CheckSnapshotExistTask( - client, provides=('snapshot_info', 'lun_id'), + client, provides=('lun_info', 'lun_id'), rebind={'snapshot': 'lun'})) work_flow.add( @@ -2455,7 +2455,7 @@ def initialize_fc_connection(lun, lun_type, connector, fc_san, client, else: work_flow.add( CheckSnapshotExistTask( - client, provides=('snapshot_info', 'lun_id'), + client, provides=('lun_info', 'lun_id'), rebind={'snapshot': 'lun'})) work_flow.add(