better link state detection

Bug #1555669 reported by Christopher Brown on 2016-03-10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
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 brd 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.

Changed in os-net-config:
assignee: nobody → Christopher Brown (snecklifter)

Fix proposed to branch: master

Changed in os-net-config:
status: New → In Progress

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.
    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

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

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers