state machine incorrectly models CLEANFAIL -> CLEANING transition

Bug #1446758 reported by aeva black
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Medium
Ruby Loo

Bug Description

The state machine incorrectly models the transitions around the CLEANFAIL state.

For reference, I'll quote the spec:
  http://specs.openstack.org/openstack/ironic-specs/specs/kilo/new-ironic-state-machine.html#proposed-change

CLEANING
    Nodes in the CLEANING state are being scrubbed in preparation to being made AVAILABLE. Good candidates for CLEANING tasks include:
    [snip...]
    Management of CLEANING tasks should be handled in the same fashion as ZAPPING tasks.

ZAPFAIL
    Nodes that transition into ZAPFAIL will automatically enter maintenance mode, as failure to ZAP a machine usually indicates a hardware failure or something else that requires remote hands to fix.

Here is the incorrect code:

204 # Add clean* states
205 machine.add_state(CLEANING, target=AVAILABLE, **watchers)
206 machine.add_state(CLEANFAIL, target=AVAILABLE, **watchers)
...
262 # If cleaning fails, wait for operator intervention
263 machine.add_transition(CLEANING, CLEANFAIL, 'fail')
264
265 # A node that fails cleaning may be put back through cleaning
266 machine.add_transition(CLEANFAIL, CLEANING, 'clean')
267
268 # An operator may want to hold a CLEANFAIL node in operator for zapping or
269 # outside-of-Ironic operations (like replacing hardware)
270 machine.add_transition(CLEANFAIL, MANAGEABLE, 'manage')

aeva black (tenbrae)
Changed in ironic:
status: New → Triaged
importance: Undecided → Medium
milestone: none → liberty-1
Ruby Loo (rloo)
Changed in ironic:
assignee: nobody → Ruby Loo (rloo)
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/176032

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/176032
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=0c295153af55f85120c78875052bf5c23e168c4b
Submitter: Jenkins
Branch: master

commit 0c295153af55f85120c78875052bf5c23e168c4b
Author: Ruby Loo <email address hidden>
Date: Tue Apr 21 19:07:32 2015 +0000

    Remove state transition: CLEANFAIL -> CLEANING

    The state machine incorrectly models the transition from CLEANFAIL to
    to CLEANING state. The spec [1] mentions that management of CLEANING
    tasks should be handled in the same fashion as ZAPPING tasks. For
    ZAPFAIL:
        Nodes that transition into ZAPFAIL will automatically enter
        maintenance mode, as failure to ZAP a machine usually indicates
        a hardware failure or something else that requires remote hands
        to fix.

    Nodes in CLEANFAIL should do a similar thing as ZAPFAIL; they are
    put in maintenance mode, but shouldn't be able to transition directly
    to CLEANING.

    This patch also clarifies the documentation for the transition
    CLEANFAIL -> MANAGEABLE.

    [1] http://specs.openstack.org/openstack/ironic-specs/specs/kilo/new-ironic-state-machine.html#proposed-change

    Change-Id: Ieda2fcd78332a063c51685cd01bb824014f0f4a8
    Closes-Bug: #1446758

Changed in ironic:
status: In Progress → Fix Committed
Changed in ironic:
milestone: none → 4.0.0
status: Fix Committed → Fix Released
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.