Skip to content

Commit

Permalink
Fix create backup by using snapshot issue
Browse files Browse the repository at this point in the history
  • Loading branch information
doubletao318 committed Sep 22, 2020
1 parent 2466a8a commit 181c210
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
8 changes: 4 additions & 4 deletions Cinder/Rocky/huawei_base_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,15 +564,15 @@ 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
if opt.get('replication_enabled'))
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}
Expand All @@ -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)

Expand All @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions Cinder/Rocky/huawei_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down
8 changes: 4 additions & 4 deletions Cinder/Stein/huawei_base_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,15 +564,15 @@ 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
if opt.get('replication_enabled'))
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}
Expand All @@ -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)

Expand All @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions Cinder/Stein/huawei_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down
8 changes: 4 additions & 4 deletions Cinder/Train/huawei_base_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,15 +564,15 @@ 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
if opt.get('replication_enabled'))
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}
Expand All @@ -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)

Expand All @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions Cinder/Train/huawei_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 181c210

Please sign in to comment.