Adding a subcloud to a peer group without the --bootstrap-values and --bootstrap-address options should not be posible if rehome_data is not available

Bug #2056796 reported by Gustavo Herzmann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
Gustavo Herzmann

Bug Description

Brief Description
-----------------
Adding a subcloud to a peer group without the --bootstrap-values and --bootstrap-address options should not be posible if rehome_data is not available. If the rehome_data is missing, the association sync will fail, but the failure might not be immediately apparent to the user as the sync_status must be verified, so it's better to fail during the subcloud update command, when adding the subcloud to a peer group.

Severity
--------
Provide the severity of the defect.
<Minor: System/Feature is usable with minor issue>

Steps to Reproduce
------------------
1 - Add a new subcloud (that doesn't have rehome_date populated) to a peer group:
dcmanager subcloud update --peer-group 1 subcloud1

2 - Try to sync the association:
dcmanager peer-group-association sync 1

Expected Behavior
------------------
Step 1 should fail with the following error message:
"Cannot update the subcloud peer group: must provide both the bootstrap-values and bootstrap-address."

Step 1 should only succeed if --bootstrap-address and --bootstrap-values are passed together with the --peer-group option (if rehome_date isn't already populated).

Actual Behavior
----------------
Step 1 succeeds, but sync fails on step 2 due to lack of rehome_data.

Reproducibility
---------------
Reproducible

System Configuration
--------------------
Distributed cloud system configured for geo-redundancy (2 system controllers)

Branch/Pull Time/Commit
-----------------------
master (2024/03/08)

Last Pass
---------
This behavior is present since the beginning of the geo-redundancy feature development

Timestamp/Logs
--------------
NA

Test Activity
-------------
Feature Testing

Workaround
----------
To avoid the sync failure, the user must update the subcloud with --bootstrap-address and --bootstrap-values before syncing.

Changed in starlingx:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to distcloud (master)

Reviewed: https://review.opendev.org/c/starlingx/distcloud/+/912491
Committed: https://opendev.org/starlingx/distcloud/commit/226e127fc03246212afd52431e47394d5449fe2a
Submitter: "Zuul (22348)"
Branch: master

commit 226e127fc03246212afd52431e47394d5449fe2a
Author: Gustavo Herzmann <email address hidden>
Date: Mon Mar 11 17:22:15 2024 -0300

    Improve rehome_data semantic check and name update

    This commit adds a new rehome_data semantic check when attempting to
    update which peer group a subcloud is part of. If rehome_data
    is not already present, the request payload must contain both the
    bootstrap-values and bootstrap-address; otherwise, the request will
    be aborted.

    Additionally, this commit updates the rehome_data during the subcloud
    rename operation, guarenteeing that name is up-to-date.

    Test Plan:
    1. PASS - Attempt to add a subcloud with no rehome_data to a peer
              group under the following conditions and verify that it
              fails:
              - Without passing bootstrap-address and bootstrap-values
              - Passing only the bootstrap-address
              - Passing only the bootstrap-values
    2. PASS - Add a subcloud with rehome_data to a peer group and verify
              that the operation succeeds regardless of the presence of
              bootstrap-address and bootstrap-values.
    3. PASS - Rename a subcloud with rehome_data and verify that the
              rehome_data name field is updated to the new name.
    4. PASS - Rename a subcloud without rehome_data and verify that the
              rename operation still works.
    5. PASS - Migrate a renamed subcloud back and forth and verify that
              the migration completes successfully.

    Closes-Bug: 2055883
    Closes-Bug: 2056796

    Change-Id: I4403dc50062db07a0de24e04139e3af8087c546f
    Signed-off-by: Gustavo Herzmann <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Low
tags: added: stx.10.0 stx.distcloud
Changed in starlingx:
assignee: nobody → Gustavo Herzmann (gherzman)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.