power_state set to python object when changing driver_info

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

Bug Description

When changing any field in driver_info, the power_state gets set to a string representation of a python object. To test this, I have created a node with valid information, ensured it had a NULL power state (manual db update to do this...) and then did a simple update via the API:

$ ironic node-show fbe3835c-0dfc-4ec0-a693-44a7b7dd4439
+------------------------+------------------------------------------------------------------------+
| Property | Value |
+------------------------+------------------------------------------------------------------------+
| instance_uuid | None |
| target_power_state | None |
| uuid | fbe3835c-0dfc-4ec0-a693-44a7b7dd4439 |
| driver_info | {u'ssh_username': u'deva', u'ssh_virt_type': u'virsh', u'foo': u'bar', |
| | u'ssh_address': u'192.168.122.1', u'ssh_key_filename': u'/opt/stack |
| | /boot-stack/virtual-power-key', u'foo2': u'bar2'} |
| target_provision_state | None |
| created_at | |
| extra | {} |
| driver | fake_ssh |
| updated_at | |
| power_state | None |
| provision_state | None |
| reservation | |
| properties | {} |
+------------------------+------------------------------------------------------------------------+

$ ironic node-update fbe3835c-0dfc-4ec0-a693-44a7b7dd4439 remove driver_info/foo2
+------------------------+------------------------------------------------------------------------+
| Property | Value |
+------------------------+------------------------------------------------------------------------+
| instance_uuid | None |
| target_power_state | None |
| uuid | fbe3835c-0dfc-4ec0-a693-44a7b7dd4439 |
| driver_info | {u'ssh_username': u'deva', u'ssh_virt_type': u'virsh', u'foo': u'bar', |
| | u'ssh_address': u'192.168.122.1', u'ssh_key_filename': u'/opt/stack |
| | /boot-stack/virtual-power-key'} |
| target_provision_state | None |
| created_at | |
| extra | {} |
| driver | fake_ssh |
| updated_at | |
| power_state | <bound method SSHPower.get_power_state of |
| | <ironic.drivers.modules.ssh.SSHPower object at 0x8cc89ac>> |
| provision_state | None |
| reservation | |
| properties | {} |
+------------------------+------------------------------------------------------------------------+

aeva black (tenbrae)
Changed in ironic:
status: New → Triaged
importance: Undecided → High
Changed in ironic:
assignee: nobody → Lucas Alvares Gomes (lucasagomes)
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/51196

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/51196
Committed: http://github.com/openstack/ironic/commit/012f28d35c3f14acdd8f5cbf073bfa601a09562c
Submitter: Jenkins
Branch: master

commit 012f28d35c3f14acdd8f5cbf073bfa601a09562c
Author: Lucas Alvares Gomes <email address hidden>
Date: Fri Oct 11 13:07:49 2013 +0100

    Fix power_state set to python object repr

    Change-Id: I096bc58bc1e6349d1a0f87dbad4b8ce40dc2cc09
    Closes-Bug: #1237678

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