config/sysinv/sysinv/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
..
agent Report port and device inventory after the worker manifest 2024-03-26 10:37:56 -04:00
api Merge "Fix usage of address_get_by_name" 2024-04-05 22:24:24 +00:00
cert_alarm Change cert-alarm service audit behavior 2024-03-05 12:52:18 -05:00
cert_mon Filter cert-mon for geo-redundancy in audit and DC_CertWatcher 2024-04-04 15:36:06 -04:00
cmd Implement IPsec Cert-Renewal Operation 2024-03-08 12:24:02 -03:00
common Merge "Make minimum Kubernetes version field mandatory" 2024-04-11 13:58:16 +00:00
conductor Fix condition for deleting database partition 2024-04-12 14:31:49 -03:00
db Fix runtime_config_get method to avoid type error 2024-03-21 17:12:17 -03:00
helm Merge "Fix delete process to apps that have charts disabled" 2024-03-07 13:43:22 +00:00
ipsec_auth Add Intermediate CA support to IPsec configuration 2024-04-09 16:01:53 -03:00
loads Update extract playbooks target directory 2023-05-02 13:50:36 +00:00
objects New RESTful API and DB schema for network to address-pools. 2024-03-06 07:34:14 -03:00
openstack Restore openstack/common/context file 2023-05-24 12:43:16 +00:00
puppet Add retry robustness for Kubernetes upgrade control plane 2024-03-19 08:49:36 -04:00
tests Merge "Fix usage of address_get_by_name" 2024-04-05 22:24:24 +00:00
zmq_rpc New RESTful API and DB schema for network to address-pools. 2024-03-06 07:34:14 -03:00
__init__.py Fix tox certificate issues in python2 2021-11-18 15:14:51 -06:00
_i18n.py Eliminate sdist step from sysinv zuul 2021-04-12 09:34:17 -05:00
netconf.py Fix bad syntax in requirements.txt file 2021-09-14 09:15:56 -05:00
sanity_coverage.py Fix tox-docs failing sphinx 2022-05-31 13:56:30 +00:00
version.py Remove python2 jobs from zuul for this repo 2023-02-07 19:36:45 +00:00