Can't change the node->chassis OR port-> node association

Bug #1340196 reported by Lucas Alvares Gomes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
High
Lucas Alvares Gomes

Bug Description

The way we change the relation of a port with a node OR a node with a chassis is by replacing the 'node_uuid' OR 'chassis_uuid' fields from Ports and Nodes respectively.

The API is failing to if you try to replace those fields, LOG:

[stack@localhost devstack]$ ironic node-update f0fd1ec8-47ad-4652-b4c9-46d19d8914d3 replace chassis_uuid=56bb1063-8ad2-4f29-b3fc-bcda9684e09a
Couldn't apply patch '[{'path': '/chassis_uuid', 'value': u'56bb1063-8ad2-4f29-b3fc-bcda9684e09a', 'op': 'replace'}]'. Reason: can't replace non-existent object 'chassis_uuid' (HTTP 400)

[stack@localhost devstack]$ ironic port-update 3551aa44-ed73-4fb7-969d-3b04cde2af25 replace node_uuid=f0fd1ec8-47ad-4652-b4c9-46d19d8914d3
Couldn't apply patch '[{'path': '/node_uuid', 'value': u'f0fd1ec8-47ad-4652-b4c9-46d19d8914d3', 'op': 'replace'}]'. Reason: can't replace non-existent object 'node_uuid' (HTTP 400)

Both 'chassis_uuid' and 'node_uuid' fields in the API are special, they _only_ exists in the API object and internally they get translated to their numerical ID.

Changed in ironic:
status: New → Incomplete
status: Incomplete → In Progress
assignee: nobody → Lucas Alvares Gomes (lucasagomes)
importance: Undecided → High
summary: - Can't change the node->chassis OR port-> node relation
+ Can't change the node->chassis OR port-> node association
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/106083

aeva black (tenbrae)
Changed in ironic:
milestone: none → juno-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

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

commit cfeab37f0a947122a2b012d61ba234cc25f52935
Author: Lucas Alvares Gomes <email address hidden>
Date: Thu Jul 10 15:36:04 2014 +0100

    Fix node to chassis and port to node association

    This patch is fixing the Ironic API to allow "replace" (or "add" that
    acts like a replace on an existing field) the chassis_uuid field from
    nodes and the node_uuid field from ports.

    Closes-Bug: #1340196
    Change-Id: I89533bcd2e4ab0b1d453c4d9424e573b23703827

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