Chassis-node relationship does not reflected via the API

Bug #1308320 reported by Daryl Walleck
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Medium
Lucas Alvares Gomes

Bug Description

Based on the data from the API, it doesn't appear that the link between a chassis and a node is being persisted. If it is being saved, it is not reflected by the API. The chassis uuid is returned as null for a node, and trying to list all nodes for a chassis returns an empty list:

stack@ironic2:~/devstack$ ironic chassis-create
+-------------+--------------------------------------+
| Property | Value |
+-------------+--------------------------------------+
| description | None |
| extra | {} |
| uuid | f13988a8-51b6-4ee7-8ad1-6c185eee645d |
+-------------+--------------------------------------+

stack@ironic2:~/devstack$ ironic node-create -c f13988a8-51b6-4ee7-8ad1-6c185eee645d -d fake
+--------------+--------------------------------------+
| Property | Value |
+--------------+--------------------------------------+
| chassis_uuid | None |
| driver | fake |
| driver_info | {} |
| extra | {} |
| properties | {} |
| uuid | 043173f6-1aed-4931-a0c4-8ff0389ae51e |
+--------------+--------------------------------------+
stack@ironic2:~/devstack$ ironic chassis-node-list f13988a8-51b6-4ee7-8ad1-6c185eee645d

stack@ironic2:~/devstack$

stack@ironic2:~/devstack$ ironic node-show 043173f6-1aed-4931-a0c4-8ff0389ae51e
+------------------------+--------------------------------------+
| Property | Value |
+------------------------+--------------------------------------+
| chassis_uuid | None |
| console_enabled | False |
| created_at | 2014-04-16T03:21:09+00:00 |
| driver | fake |
| driver_info | {} |
| extra | {} |
| instance_uuid | None |
| last_error | None |
| maintenance | False |
| power_state | None |
| properties | {} |
| provision_state | None |
| reservation | None |
| target_power_state | None |
| target_provision_state | None |
| updated_at | 2014-04-16T03:24:04+00:00 |
| uuid | 043173f6-1aed-4931-a0c4-8ff0389ae51e |
+------------------------+--------------------------------------+

Changed in ironic:
assignee: nobody → Lucas Alvares Gomes (lucasagomes)
Changed in ironic:
importance: Undecided → Medium
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix proposed to ironic (master)

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

Changed in ironic:
status: New → In Progress
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to ironic (master)

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

commit 3132994ebfed6ee574420adb70bd158b159cb4a0
Author: Lucas Alvares Gomes <email address hidden>
Date: Tue Apr 29 11:24:32 2014 +0100

    Fix chassis-node relationship

    The change 3f49758c82619b424f623f71df1ef051e50dda4c removed the chassis_id
    from the Nodes.fields but it turns out that it needs to be present otherwise
    the as_dict() method won't include the chassis_id field when converting
    the Node object to a dictionary before saving it to the db.

    Change-Id: Ice8803a2cc4955c9d9b6d786c450e112be240299
    Closes-Bug: #1308320

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