Can not delete a node while waiting for deploy

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

Bug Description

During a deployment, some drivers set the node.provision_state to WAITDEPLOY -- eg, while waiting for a callback from the deploy ramdisk agent. It should be possible to de-provision the node during this window (ie, clean up the files and network env, and power it off). This state is explicitly included in the check within do_node_tear_down:
https://github.com/openstack/ironic/blob/master/ironic/conductor/manager.py#L409

However, there's an API check which is preventing this.
https://github.com/openstack/ironic/blob/master/ironic/api/controllers/v1/node.py#L205

        if rpc_node.target_provision_state is not None:
            msg = _('Node %s is already being provisioned.') % rpc_node['uuid']
            LOG.exception(msg)
            raise wsme.exc.ClientSideError(msg, status_code=409) # Conflict

aeva black (tenbrae)
Changed in ironic:
status: New → Triaged
importance: Undecided → High
milestone: none → icehouse-rc1
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/80141

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

commit 809367135a79183a05b81348d47eb2de42a49a19
Author: Ruby Loo <email address hidden>
Date: Thu Mar 13 01:47:50 2014 +0000

    Delete node while waiting for deploy

    During a deployment, some drivers set the node.provision_state to DEPLOYWAIT
    -- eg, while waiting for a callback from the deploy ramdisk agent. This
    change makes it possible to de-provision the node during this window (ie,
    clean up the files and network env, and power it off).

    Note that this state is explicitly included in the check within the
    ConductorManager's do_node_tear_down; it was the API check that prevented
    this.

    Also modified a user message to indicate that the node is being
    provisioned or decommissioned.

    Change-Id: Ia67ec635c36f643d99795d91f9dfb10b577f033f
    Closes-Bug: #1291056

Changed in ironic:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ironic:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ironic:
milestone: icehouse-rc1 → 2014.1
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.