Comment 1 for bug 2053149

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

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

commit 0b8956bf1fe6ce3d398184a304e8ecf7e14810c1
Author: Tara Subedi <email address hidden>
Date: Thu Feb 8 14:51:50 2024 -0500

    Report port and device inventory after the worker manifest

    The SR-IOV configuration of a device is not retained across reboots,
    until puppet manifests bind/enable completes. The sysinv-agent should
    not report device inventory at any time after it is started, it should
    wait until puppet worker manifest completes.

    Upon reboot, SR-IOV configuration (of ACC100) (sriov_numvfs=0) is
    updated to intended configuration by puppet worker manifest. In this
    case, there is a small chance that the sysinv-agent audit (every 60
    seconds) will run before the driver configuration. Since the agent will
    only actually report the port and device inventory once, the SR-IOV
    configuration data is not accurately reflected in the db, thus
    requiring additional lock/unlock(s) to force correction.

    After restore and reboot, there was no
    /etc/platform/.initial_worker_config_complete and
    /var/run/.worker_config_complete files until puppet worker manifest
    completes. sysinv-agent audit happened to read device inventory before
    the driver configuration (i.e. before worker manifest completed), thus
    not accurately reflected in the db.

    This commit fixes such that port and device configuration are only
    reported after the worker manifest has completed.

    TEST PLAN:
       PASS: Restore node from backup (ACC100 device config::
             driver:igb_uio, vf-driver:igb_uio, N:1), once node
             come back up, check host-device-list/show for after-boot
             update time and num_vfs = 1.

    Closes-Bug: 2053149
    Change-Id: If35ae3c9359139db9128859e49df20ed2ecd86af
    Signed-off-by: Tara Nath Subedi <email address hidden>