Comment 2 for bug 1998131

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

Reviewed: https://review.opendev.org/c/starlingx/config/+/865879
Committed: https://opendev.org/starlingx/config/commit/bb3347ac8abae8d2084e8a2e5382c2c349ede236
Submitter: "Zuul (22348)"
Branch: master

commit bb3347ac8abae8d2084e8a2e5382c2c349ede236
Author: Andre Fernando Zanella Kantek <email address hidden>
Date: Mon Nov 28 13:36:50 2022 -0500

    Use numerical ID to compare NIC's vendor and device

    Was detected an ethernet port alarm "300.001: OS reports vendor or
    device-id without a match on DB for port" at the last step of
    upgrade.

    To determine if a different card was inserted we compare: MAC
    address, Device ID and Vendor ID to update the DB. The problem is
    that we are using the entire string to compare.

    The previous CentOS version saved the Device-ID as (e.g.) "Device
    [1593]", but now on Debian the NIC is announcing "Ethernet
    Controller E810-C for SFP [1593]". We need to compare only the
    numerical ID "1593"

    The correction gets only the numerical ID for comparision, discarding
    the description, to make sure to only act if a NIC replacement is
    present.

    A new logic to update only the vendor and/or device description, on
    existing hardware.

    Test Plan
    [PASS] AIO-SX upgrade done in VirtualBox
    [PASS] unit test to cover this case

    Closes-Bug: 1998131

    Signed-off-by: Andre Fernando Zanella Kantek <email address hidden>
    Change-Id: I1b42e68dc81cb96875994d057927aeccf14d4ad7