Creation of subcloud peer group/system peer is successful for irrelevant name

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

Bug Description

Brief Description

Creation of subcloud peer group/system peer is successful for irrelevant name.

Severity

Minor

Steps to Reproduce

Run the below command:

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

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

id 15
peer_group_name 5-*
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 1
created_at 2023-12-04 10:39:59.830078
updated_at None
-----------------------------------------------------------+
[sysadmin@controller-0 ~(keystone_admin)]$ dcmanager subcloud-peer-group show 15
-----------------------------------------------------------+

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

id 15
peer_group_name 5-*
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 1
created_at 2023-12-04 10:39:59.830078
updated_at None
-----------------------------------------------------------+
[sysadmin@controller-0 ~(keystone_admin)]$

Expected Behavior

Should have some logic to validate the name which should be more appropriate

Actual Behavior

Allowed to create the peer group with irrelevant name.

Reproducibility

Yes

Workaround

NA

TaoWang (twang4)
Changed in starlingx:
assignee: nobody → TaoWang (twang4)
tags: added: stx.9.0 stx.distcloud
TaoWang (twang4)
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/+/902616

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

commit 15798a8e5cf91b54179dd0140693839b92bd017b
Author: twang4 <email address hidden>
Date: Tue Dec 5 15:32:49 2023 +0800

    Disallow using regular expression chars for system/peer-group/group name

    Fix it allows user using regular expression chars for
    peer-group/system-peer/subcloud-group name

    Test plan:
    - PASS: add/update subcloud-peer-group --peer-group-name
           with regular expression chars failed.
    - PASS: add/update subcloud-peer-group --peer-group-name
           without regular expression chars success.
    - PASS: add/update system-peer --peer-name
           with regular expression chars failed.
    - PASS: add/update system-peer --peer-name
           without regular expression chars success.
    - PASS: add/update subcloud-group --name
           with regular expression chars failed.
    - PASS: add/update subcloud-group --name
           without regular expression chars success.

    Closes-Bug: 2045627

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

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Low
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.