DHCP options are not updated correctly during AgentDeploy's take_over

Bug #1428199 reported by Vladyslav Drok
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Undecided
Vladyslav Drok

Bug Description

AgentDeploy.take_over method has the following code:

 provider = dhcp_factory.DHCPFactory()
 provider.update_dhcp(task, CONF.agent.agent_pxe_bootfile_name)

which seems to be incorrect, as second argument to update_dhcp should be a list of dicts, as mentioned in https://github.com/openstack/ironic/blob/master/ironic/common/dhcp_factory.py#L85-L90 :

 def update_dhcp(self, task, dhcp_opts):
     """Send or update the DHCP BOOT options for this node.
     :param task: A TaskManager instance.
     :param dhcp_opts: this will be a list of dicts, e.g.
      ::
       [{'opt_name': 'bootfile-name',
         'opt_value': 'pxelinux.0'},
        {'opt_name': 'server-ip-address',
         'opt_value': '123.123.123.456'},
        {'opt_name': 'tftp-server',
         'opt_value': '123.123.123.123'}]
     """

Tags: agent
Vladyslav Drok (vdrok)
description: updated
Changed in ironic:
assignee: nobody → Vladyslav Drok (vdrok)
tags: added: agent
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/161717

Changed in ironic:
status: New → In Progress
Revision history for this message
Jim Rollenhagen (jim-rollenhagen) wrote :

So turns out that take_over is only for active instances. Since the agent deploy driver only does local boot right now, there's no need for take_over to do anything (hence the current version of the patch).

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

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

commit bc0b716383a528f6326ccd4055047dc960067af9
Author: Vladyslav Drok <email address hidden>
Date: Thu Mar 5 15:57:13 2015 +0200

    Fix take over for agent driver

    At the moment there is no need to update DHCP options during take
    over for agent driver, hence delete this update.

    Closes-bug: #1428199
    Change-Id: Id68d3a89cb72e11e8a52ea69e84816aea2cbf2b1

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