Provide a message to the operator that sync cmd needs to be executed after certain operations

Bug #2054124 reported by Li Zhu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
Li Zhu

Bug Description

Brief Description
-----------------
The sync command must be executed by the operator after any of the following operations:

Add one or more subclouds to the SPG.
Remove one or more subclouds from the SPG.
Update one or more subclouds in the SPG.
Please consider outputting an informative message as an enhancement request after those operations, informing the operator that a sync command should be executed. Something like:

The operation has caused the SPG to be out-of-sync. Please consider running the sync command to push the subcloud peer group changes to the peer site:
$ dcmanager peer-group-association sync <Site-Peer-Group-Association-ID>

Severity
--------
Minor

Steps to Reproduce
------------------
Add, Remove, or Update a subcloud in the SPG.

Expected Behavior
------------------
An informative message informing the operator to run sync command.

Actual Behavior
----------------
No informative message is displayed.

Reproducibility
---------------
100%

System Configuration
--------------------
Distributed Cloud

Branch/Pull Time/Commit
-----------------------
22.12 MR3

Last Pass
---------
New test scenario

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

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

Workaround
-----------
Read the customer doc

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to distcloud (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/starlingx/distcloud/+/909277

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

Reviewed: https://review.opendev.org/c/starlingx/distcloud/+/909277
Committed: https://opendev.org/starlingx/distcloud/commit/5f132a43aba15e360e011ec5bc07789e8e1c6c75
Submitter: "Zuul (22348)"
Branch: master

commit 5f132a43aba15e360e011ec5bc07789e8e1c6c75
Author: Li Zhu <email address hidden>
Date: Fri Feb 16 18:56:55 2024 -0500

    Set PGA status to out-of-sync after certain operations

    Fix the reported issue:
    The PGA fails to transition from 'in-sync' to 'out-of-sync' after
    updating subclouds.

    This commit includes the following changes:
    1. Updates the SPG sync_status to 'out-of-sync' after performing any of
       the following operations and provides an informative message to
       the operator:
       a) Adding a subcloud to the SPG
       b) Removing a subcloud from the SPG
       c) Updating a subcloud in the SPG
    2. Ensures that updates on SPG attributes, such as name,
       max_subcloud_rehoming, and group_state, are automatically
       propagated to the peer site.

    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 subcloud(s) to the peer group
               5. Create peer group association to associate system peer
                  and subcloud peer group - Site A
               6. Check current sync status on Sites A and B. Verify
                  they are 'in-sync'.
    PASS: Verify 'out-of-sync' on both sites after running any of
          the following operations on site A, the primary and leader site:
          1. Adding subcloud to the SPG.
          2. Removing subcloud from the SPG.
          3. Updating any field of a subcloud in the SPG, such as bootstrap
             address, bootstrap values, install values, etc.
    PASS: Repeat the above operations while site B is down and verify that
          PGA sync_status is set to "failed".
    PASS: Verify that SPG attribute updates are accepted if peer site is up
          and the updates are successfully synced to the peer site.
    PASS: Verify that SPG attribute updates are rejected if the peer site
          is down.
    PASS: Verify that if the subcloud does not belong to any peer group, or
          if it is part of a peer group but the peer group is not associated
          with any peer yet, updating the subcloud would not result in an
          "informative" message and no attempt to update the PGA sync_status
          should occur.

    Closes-Bug: 2054123
    Closes-Bug: 2054124

    Change-Id: I9f0e44e34c7db5d60d211b70e839606d0361cf83
    Signed-off-by: lzhu1 <email address hidden>

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

Reviewed: https://review.opendev.org/c/starlingx/distcloud-client/+/909278
Committed: https://opendev.org/starlingx/distcloud-client/commit/02444385e977d1c3d002a764a11fd6f9fc2aa0dc
Submitter: "Zuul (22348)"
Branch: master

commit 02444385e977d1c3d002a764a11fd6f9fc2aa0dc
Author: Li Zhu <email address hidden>
Date: Thu Feb 29 20:07:49 2024 -0500

    Output an informative message after running out-of-sync operations

    Add a minor enhancement to GEO-redundancy. Output an informative message
    after running below out-of-sync operations, informing the operator that
    a sync command should be executed.
    Adding subcloud(s) to the SPG.
    Removing subcloud(s) from the SPG.
    Updating subcloud(s) in the SPG.

    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 subcloud(s) to the peer group
               5. Create peer group association to associate system peer
                  and subcloud peer group - Site A
               6. Check current sync status on Sites A and B. Verify
                  they are 'in-sync'.
    PASS: Verify that the corresponding informative message is printed out
          after running below out-of-sync operations:
          1. Adding subcloud to the SPG.
          2. Removing subcloud from the SPG.
          3. Updating subcloud in the SPG, for example, bootstrap address,
             bootstrap values or install values.
    PASS: Verify that informative message is not printed when running any
          operation on the sublcoud which does not belong to an SPG.

    Depends-On: https://review.opendev.org/c/starlingx/distcloud/+/909277

    Closes-Bug: 2054124

    Change-Id: I1614a719190b2645eb8139b158b0bab257d0f91d
    Signed-off-by: lzhu1 <email address hidden>

Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Low
tags: added: stx.10.0 stx.distcloud
Changed in starlingx:
assignee: nobody → Li Zhu (lzhu1)
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.