DCManager API 'region_name' incompatibility

Bug #2083459 reported by Cristian Mondo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Cristian Mondo

Bug Description

Brief Description
-----------------

24.09 DCManager Client isn't compatible w/ 22.12's API.

There's a difference in the "region name" parameter between these 2 versions:
24.09 is region-name and 22.12 is region_name

Against a 24.09:

  "region-name": "6c451ab35d734b46b5f07a523f0a0581",

Against a 22.12:

  "region_name": "subcloud1"

Severity
--------

<Major: System/Feature is usable but degraded>

Steps to Reproduce
------------------

Call to subcloud detail API.

Expected Behavior
------------------

Region Name parameter is the same accross all clients.

Actual Behavior
----------------

Region Name is written differently in different versions.

Reproducibility
---------------

Reproducible

System Configuration
--------------------

DC1 - 22.12
DC2 - 24.09

Last Pass
-----------------------------
N/A

Timestamp/Logs
----------------------------
N/A

Alarms
------------------------------
N/A

Test Activity
-----------------------------
Dev testing

Workaround
----------

N/A

Cristian Mondo (cmondo)
Changed in starlingx:
assignee: nobody → Cristian Mondo (cmondo)
status: New → In Progress
Cristian Mondo (cmondo)
description: updated
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/+/931160

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to distcloud-client (master)
Cristian Mondo (cmondo)
description: updated
Cristian Mondo (cmondo)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to distcloud (master)

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

commit ff224b494e111e2b0b9b5181b2f4d9f2e1cdf536
Author: Cristian Mondo <email address hidden>
Date: Tue Oct 1 16:57:27 2024 -0300

    Add the region_name field in the API response for subcloud detail

    This commit adds the region_name field to the API response when
    requesting the subcloud detail, allowing backward compatibility
    of the dcmanager client to display the region_name field using
    the show detail subcommand.

    Originally the region_name was displayed only when the subcloud's
    show --detail parameter was provisioned. It then became displayed
    by default as region-name instead of region_name, without the
    need to provision --detail, whose change is reflected in the
    following commit;

    https://review.opendev.org/c/starlingx/distcloud/+/909976

    This generates a compatibility issue in clients that have already
    been released, where it is necessary to use the --detail parameter
    to be able to display the region_name.

    With this change the following is assumed:
    If the API is requested to display the subcloud information, the
    region name will be region-name by default.
    If the API is requested to show the details of the subcloud, the
    region name field will be shown with its two variants; region-name
    and region_name.

    Test Plan:

    PASS - Send a request to the API URL to display the subcloud
           information.
         - Verify that the region name field is displayed as
           "region-name".

    PASS - Send a request to the API URL to display detailed subcloud
           information.
         - Verify that the region name field is shown with its two
           variants; "region-name" and "region_name".

    Closes-bug: 2083459

    Change-Id: I37cde81dea3df20cbf6e5f268998bd044d5a9334
    Signed-off-by: Cristian Mondo <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/+/931163
Committed: https://opendev.org/starlingx/distcloud-client/commit/5ae3fd011e38f5ec5119c14a3e058bfac33de8f4
Submitter: "Zuul (22348)"
Branch: master

commit 5ae3fd011e38f5ec5119c14a3e058bfac33de8f4
Author: Cristian Mondo <email address hidden>
Date: Wed Oct 2 09:19:26 2024 -0300

    Subcloud show detail command backward compatibility

    This commit adds the logic to parse the region_name field returned by the API,
    in order to be able to display it in the output of the subcloud show and
    subcloud show detail commands according to the release to which the client is
    trying to communicate.

    Test Plan:
    PASS - Run dcmanager subcloud show X
         - Run dcmanager subcloud show --detail X
         - Verify that the region_name field is displayed with that format.

    PASS - Get a 24.09 client and connect to a 24.09 System Controller.
         - Run dcmanager subcloud show X
         - Run dcmanager subcloud show --detail X
         - Verify that the region_name field is displayed with that format.

    PASS - Get a 24.09 client and connect to a 22.12 System Controller.
         - Run dcmanager subcloud show X
         - Verify that the region_name field is not displayed.
         - Run dcmanager subcloud show X --detail
         - Verify that the region_name field is displayed with that format.

    PASS - Get a 22.12 client and connect to a 24.09 System Controller.
         - Run dcmanager subcloud show X
         - Verify that the region_name field is not displayed.
         - Run dcmanager subcloud show X --detail
         - Verify that the region_name field is displayed with that format.

    Closes-bug: 2083459

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

    Change-Id: I906b3d10bae543c2601745ebba408b5715316112
    Signed-off-by: Cristian Mondo <email address hidden>

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

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

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

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

Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Medium
tags: added: stx.10.0 stx.distcloud
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to root (master)

Reviewed: https://review.opendev.org/c/starlingx/root/+/931508
Committed: https://opendev.org/starlingx/root/commit/d0ab8bb3e5ac4debbbe70270088d464a0298ee64
Submitter: "Zuul (22348)"
Branch: master

commit d0ab8bb3e5ac4debbbe70270088d464a0298ee64
Author: Cristian Mondo <email address hidden>
Date: Fri Oct 4 13:16:41 2024 -0300

    Update stx-platformclients tag to stx.10.0-v1.5.16

    This commit updates the image to include distributedcloud-client
    changes.

    Closes-bug: 2083459

    Change-Id: I6dc71b7f58be69eb3f0e7a01ce795ab4b85e0c6b
    Signed-off-by: Cristian Mondo <email address hidden>

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

Reviewed: https://review.opendev.org/c/starlingx/clients/+/931511
Committed: https://opendev.org/starlingx/clients/commit/d26fc5edc3f14165110f91152f1cfa6a956d2127
Submitter: "Zuul (22348)"
Branch: master

commit d26fc5edc3f14165110f91152f1cfa6a956d2127
Author: Cristian Mondo <email address hidden>
Date: Fri Oct 4 13:44:56 2024 -0300

    Update stx-platformclients image to stx.10.0-v1.5.16

    Updated image with distributedcloud-client changes

    Closes-bug: 2083459
    Depends-On: https://review.opendev.org/c/starlingx/root/+/931508

    Change-Id: I52ce7b4e5c66fcfc31eb2da0046726e03811a188
    Signed-off-by: Cristian Mondo <email address hidden>

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.