Browse Source

Merge "Remove unnecessary saving of host and availability_zone"

changes/50/662850/4
Zuul 2 years ago
committed by Gerrit Code Review
parent
commit
4d2e71e13c
  1. 9
      cinder/backup/manager.py

9
cinder/backup/manager.py

@ -358,10 +358,6 @@ class BackupManager(manager.ThreadPoolManager):
self._notify_about_backup_usage(context, backup, "create.start")
backup.host = self.host
backup.availability_zone = self.az
backup.save()
expected_status = "backing-up"
if snapshot_id:
actual_status = snapshot['status']
@ -536,9 +532,6 @@ class BackupManager(manager.ThreadPoolManager):
volume = objects.Volume.get_by_id(context, volume_id)
self._notify_about_backup_usage(context, backup, "restore.start")
backup.host = self.host
backup.save()
expected_status = [fields.VolumeStatus.RESTORING_BACKUP,
fields.VolumeStatus.CREATING]
volume_previous_status = volume['status']
@ -715,8 +708,6 @@ class BackupManager(manager.ThreadPoolManager):
LOG.info('Delete backup started, backup: %s.', backup.id)
self._notify_about_backup_usage(context, backup, "delete.start")
backup.host = self.host
backup.save()
expected_status = fields.BackupStatus.DELETING
actual_status = backup.status

Loading…
Cancel
Save