config/sysinv/sysinv
Erickson Silva de Oliveira 0c852b54fb Fix condition for deleting database partition
In change [1], a restore in progress check was added, however
the flag used for this is removed at the end of the restore
playbook that is executed on controller-0, causing possible
problems if agents on other nodes send a report with incomplete
information due to restore.

To resolve this, the _verify_restore_in_progress() function
was used, which queries the restore status in the database,
and is only modified when executing the "system restore-complete"
command. This way we will know that from then on the agent's
reports can be considered.

Additionally, the “system host-reinstall” command has also
been observed to cause similar issues if run on a restored system.

To prevent this from happening, another condition was added,
which checks if inv_state is "reinstalling".

[1]: https://review.opendev.org/c/starlingx/config/+/899510

Test-Plan:
  PASS: AIO-SX fresh install
  PASS: Standard fresh install
  PASS: create/modify/delete a partition in the
        controller-0/controller-1/compute-0 followed by a reboot and check the status
        with 'system host-disk-partition-list'.
  PASS: Restart of sysinv-conductor and/or sysinv-agent services
        during puppet manifest applying.
  PASS: AIO-SX Backup and Restore
  PASS: Standard Backup and Restore

Closes-Bug: 2061170

Change-Id: I6c142439c9f13dcdeb493892a5a9283f6a1e2d00
Signed-off-by: Erickson Silva de Oliveira <Erickson.SilvadeOliveira@windriver.com>
2024-04-12 14:31:49 -03:00
..
centos Merge sysinv_fpga_agent with sysinv_agent 2022-10-03 14:12:28 -04:00
debian Add IPsec certificates renewal cron job 2024-03-13 10:46:24 -04:00
opensuse Merge sysinv_fpga_agent with sysinv_agent 2022-10-03 14:12:28 -04:00
sysinv Fix condition for deleting database partition 2024-04-12 14:31:49 -03:00
.gitignore StarlingX open source release updates 2018-05-31 07:35:52 -07:00
PKG-INFO StarlingX open source release updates 2018-05-31 07:35:52 -07:00