)]}'
{"cinder/scheduler/manager.py":[{"author":{"_account_id":21129,"name":"Alan Bishop","email":"abishopsweng@gmail.com","username":"ASBishop","status":"ex Red Hat"},"change_message_id":"7e8cd71a4c07b28ab5e7beb4d2fab4bf471e1baa","unresolved":true,"context_lines":[{"line_number":637,"context_line":"            backup.save()"},{"line_number":638,"context_line":"            self.backup_api.create_backup(context, backup)"},{"line_number":639,"context_line":"        except exception.ServiceNotFound:"},{"line_number":640,"context_line":"            if backup.snapshot_id:"},{"line_number":641,"context_line":"                self.db.snapshot_update("},{"line_number":642,"context_line":"                    context, backup.snapshot_id,"},{"line_number":643,"context_line":"                    {\u0027status\u0027: fields.SnapshotStatus.AVAILABLE})"}],"source_content_type":"text/x-python","patch_set":1,"id":"976a2494_cedf06d1","line":640,"updated":"2021-07-16 16:13:59.000000000","message":"I gather the issue is \u0027previous_status\u0027 may be None, and that situation can arise when the backup has a snapshot_id. But this patch seems to just be repeating what I think is handled already by [1].\n\n[1] https://opendev.org/openstack/cinder/src/commit/c8c4fc953c4a563ed2295efaf82c75b52de06a2c/cinder/backup/manager.py#L401\n\nRepeating the code doesn\u0027t seem wise, especially if there are other circumstances where the \u0027previous_status\u0027 might be None.\n\nOne idea would be to record the volume\u0027s status above (right after L633), and use that as the previous_status.\n\nAnother thought is to see if the original L640 could simply be deleted. If the backup manager has already restored the previous status then the scheduler may not need to do it too.","commit_id":"fe1d159d324c1e560c2555facf002420039d8b3c"}]}
