StarlingX Distributed Cloud
Go to file
Li Zhu 7ad78ea2ae Allow rehome related data update when subcloud migration fails
If the subcloud rehome_data contains an incorrect bootstrap-address in
site A and the user migrates the corresponding peer group to site B,
the migration would fail. Subsequently, it will have the 'rehome-failed'
deploy-status in site B and 'rehome-pending' deploy-status in site A.
Then the user won't be able to update the bootstrap-address in either
site due to the following restrictions:
a) Primary site (site A) is not the current leader of the peer group;
b) Update in non-primary site (site B) is not allowed.

To fix this issue, the following changes are made:
1. In the non-primary site, if the subcloud deploy-status is
rehome-failed and the primary site is unavailable, updating
the bootstrap-values and bootstrap-address will be allowed, and the PGA
will be marked as out-of-sync.
2. Modify audit to automatically sync the rehome_data from non-primary
site to primary site if subcloud in the non-primary site is managed and
online and the PGA is out-of-sync.

Additional fix for the system_leader_id issue: When migrating SPG from
one site to another, if all of the subclouds rehome fail, the leader id
of the SPG in the target site has already been updated to the target
site's UUID. However, in the source site, the leader id is not updated
to the target UUID. The fix ensures that regardless of the migration's
success, only if the migration completes, the leader id in both sites
should be updated to the target UUID.

Test plan:
Pre-Steps: 1. Create the system peer from Site A to Site B
           2. Create System peer from Site B to Site A
           3. Create the subcloud peer group in the Site A
           4. Add a subcloud with an incorrect bootstrap-address
              to the peer group
           5. Create peer group association to associate system peer
              and subcloud peer group - Site A
           6. Check current sync status in sites A and B. Verify
              they are 'in-sync'.
           7. Run migration for the subcloud peer group from Site B.
           8. Verify 'rehome-failed' deploy-status in both sites.
PASS: Verify that the bootstrap-address can be updated in site B when
      site A is down, and the PGA sync status is set to out-of-sync
      in site B. Also, verify that the audit will sync the rehome_data
      to site A and change back the PGA to in-sync once the reattempt of
      migration is successful and site A is up.
PASS: Verify that the bootstrap-values and bootstrap-address are
      the only fields that can be updated in site B when site A is down.
PASS: Verify that the update of bootstrap-address was rejected in site B
      when site A is up.
PASS: Verify that even if all of the subclouds in an SPG experience
      rehome failures, the system_leader_id in both sites is updated to
      the target's UUID.
PASS: Verify that when site A is always online or recovered during
      the migration to site B, the subcloud deploy_status in both sites
      is "rehome-failed" after the migration completes. In this
      scenario, site A can migrate the subcloud back, even though it's
      still failed. However, after correcting the bootstrap-address in
      site A, the reattempt of migration in site A succeeds.

Closes-Bug: 2057981

Change-Id: I999dbf035e29950fd823e9cdb087160ce40fd4ca
Signed-off-by: lzhu1 <li.zhu@windriver.com>
2024-03-20 11:27:56 -04:00
api-ref/source Display prestage status and versions in subcloud list 2024-01-26 14:09:19 -05:00
distributedcloud Allow rehome related data update when subcloud migration fails 2024-03-20 11:27:56 -04:00
doc Subcloud Name Reconfiguration 2023-09-07 10:30:06 -03:00
python/python3-redfish/debian python3-redfish: fix URL spelling 2023-11-14 17:15:16 -05:00
releasenotes Switch to newer openstackdocstheme and reno versions 2020-06-04 14:18:06 +02:00
tools/gate Adding py39 gate and removing py36 gates from zuul 2021-10-28 15:26:34 -05:00
.gitignore [Doc] OpenStack API Reference Guide 2018-09-25 08:18:08 -07:00
.gitreview OpenDev Migration Patch 2019-04-19 19:52:44 +00:00
.mailmap StarlingX open source release updates 2018-08-07 11:51:21 -04:00
.zuul.yaml Clean up outdated configs in tox.ini and .zuul.yaml 2023-07-19 11:43:30 -03:00
CONTRIBUTING.rst StarlingX open source release updates 2018-08-07 11:51:21 -04:00
CONTRIBUTORS.wrs StarlingX open source release updates 2018-08-07 11:51:21 -04:00
HACKING.rst Update setup.cfg to align with StarlingX project 2019-01-07 16:34:24 +00:00
README_DC Update location of openrc in readme 2019-03-15 10:56:03 -05:00
bindep.txt Fix openstack-tox jobs for DC repo 2022-11-21 16:58:49 +00:00
centos_build_layer.cfg Build layering, add layer build config file 2019-11-08 08:40:22 +08:00
centos_dev_docker_images.inc OpenStack-Keystone Proxy Containerization 2019-11-04 14:36:50 -05:00
centos_dev_wheels.inc OpenStack-Keystone Proxy Containerization 2019-11-04 14:36:50 -05:00
centos_iso_image.inc Keystone token and resource caching 2020-03-23 21:31:04 -04:00
centos_pkg_dirs Update files for relocated repo 2019-11-04 14:36:51 -05:00
centos_stable_docker_images.inc OpenStack-Keystone Proxy Containerization 2019-11-04 14:36:50 -05:00
centos_stable_wheels.inc Update files for relocated repo 2019-11-04 14:36:51 -05:00
debian_build_layer.cfg Add debian_build_layer.cfg file 2021-10-05 14:07:18 -04:00
debian_dev_docker_images.inc Port stx-keystone-api-proxy image to debian 2022-11-21 17:46:41 +00:00
debian_dev_wheels.inc Port stx-keystone-api-proxy image to debian 2022-11-21 17:46:41 +00:00
debian_iso_image.inc Decontainerizing rvmc.py and Modular Integration in DC Repo 2023-11-10 18:18:23 -05:00
debian_pkg_dirs Decontainerizing rvmc.py and Modular Integration in DC Repo 2023-11-10 18:18:23 -05:00
debian_stable_docker_images.inc Port stx-keystone-api-proxy image to debian 2022-11-21 17:46:41 +00:00
debian_stable_wheels.inc Port stx-keystone-api-proxy image to debian 2022-11-21 17:46:41 +00:00
tox.ini Fix tox constraints and bandit 2024-01-22 15:07:43 -03:00