Node deployment when dhcp_provider=none is broken

Bug #1434852 reported by Julia Kreger
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
High
Julia Kreger

Bug Description

Attempting to deploy a local testing VM with Bifrost has revealed that node deployment with "dhcp_provider=none" appears to be broken.

2015-03-21 12:47:25.164 31163 DEBUG ironic.common.states [-] Exiting old state 'deploying' in response to event 'fail' on_exit /usr/local/lib/python2.7/dist-packages/ironic/common/states.py:177
2015-03-21 12:47:25.164 31163 DEBUG ironic.common.states [-] Entering new state 'deploy failed' in response to event 'fail' on_enter /usr/local/lib/python2.7/dist-packages/ironic/common/states.py:183
2015-03-21 12:47:25.174 31163 WARNING ironic.conductor.manager [-] Error in deploy of node a8cb6624-0d9f-c882-affc-046ebb96ec01: update_dhcp_opts() takes exactly 3 arguments (4 given)
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 457, in fire_timers
    timer()
  File "/usr/local/lib/python2.7/dist-packages/eventlet/hubs/timer.py", line 58, in __call__
    cb(*args, **kw)
  File "/usr/local/lib/python2.7/dist-packages/eventlet/greenthread.py", line 214, in main
    result = function(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/ironic/conductor/manager.py", line 1897, in do_node_deploy
    _("Failed to deploy. Error: %s"))
  File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 85, in __exit__
    six.reraise(self.type_, self.value, self.tb)
  File "/usr/local/lib/python2.7/dist-packages/ironic/conductor/manager.py", line 1892, in do_node_deploy
    new_state = task.driver.deploy.deploy(task)
  File "/usr/local/lib/python2.7/dist-packages/ironic/conductor/task_manager.py", line 128, in wrapper
    return f(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/ironic/drivers/modules/agent.py", line 282, in deploy
    _do_pxe_boot(task)
  File "/usr/local/lib/python2.7/dist-packages/ironic/drivers/modules/agent.py", line 213, in _do_pxe_boot
    provider.update_dhcp(task, dhcp_opts, ports)
  File "/usr/local/lib/python2.7/dist-packages/ironic/common/dhcp_factory.py", line 94, in update_dhcp
    self.provider.update_dhcp_opts(task, dhcp_opts, ports)
TypeError: update_dhcp_opts() takes exactly 3 arguments (4 given)

This appears to be a result of changes to calls to methods made in ironic/dhcp/neutron.py that were not also made in ironic/dhcp/none.py, which was made in change Ia2500ed5afb72058b4c5e8f41307169381cbce48.

Changed in ironic:
assignee: nobody → Julia Kreger (juliaashleykreger)
status: New → In Progress
Revision history for this message
aeva black (tenbrae) wrote :

Confirmed simply by grep'ing:

$ git grep 'def update_dhcp_opts'
ironic/dhcp/base.py: def update_dhcp_opts(self, task, options):
ironic/dhcp/neutron.py: def update_dhcp_opts(self, task, options, vifs=None):
ironic/dhcp/none.py: def update_dhcp_opts(self, task, options):

Changed in ironic:
importance: Undecided → Critical
milestone: none → kilo-rc1
importance: Critical → 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/166903

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

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

commit 29d6375a72048152404f77cb6de048a65f3cdce6
Author: Julia Kreger <email address hidden>
Date: Sat Mar 21 13:21:38 2015 -0400

    Correct update_dhcp_opts methods

    Due to recent changes in the neutron dhcp driver, an additional
    argument was added to the update_dhcp_opts method. The additional
    argument was not added to the base.py example and the none driver.

    As a result of this, the case of using Ironic with the none driver
    set was broken.

    In the process of adding a new test to detect such issues, additional
    issues were detected resulting in the parameters for
    update_dhcp_opts, update_dhcp_port_opts and update_port_address
    being updated in the base class and the none driver.

    Change-Id: Ia0ee0c2567309a230c2f1c044d50d9156afbf6a1
    Closes-Bug: 1434852

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