better link state detection

Bug #1555669 reported by Christopher Brown
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
os-net-config
Fix Released
Undecided
Christopher Brown

Bug Description

Currently _is_active_nic performs multiple checks to see if a link is live.

However some hardware, e.g. Lenovo x3850 x6, has a built-in Ethernet over USB device which reports as follows:

2: enp0s29u1u1u5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
    link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
    inet 169.254.95.120/24 brd 169.254.95.255 scope link dynamic enp0s29u1u1u5
       valid_lft 356sec preferred_lft 356sec
    inet6 fe80::xx:xxxx:xxxx:xxxx/64 scope link
       valid_lft forever preferred_lft forever

Ethtool further reports the link as active:

[root@overcloud-controller-1 heat-admin]# ethtool enp0s29u1u1u5
Settings for enp0s29u1u1u5:
        Current message level: 0x00000007 (7)
                               drv probe link
        Link detected: yes

This breaks the automatic naming convention in tripleo where nic1, nic2 etc is used and results in a failed deployment.

This nic passes the above tests in that it is:

a) not named lo
b) has a device subdir
c) reports having a carrier signal
d) reports having an address, albeit a link-local/169 address

I am therefore proposing that the carrier test be changed to check operstate for UP.

Patch to follow.

Tags: tripleo
Changed in os-net-config:
assignee: nobody → Christopher Brown (snecklifter)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-net-config (master)

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

Changed in os-net-config:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-net-config (master)

Reviewed: https://review.openstack.org/291243
Committed: https://git.openstack.org/cgit/openstack/os-net-config/commit/?id=8792d74c9115d48f1756c2a77f5ff4ed4a001cdf
Submitter: Jenkins
Branch: master

commit 8792d74c9115d48f1756c2a77f5ff4ed4a001cdf
Author: Christopher Brown <email address hidden>
Date: Thu Mar 10 15:18:33 2016 +0000

    Use interface operstate to determine nic status

    Fixes lp bug 1555669

    Currently _is_active_nic performs multiple checks to see if a link is live.
    However some hardware such as Ethernet over USB devices fulfil this criteria.
    This causes tripleo deployments to fail if automatic interface naming is used.
    We can therefore use operstate to determine if the link is actually up.
    https://www.kernel.org/doc/Documentation/networking/operstates.txt
    This patch implements this.

    Implements: better link state detection
    Closes-Bug: #1555669
    Change-Id: I0bdd0c987f4f177935df4f7cdcc70f4d99c988a5
    Signed-off-by: Christopher Brown <email address hidden>

Changed in os-net-config:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/os-net-config 5.0.0.0b1

This issue was fixed in the openstack/os-net-config 5.0.0.0b1 development milestone.

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.