Merge "Groups: remove unneeded "status" variable"

This commit is contained in:
Zuul 2022-06-14 17:08:28 +00:00 committed by Gerrit Code Review
commit 3dfc519301
1 changed files with 1 additions and 2 deletions

View File

@ -3286,7 +3286,6 @@ class VolumeManager(manager.CleanableManager,
# Make sure the host in the DB matches our own when clustered
self._set_resource_host(group)
status = fields.GroupStatus.AVAILABLE
model_update = None
self._notify_about_group_usage(context, group, "create.start")
@ -3325,7 +3324,7 @@ class VolumeManager(manager.CleanableManager,
LOG.error("Group %s: create failed",
group.name)
group.status = status
group.status = fields.GroupStatus.AVAILABLE
group.created_at = timeutils.utcnow()
group.save()
LOG.info("Group %s: created successfully", group.name)