Failback will enable the host that has been frozen

If user freezes the host before failover, the cinder volume serivce
will be enabled by failback, and user doesn't need to thaw the host
before modify the host, if this is expected, the 'Frozen' field in
cinder service list should be changed to 'False', but it may be better
that host that is frozen must be thawed.

Change-Id: Iac03faa9c6cf96531db22e667bd9c194dff48221
Closes-Bug: #1577417
This commit is contained in:
jiamin 2016-05-03 23:42:16 -07:00
parent 8008489243
commit 1f0f01a7c1
1 changed files with 6 additions and 2 deletions

View File

@ -3336,8 +3336,12 @@ class VolumeManager(manager.SchedulerDependentManager):
if secondary_backend_id == "default":
service.replication_status = fields.ReplicationStatus.ENABLED
service.active_backend_id = ""
service.disabled = False
service.disabled_reason = ""
if service.frozen:
service.disabled = True
service.disabled_reason = "frozen"
else:
service.disabled = False
service.disabled_reason = ""
service.save()
else: