failback causes cinder to enable backend which may be frozen before failover

Bug #1577417 reported by jiamin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
jiamin

Bug Description

Steps to Reproduce:

    freeze host
    failover host
    failback host
    attempt to create volume

Actual Results: Can modify backend even though it's frozen.
Expected Results: Backend is frozen and must be thawed.

I think it better is change the failover-host function in manager.py from:

3350 if secondary_backend_id == "default":
3351 service.replication_status =fields.ReplicationStatus.ENABLED
3352 service.active_backend_id = ""
3353 service.disabled = False
3354 service.disabled_reason = ""
3355 service.save()

to:

3350 if secondary_backend_id == "default":
3351 service.replication_status = fields.ReplicationStatus.ENABLED
3352 service.active_backend_id = ""
3353 if service.frozen:
3354 service.disabled = True
3355 service.disabled_reason = "frozen"
3356 else:
3357 service.disabled = False
3358 service.disabled_reason = ""
3359 service.save()

if not change the code, there is another problem too, after failback, the 'frozen' filed in the result of "cinder service-list --withreplicaiton True" will be still True and confuse user.

$ cinder service-list --withreplication True
+------------------+-----------------------------------------------------------------------+------+---------+-------+----------------------------+--------------------+-------------------+--------+-----------------+
| Binary | Host | Zone | Status | State | Updated_at | Replication Status | Active Backend ID | Frozen | Disabled Reason |
+------------------+-----------------------------------------------------------------------+------+---------+-------+----------------------------+--------------------+-------------------+--------+-----------------+
| cinder-backup | charmander | nova | enabled | up | 2016-05-02T14:23:28.000000 | | | | - |
| cinder-scheduler | charmander | nova | enabled | up | 2016-05-02T14:23:26.000000 | | | | - |
| cinder-volume | charmander@IBM-DS8K_9.11.242.187_P7_fibre_channel | nova | enabled | up | 2016-05-02T14:23:34.000000 | enabled | | True | |

jiamin (shljia)
summary: - failback causes cinder to enable backend when frozen
+ failback causes cinder to enable backend when it is frozen before
+ failover
description: updated
description: updated
jiamin (shljia)
Changed in cinder:
assignee: nobody → jiamin (shljia)
jiamin (shljia)
summary: - failback causes cinder to enable backend when it is frozen before
+ failback causes cinder to enable backend which may be frozen before
failover
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/312334

Changed in cinder:
status: New → In Progress
Changed in cinder:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/312334
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=1f0f01a7c176e095991d95de6ad179b0d45923dd
Submitter: Jenkins
Branch: master

commit 1f0f01a7c176e095991d95de6ad179b0d45923dd
Author: jiamin <email address hidden>
Date: Tue May 3 23:42:16 2016 -0700

    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

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/cinder 9.0.0.0b1

This issue was fixed in the openstack/cinder 9.0.0.0b1 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.