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.
Reviewed: https:/ /review. opendev. org/c/starlingx /config/ +/908520 /opendev. org/starlingx/ config/ commit/ 0b8956bf1fe6ce3 d398184a304e8ec f7e14810c1
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 0b8956bf1fe6ce3 d398184a304e8ec f7e14810c1
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 platform/ .initial_ worker_ config_ complete and run/.worker_ config_ complete files until puppet worker manifest
/etc/
/var/
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:
driver: igb_uio, vf-driver:igb_uio, N:1), once node list/show for after-boot
PASS: Restore node from backup (ACC100 device config::
come back up, check host-device-
update time and num_vfs = 1.
Closes-Bug: 2053149 db9128859e49df2 0ed2ecd86af
Change-Id: If35ae3c9359139
Signed-off-by: Tara Nath Subedi <email address hidden>