During the creation of subcloud peer group with max-subcloud-rehoming value as 0 then getting unexpected result

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

Bug Description

Brief Description

During the creation of subcloud peer group with max-subcloud-rehoming value as 0 then getting unexpected result

Severity

Minor

Steps to Reproduce

Run the below command:

[sysadmin@controller-0 ~(keystone_admin)]$ dcmanager subcloud-peer-group add --peer-group-name sitea-peer-group --max-subcloud-rehoming 0
-----------------------------------------------------------+

Field Value
-----------------------------------------------------------+

id 14
peer_group_name sitea-peer-group
group_priority 0
group_state enabled
system_leader_id ecf72a34-07d2-471c-8b74-1ae38da17f63
system_leader_name wrcpeng-dc40-1-system-controller
max_subcloud_rehoming 10
created_at 2023-12-04 10:30:39.189010
updated_at None
-----------------------------------------------------------+
[sysadmin@controller-0 ~(keystone_admin)]$ dcmanager subcloud-peer-group show 14
-----------------------------------------------------------+

Field Value
-----------------------------------------------------------+

id 14
peer_group_name sitea-peer-group
group_priority 0
group_state enabled
system_leader_id ecf72a34-07d2-471c-8b74-1ae38da17f63
system_leader_name wrcpeng-dc40-1-system-controller
max_subcloud_rehoming 10
created_at 2023-12-04 10:30:39.189010
updated_at None
-----------------------------------------------------------+
[sysadmin@controller-0 ~(keystone_admin)]$

Expected Behavior

It should throw an error message saying that value should be greater than 0.

Actual Behavior

Value is getting updated from provide input 0 to 10.

Reproducibility

Yes

TaoWang (twang4)
Changed in starlingx:
assignee: nobody → TaoWang (twang4)
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/+/902615

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

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

commit d533b355f2f8ebd1b53fe567e8adea25d3d80373
Author: twang4 <email address hidden>
Date: Tue Dec 5 11:40:25 2023 +0800

    Disallow setting max_subcloud_rehoming value to 0

    Reject the request to create (or update) a subcloud-peer-group
    with max_subcloud_rehoming value set to 0.

    Test plan:
    - PASS: create/update subcloud-peer-group from CLI with
            --max-subcloud-rehoming 0 or negative value
            with error message prompt.

    Closes-Bug: 2045628

    Change-Id: Ia7a8c2625490912726ddf060437f0fbaa259ef10
    Signed-off-by: Wang Tao <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
tags: added: stx.9.0 stx.distcloud
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.