distcloud/distributedcloud/dcmanager/state
Christopher Souza a7ca6368cd Trigger subcloud audits when identity status is updated
In this commit, the trigger of the audits were removed from the manage
action and moved to trigger only when the identity endpoint is updated
from unknown to other statuses. This was done to avoid a race condition
between dcdbsync and the subcloud audit where the subcloud audit would
fail to role not found.
The first_identity_sync_complete field was add to not allow the audit
of any endpoint to be done before the first identity sync is complete,
in order to avoid keystone errors.

Test Plan:
PASS: Add 250 subclouds and manage them all at the same time
and verify that all subclouds went in-sync without errors from
any endpoint audit.
PASS: Unmanage a subcloud and manage it back and verify that
the subcloud is in-sync
PASS: Create a role to update the identity status from in-sync -> out-of-sync
-> in-sync and verify that no extra subcloud audits were triggered.
PASS: Re-install a subcloud that was managed and then manage that
subcloud and verify that the others endpoints audit were only triggered
after the identity sync was complete

Closes-Bug: 2019857

Signed-off-by: Christopher Souza <Christopher.DeOliveiraSouza@windriver.com>
Change-Id: Ied7a3ed99112daeb7af9dd39ad7780c60f451e0e
2023-05-22 19:50:38 -03:00
..
README.rst Refactor portion of dcmanager into dcmanager-state process 2022-01-27 16:33:41 -05:00
__init__.py Refactor portion of dcmanager into dcmanager-state process 2022-01-27 16:33:41 -05:00
service.py Set open file limit for dcmanager services 2023-03-30 16:52:13 -03:00
subcloud_state_manager.py Trigger subcloud audits when identity status is updated 2023-05-22 19:50:38 -03:00

README.rst

Service

DC Manager State Service has responsibility for:

Subcloud state updates coming from dcmanager-manager service

service.py:

run DC Manager State Service in multi-worker mode, and establish RPC server

subcloud_state_manager.py:

Provide subcloud state updates