Fix: Ensure dc-cert alarm is cleared on subcloud delete
This fix updates the subcloud delete operation to clear both the
'offline' and dc-cert 'out-of-sync' alarms before before deleting a
subcloud.
This handles the case where cert-mon regains connectivity to
an offline subcloud with underlying SSL cert issues regains
before the subcloud is deleted.
Other minor changes:
- fixed indentation in _prepare_for_deployment
- rename _update_online_managed_subcloud to
_do_update_subcloud_endpoint_status since this method also
operates on offline/unmanaged subclouds (for dc-cert case)
- clarify ordering for a complex 'if' statement updating
subcloud sync status, and update local documentation
covering how the rules are applied
Test Plan:
PASS:
- Verify fault behaviour for the following:
- Manage a new subcloud.
- Unmanage a subcloud. Re-manage it.
- Attempt to delete an online subcloud (not allowed)
- Verify subcloud manage/unmanage/delete with a non dc-cert
endpoint out-of sync (used patching status)
- Delete subcloud with all dc endpoints 'unknown' (default case)
- Delete subcloud with dc-cert endpoint 'out-of-sync'
- verify that the subcloud out-of-sync alarm is cleared
Reviewed: https:/ /review. opendev. org/c/starlingx /distcloud/ +/820534 /opendev. org/starlingx/ distcloud/ commit/ 2beccc63e1157ff a603b806d41a1dc 8811977c95
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 2beccc63e1157ff a603b806d41a1dc 8811977c95
Author: Kyle MacLeod <email address hidden>
Date: Fri Dec 3 16:25:45 2021 -0500
Fix: Ensure dc-cert alarm is cleared on subcloud delete
This fix updates the subcloud delete operation to clear both the
'offline' and dc-cert 'out-of-sync' alarms before before deleting a
subcloud.
This handles the case where cert-mon regains connectivity to
an offline subcloud with underlying SSL cert issues regains
before the subcloud is deleted.
Other minor changes: for_deployment online_ managed_ subcloud to do_update_ subcloud_ endpoint_ status since this method also
- fixed indentation in _prepare_
- rename _update_
_
operates on offline/unmanaged subclouds (for dc-cert case)
- clarify ordering for a complex 'if' statement updating
subcloud sync status, and update local documentation
covering how the rules are applied
Test Plan:
PASS: unmanage/ delete with a non dc-cert
- Verify fault behaviour for the following:
- Manage a new subcloud.
- Unmanage a subcloud. Re-manage it.
- Attempt to delete an online subcloud (not allowed)
- Verify subcloud manage/
endpoint out-of sync (used patching status)
- Delete subcloud with all dc endpoints 'unknown' (default case)
- Delete subcloud with dc-cert endpoint 'out-of-sync'
- verify that the subcloud out-of-sync alarm is cleared
Closes-Bug: 1951506
Change-Id: I082cc85aeb2d85 febdcb82d7bac87 b046f1dd5a4
Signed-off-by: Kyle MacLeod <email address hidden>