The goals of this story are the optimization of this audit aiming to
decrease the cpu consumption spike each minute and clean up the code.
Currently, the sysinv-agent service has just one periodic task to audit
a set of components (storage inventory, memory, lldp and so on).
Following the changes [1] and [2], this story split the
_agent_audit task in two: _lldp_audit and _inventory_audit. Each one
with its own interval value.
This story also removes the call for the _audit_tpm_device which isn't
supported anymore. Furthermore, withdraws the RemoteError exception
snippets once that are deprecated. And yet, creates the
_initial_config_and_report method which gathers the host initialization
code. This method is called every cycle until the initialization is
completed. After that refactoring, it just needs to check two flags
before proceeding to carry out the inventory. Also, this story removes
the code related to the subfunctions alarm raise/clear that is
deprecated.
TEST PLAN:
PASS: AIO-SX: Manually replace this file into a Debian installation
PASS: AIO-SX: Rebuild the whole system with the changes without
crashes (including bootstrap and host unlock - CentOS)
PASS: AIO-SX: Verify if the both audits are being called
PASS: AIO-SX: Look for errors in sysinv logs
Story: 2010087
Task: 45715
Depends-On:
[1] https://review.opendev.org/c/starlingx/stx-puppet/+/849561
[2] https://review.opendev.org/c/starlingx/config/+/848330
Change-Id: I5ac72b36c31092377eefbaaa1fbe5d8bf11c5c37
Signed-off-by: Marcos Paulo Oliveira Silva
<Marcos.PauloOliveiraSilva@windriver.com>