iboot power driver: unbound variable error

Bug #1411488 reported by Dan Prince
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Low
Dan Prince

Bug Description

I'm seeing occasionally seeing the following types of exceptions when using the iboot power driver:

Oct 17 23:00:16 localhost ironic-conductor[7371]: task.driver.power.reboot(task)
Oct 17 23:00:16 localhost ironic-conductor[7371]: File "/usr/lib/python2.7/site-packages/ironic/conductor/task_manager.py", line 126, in wrapper
Oct 17 23:00:16 localhost ironic-conductor[7371]: return f(*args, **kwargs)
Oct 17 23:00:16 localhost ironic-conductor[7371]: File "/usr/lib/python2.7/site-packages/ironic/drivers/modules/iboot.py", line 213, in reboot
Oct 17 23:00:16 localhost ironic-conductor[7371]: state = _power_status(driver_info)
Oct 17 23:00:16 localhost ironic-conductor[7371]: File "/usr/lib/python2.7/site-packages/ironic/drivers/modules/iboot.py", line 110, in _power_status
Oct 17 23:00:16 localhost ironic-conductor[7371]: % {'node': driver_info['uuid'], 'resp': response})
Oct 17 23:00:16 localhost ironic-conductor[7371]: UnboundLocalError: local variable 'response' referenced before assignment

----

Revision history for this message
Dan Prince (dan-prince) wrote :
Changed in ironic:
assignee: nobody → Dan Prince (dan-prince)
importance: Undecided → Low
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

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

commit 510581ae5ef6080eadad767e609582b6bf770024
Author: Dan Prince <email address hidden>
Date: Thu Jan 8 13:53:35 2015 -0500

    iboot power driver: unbound variable error

    This resolves an UnboundLocalError that can occur in the iboot
    power driver _power_status function. If conn.get_relays()
    fails the response variable may not always get set.

    Closes-bug: #1411488
    Change-Id: Ifff2e7fb636a8b0feb7ee2285c7639882b7e2837

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