Pxe driver should validate that at least one port has vif_port_id

Bug #1362060 reported by Ramakrishnan G (rameshg87)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Medium
Dmitry Tantsur

Bug Description

Currently pxe driver uses neutron to boot the baremetal node. Unless bootfile-name, server-ip-address, tftp-server parameters are added to at least one neutron port, the node is not going to get pxe-booted (unless external dhcp providers are supported).

So pxe driver should validate if at least one port has vif_port_id.

Tags: pxe
Revision history for this message
Dmitry Tantsur (divius) wrote :

Note: as we support pluggable DHCP providers, this probably requires some validation code in DHCP plugins. Likely this change will require a spec.

summary: - Pxe driver should validate if atleast one port has vif_port_id
+ Pxe driver should validate that at least one port has vif_port_id
description: updated
Changed in ironic:
status: New → Triaged
importance: Undecided → Medium
aeva black (tenbrae)
tags: added: pxe
Revision history for this message
aeva black (tenbrae) wrote :

As Dmitry pointed out, we support pluggable DHCP providers -- including a no-op case, where there is a static external dhcp service. The PXE driver itself shouldn't depend upon vif_port_id, but the neutron DHCP plugin should do that check.

This could be done in ironic.dhcp.neutron.NeutronDHCPApi.update_dhcp_opts(self, task, options) without changing any interfaces -- the "task" parameter includes references to all the port objects. As this is a minor change isolated to a single pluggable class, to do its own validation, I don't think it needs a spec.

Changed in ironic:
milestone: none → juno-rc1
Dmitry Tantsur (divius)
Changed in ironic:
assignee: nobody → Dmitry "Divius" Tantsur (divius)
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/123108

Changed in ironic:
status: Triaged → In Progress
Revision history for this message
Ruby Loo (rloo) wrote :

Just wondering. Was/is the bug to get the appropriate validate() method to check for this, to prevent a deploy from even being started?

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

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

commit a3c4c80bbf36013a43c01df2d76c18ec2d7ea767
Author: Dmitry Tantsur <email address hidden>
Date: Mon Sep 22 14:24:48 2014 +0200

    Neutron DHCP implementation to raise exception if no ports have VIF

    Currently only warning is risen, though deploy can't succeed in this
    case for both PXE and Agent drivers.

    Change-Id: If57a33818f5da820277c94b7b0ae642d29a698ce
    Closes-Bug: #1362060

Changed in ironic:
status: In Progress → Fix Committed
Revision history for this message
Dmitry Tantsur (divius) wrote :

Ruby, well, I implemented it exactly as Deva suggested, I think. Your suggestion makes a lot of sense, but also require changing DHCP provider interface to have some validate() as well, so probably not right now. Or what do you think?

At least now we won't hang during deploy waiting for node that'll never boot.

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.