when group_priority is setting to int 0 value from api will get error

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

Bug Description

Brief Description
-----------------
When update group-priority from api with int zero, will
get "Bad Request" response.

Severity
--------
Minor

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

Exec via curl:
curl --location --request PATCH 'http://128.224.115.150:8119/v1.0/subcloud-peer-groups/aaa' \
--header 'X-Auth-Token: gAAAAABlnfvXRrTRv0N2sxyMn4uNr1AbLVjDO5Qy5aPxew-xTv40P195XS9kBaEcgWzxDGbo2tPvLUb3T3l0E0rWx-23eF936FY2R_mkO8ZGHd-Iiq7zlIJWVVWYOdhyRRhXqlvTCpRdUuA17fphGKLZ8nGOWQb0KICDjJnGSewMTOl-p1xIl9Q' \
--header 'Content-Type: application/json' \
--data '{
    "group-priority": 0
}'

Expected Behavior
------------------
Request successfully

Actual Behavior
----------------
<html>
 <head>
  <title>400 Bad Request</title>
 </head>
 <body>
  <h1>400 Bad Request</h1>
  The server could not comply with the request since it is either malformed or otherwise incorrect.<br /><br />
nothing to update

 </body>
</html>

Reproducibility
---------------
Reproducible

System Configuration
--------------------
DC environment

Branch/Pull Time/Commit
-----------------------
Master 2024-01-10

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

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

commit f660733c98755cadf193a6aa4439964ae2d43a8c
Author: twang4 <email address hidden>
Date: Wed Jan 10 11:16:43 2024 +0800

    Fix request error in REST-API when group-priority is an int 0 value

    Fix request error in REST-API when trying to set an int 0 on
    group-priority for a peer-group

    Test plan:
    - PASS: verify that create or update subcloud-peer-group
            group-priority can be set to 0 in either integer or string
            format in the REST request

    Closes-Bug: 2048821

    Change-Id: I83991cbe6a3305b763e484c59bb3225b3aaa06ea
    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
assignee: nobody → TaoWang (twang4)
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.