Nailgun agent mistakenly reports PXE interface as non-PXE after the deployment

Bug #1581517 reported by Vladimir Kuklin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
High
Vladimir Kuklin
Mitaka
Fix Released
High
Vladimir Kuklin
Newton
Fix Committed
High
Vladimir Kuklin

Bug Description

This piece of nailgun-agent code

"int_meta[:pxe] = admin_mac == int_meta[:mac]" does not take into consideration that interface will become a part of a bridge.

The fix is trivial, although it should also respect the bonds:

               re = perm_addr.match(/(00(:00){5})+/).nil? ? /[0-9a-f]+(:[0-9a-f]+){5}$/ : nil
             end
             int_meta[:mac] = perm_addr.match(re)[0] rescue addr
- int_meta[:pxe] = admin_mac == int_meta[:mac]
+ int_meta[:pxe] = false
+ if File.exist? "/sys/class/net/#{int_meta[:name]}/brport"
+ bridge_mac = nil
+ File.open("/sys/class/net/#{int_meta[:name]}/brport/bridge/address") do |f|
+ bridge_mac = f.read.chomp.downcase
+ end
+ int_meta[:pxe] = admin_mac == bridge_mac
+ else
+ int_meta[:pxe] = admin_mac == int_meta[:mac]
+ end
             begin
               int_info = Rethtool::InterfaceSettings.new(int)
               int_meta[:driver] = int_info.driver

Revision history for this message
Vladimir Kuklin (vkuklin) wrote :

ii nailgun-agent 10.0.0-1~u14.04+mos170 all collects the node hardware data and submits it to the Fuel master

tags: added: feature-unlocked-settings-tab life-cycle-management
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-nailgun-agent (master)

Fix proposed to branch: master
Review: https://review.openstack.org/319867

Changed in fuel:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-nailgun-agent (master)

Reviewed: https://review.openstack.org/319867
Committed: https://git.openstack.org/cgit/openstack/fuel-nailgun-agent/commit/?id=5fa721206baf3fad3fec424b0cdbe5013238c195
Submitter: Jenkins
Branch: master

commit 5fa721206baf3fad3fec424b0cdbe5013238c195
Author: Vladimir Kuklin <email address hidden>
Date: Mon May 23 14:42:56 2016 +0300

    Fix post-deployment pxe interface detection

    W/o this fix node do not respond with proper PUT for pxe interface
    as the pxe interface gets plugged into br-fw-admin bridge and
    it is not reported as pxe-related one.

    We should check if the interface is a part of bond and/or bridge
    configuration and respond correctly.

    Change-Id: Ifc1c396b0945fc5a42165b969b6924dcff5975b2
    Closes-bug: #1581517

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-nailgun-agent (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/323337

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-nailgun-agent (stable/mitaka)

Reviewed: https://review.openstack.org/323337
Committed: https://git.openstack.org/cgit/openstack/fuel-nailgun-agent/commit/?id=d0ffb89a410017804f23727517025b392190ef6e
Submitter: Jenkins
Branch: stable/mitaka

commit d0ffb89a410017804f23727517025b392190ef6e
Author: Vladimir Kuklin <email address hidden>
Date: Mon May 23 14:42:56 2016 +0300

    Fix post-deployment pxe interface detection

    W/o this fix node do not respond with proper PUT for pxe interface
    as the pxe interface gets plugged into br-fw-admin bridge and
    it is not reported as pxe-related one.

    We should check if the interface is a part of bond and/or bridge
    configuration and respond correctly.

    Change-Id: Ifc1c396b0945fc5a42165b969b6924dcff5975b2
    Closes-bug: #1581517
    (cherry picked from commit 5fa721206baf3fad3fec424b0cdbe5013238c195)

tags: added: on-verification
Revision history for this message
Andrey Lavrentyev (alavrentyev) wrote :

Wasn't able to reproduce on 9.0-mos #467

[root@nailgun ~]# shotgun2 short-report | head -n8
cat /etc/fuel_build_id:
 467
cat /etc/fuel_build_number:
 467
cat /etc/fuel_release:
 9.0
cat /etc/fuel_openstack_version:
 mitaka-9.0

tags: removed: on-verification
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.