target_power_state should be cleared on conductor start up

Bug #1567255 reported by Zhenguo Niu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Medium
Zhenguo Niu

Bug Description

when nova issuing a power action request to ironic, it will wait until the node target_power_state change to NOSTATE, but if there are something wrong with ironic during the waiting power state change process, and we reboot ironic conductor to recover, the nova instance's power state can't become complete any more, such as 'rebooting'.

so this proposes to clear the tartget_power_state during conductor startup, and it doesn't make sense to set the target state in a new started ironic.

Changed in ironic:
assignee: nobody → Zhenguo Niu (niu-zglinux)
Revision history for this message
Dmitry Tantsur (divius) wrote :

It makes sense, but it's not as simple as just clear the field in database. The power request might be in progress, so we should first wait for the target state. On timeout we should clean it and properly set the error.

Changed in ironic:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

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

Changed in ironic:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/310090
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=d52077f4fe8c668b258702e8298a4beaa19476d8
Submitter: Jenkins
Branch: master

commit d52077f4fe8c668b258702e8298a4beaa19476d8
Author: Zhenguo Niu <email address hidden>
Date: Tue Apr 26 10:19:04 2016 +0800

    Clear target_power_state on conductor startup

    During clearing locks, also clear target_power_state. As nodes
    may locked in powering process, sync_power_state task will sync
    the power_state field, but nobody handles target_power_state.

    Change-Id: I2293e03c05e13c716f78533680d128ba45ccda02
    Closes-Bug: #1567255

Changed in ironic:
status: In Progress → Fix Released
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/ironic 6.1.0

This issue was fixed in the openstack/ironic 6.1.0 release.

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.