Fix unable to determine the SPG sync state if one site is down
If Site1 (the local site) is down while setting up the protection
group, the subcloud peer group sync state is unable to determine.
This commit will automatically create the non-primary association on
Site2 (the peer site) when creating a primary association, and
update the sync state to the non-primary association. Then the
operator can check the sync state on Site2 if Site1 is down.
Test Plan:
- PASS: Create a primary association and check the non-primary association on peer site. It was created, and sync_status
will follow the primary association's sync_status.
- PASS: Delete the primary association and check the non-primary association on peer site. It was deleted.
- PASS: If you restart the "dcmanager-manager service" in the local
site while the association sync_status is in "syncing", the sync_status will transition to "failed".
- PASS: Create a primary association and wait for the sync_status
change to "in-sync". Delete the subcloud peer group on peer
site, the deletion will fail because it is associating to
the non-primary association.
Reviewed: https:/ /review. opendev. org/c/starlingx /distcloud/ +/903928 /opendev. org/starlingx/ distcloud/ commit/ e4227317606d476 b1a005e8253f25a 907e8486bf
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit e4227317606d476 b1a005e8253f25a 907e8486bf
Author: Zhang Rong(Jon) <email address hidden>
Date: Tue Dec 19 15:53:06 2023 +0800
Fix unable to determine the SPG sync state if one site is down
If Site1 (the local site) is down while setting up the protection
group, the subcloud peer group sync state is unable to determine.
This commit will automatically create the non-primary association on
Site2 (the peer site) when creating a primary association, and
update the sync state to the non-primary association. Then the
operator can check the sync state on Site2 if Site1 is down.
Test Plan:
associatio n on peer site. It was created, and sync_status
associatio n on peer site. It was deleted.
sync_ status will transition to "failed".
- PASS: Create a primary association and check the non-primary
will follow the primary association's sync_status.
- PASS: Delete the primary association and check the non-primary
- PASS: If you restart the "dcmanager-manager service" in the local
site while the association sync_status is in "syncing", the
- PASS: Create a primary association and wait for the sync_status
change to "in-sync". Delete the subcloud peer group on peer
site, the deletion will fail because it is associating to
the non-primary association.
Closes-Bug: 2046809
Change-Id: Ia917d0dc7c65fb ea1e222fb52dbec 79fdbe65b65
Signed-off-by: Zhang Rong(Jon) <email address hidden>