Subcloud rename is working in managed state

Bug #2037684 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
-----------------

I was able to modify subcloud name in managed state using update command:

dcmanager subcloud update subcloud1 --name subcloud2

Severity
--------

Critical: System/Feature is not usable after the defect.

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

$ dcmanager subcloud list
$ dcmanager subcloud update subcloud1 --name subcloud2
$ dcmanager subcloud list

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

It should display the following error message:

The server could not comply with the request since it is either malformed or otherwise incorrect. Subcloud <subcloud_name> must be unmanaged and in a valid deploy state for the subcloud rename operation.
ERROR (app) Unable to update subcloud <subcloud_name>

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

[sysadmin@controller-0 ~(keystone_admin)]$ dcmanager subcloud list
+----+-----------+------------+--------------+---------------+---------+---------------+-----------------+
| id | name | management | availability | deploy status | sync | backup status | backup datetime |
+----+-----------+------------+--------------+---------------+---------+---------------+-----------------+
| 1 | subcloud1 | managed | online | complete | in-sync | None | None |
+----+-----------+------------+--------------+---------------+---------+---------------+-----------------+
[sysadmin@controller-0 ~(keystone_admin)]$ dcmanager subcloud update subcloud1 --name subcloud2
+-----------------------------+----------------------------+
| Field | Value |
+-----------------------------+----------------------------+
| id | 1 |
| name | subcloud2 |
| description | None |
| location | None |
| software_version | 23.09 |
| management | managed |
| availability | online |
| deploy_status | complete |
| management_subnet | fd00:32:66::/64 |
| management_start_ip | fd00:32:66::2 |
| management_end_ip | fd00:32:66::ffff |
| management_gateway_ip | fd00:32:66::1 |
| systemcontroller_gateway_ip | fd00:32:64::1 |
| group_id | 1 |
| peer_group_id | None |
| rehome_data | None |
| created_at | 2023-09-28T13:10:29.364713 |
| updated_at | 2023-09-28T18:44:31.426330 |
| backup_status | None |
| backup_datetime | None |
+-----------------------------+----------------------------+
[sysadmin@controller-0 ~(keystone_admin)]$ dcmanager subcloud list
+----+-----------+------------+--------------+---------------+---------+---------------+-----------------+
| id | name | management | availability | deploy status | sync | backup status | backup datetime |
+----+-----------+------------+--------------+---------------+---------+---------------+-----------------+
| 1 | subcloud2 | managed | online | complete | in-sync | None | None |
+----+-----------+------------+--------------+---------------+---------+---------------+-----------------+

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/+/896861

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/+/896861
Committed: https://opendev.org/starlingx/distcloud/commit/7373bcdc28da9b4efdcadbf287fa25bd5ca132a8
Submitter: "Zuul (22348)"
Branch: master

commit 7373bcdc28da9b4efdcadbf287fa25bd5ca132a8
Author: Cristian Mondo <email address hidden>
Date: Thu Sep 28 18:45:10 2023 -0300

    Missing abort operation when subcloud is renamed in managed mode

    As part of Subcloud Name Reconfiguration feature a validation was added
    to check the management state in order to rename de subcloud.

    The subcloud has to be in unmanaged and with a valid deploy state to be
    renamed, otherwise the dcmanager will return the error message, but this
    is not working as expected, the subcloud is renamed while in managed
    mode.

    This commit add the abort operation to prevent the subcloud from being
    renamed.

    Closes-Bug: 2037684

    Test Plan:
    PASS: With the subcloud being unmanaged and deploy complete, rename it
    and verify that the subcloud can be renamed successfully.

    PASS: With the subcloud being managed and deploy complete, rename it
    and verify that the subcloud cannot be renamed.

    PASS: With the subcloud being unmanaged and deploy not complete, rename
    it and verify that the subcloud cannot be renamed.

    PASS: With the subcloud being managed and deploy not complete, rename it
    and verify that the subcloud cannot be renamed.

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

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Medium
tags: added: stx.9.0 stx.distcloud
Changed in starlingx:
assignee: nobody → Cristian Mondo (cmondo)
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.