AgentDeploy's validate code crashes on exception.

Bug #1375042 reported by Yitzchak Lockerman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
High
Dmitry Tantsur

Bug Description

I am using ironic from Github (downloaded 9/28/2014).

When trying to validate with the Agent Driver, a failure would lead to the following error. This, in return, means that the user can't see what causes the validation to fail.

2014-09-28 16:04:11.905 18421 DEBUG ironic.conductor.manager [-] RPC validate_driver_interfaces called for node 0ea21f0b-d177-4e3a-abf7-36a16e304a23. validate_driver_interfaces /usr/local/lib/python2.7/dist-packages/ironic/conductor/manager.py:853
2014-09-28 16:04:11.933 18421 ERROR oslo.messaging.rpc.dispatcher [-] Exception during message handling: __init__() takes at most 2 arguments (3 given)
2014-09-28 16:04:11.933 18421 TRACE oslo.messaging.rpc.dispatcher Traceback (most recent call last):
2014-09-28 16:04:11.933 18421 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 134, in _dispatch_and_reply
2014-09-28 16:04:11.933 18421 TRACE oslo.messaging.rpc.dispatcher incoming.message))
2014-09-28 16:04:11.933 18421 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 177, in _dispatch
2014-09-28 16:04:11.933 18421 TRACE oslo.messaging.rpc.dispatcher return self._do_dispatch(endpoint, method, ctxt, args)
2014-09-28 16:04:11.933 18421 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 123, in _do_dispatch
2014-09-28 16:04:11.933 18421 TRACE oslo.messaging.rpc.dispatcher result = getattr(endpoint, method)(ctxt, **new_args)
2014-09-28 16:04:11.933 18421 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo/messaging/rpc/server.py", line 138, in inner
2014-09-28 16:04:11.933 18421 TRACE oslo.messaging.rpc.dispatcher return func(*args, **kwargs)
2014-09-28 16:04:11.933 18421 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/ironic/conductor/manager.py", line 862, in validate_driver_interfaces
2014-09-28 16:04:11.933 18421 TRACE oslo.messaging.rpc.dispatcher iface.validate(task)
2014-09-28 16:04:11.933 18421 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/ironic/drivers/modules/agent.py", line 235, in validate
2014-09-28 16:04:11.933 18421 TRACE oslo.messaging.rpc.dispatcher task.node.uuid)
2014-09-28 16:04:11.933 18421 TRACE oslo.messaging.rpc.dispatcher TypeError: __init__() takes at most 2 arguments (3 given)
2014-09-28 16:04:11.933 18421 TRACE oslo.messaging.rpc.dispatcher

The attached patch fixed the error for me.

Revision history for this message
Yitzchak Lockerman (ylockerman) wrote :
Revision history for this message
Dmitry Tantsur (divius) wrote :

Good catch, that's bad

Changed in ironic:
status: New → Triaged
importance: Undecided → High
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/124675

Changed in ironic:
assignee: nobody → Dmitry "Divius" Tantsur (divius)
status: Triaged → In Progress
Dmitry Tantsur (divius)
Changed in ironic:
milestone: none → juno-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

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

commit 0b19d02e64bf4ffdbace301ff65d789fa118d476
Author: Dmitry Tantsur <email address hidden>
Date: Mon Sep 29 09:29:48 2014 +0200

    Fix typo in agent validation code

    Change-Id: I3309af3627700e3d051042049b8eacac1c632bd4
    Closes-Bug: #1375042

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: juno-rc1 → 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.