Unable to update subcloud details

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

Bug Description

Brief Description
-----------------
Unable to update subcloud location or description fields from Horizon or CLI
if the string has the following format:

VBOX workstation: workstation: 127.0.0.1

Severity
--------
Minor

Steps to Reproduce
------------------
1 - Open admin portal
2 - Go to Cloud Overview then select desired subcloud
3 - Click on Actions then select Edit Subcloud
4 - Update Description or location textfield adding the following string:

VBOX workstation: workstation: 127.0.0.1

5 - Finally click on submit, and an error is shown on screen.

The issue also happens from the CLI.

Expected Behavior
------------------
Should be able to update the subcloud successfully.

Actual Behavior
----------------
Subcloud details cannot be updated.

Reproducibility
---------------
Reproducible/100%

System Configuration
--------------------
Multi-node system

Test Activity
-------------
Developer Testing

Workaround
----------
The same string can be used, but the space after the colon must be removed.

VBOX workstation:workstation:127.0.0.1

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

commit 6465ba0d328166f62179e135fb2ab69284b618b7
Author: Cristian Mondo <email address hidden>
Date: Wed Sep 14 16:31:37 2022 -0300

    Unable to update subcloud details

    Adding a fix to solve the API (dcmanager-api) error that Horizon
    and CLI returns when updating the description, location, or group
    name on subcloud details by using the following string format:

    VBOX workstation: workstation: 127.0.0.1

    The API responds successfully if no space is placed after the colon
    character. The error arises when the user places a space after the
    colon character. This happens when the request parameters are
    decoded and the values are passed to the YML safe_load method.

    In order to force the string and fix the issue, the value was
    enclosed in quotes.

    Closes-Bug: 1989619

    Test Plan - Horizon and CLI:

     - Edit the subcloud from Horizon or run CLI command
     - Update the description, location or group field by adding the following:

       VBOX workstation: workstation: 127.0.0.1

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

Changed in starlingx:
status: In Progress → Fix Released
Cristian Mondo (cmondo)
Changed in starlingx:
assignee: nobody → Cristian Mondo (cmondo)
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Low
tags: added: stx.8.0 stx.distcloud
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to distcloud (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/starlingx/distcloud/+/863669

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to distcloud (master)

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

commit 2c8cf582df4c28f600f17e3e6fff831176c2afa9
Author: Gustavo Herzmann <email address hidden>
Date: Fri Nov 4 11:44:33 2022 -0300

    Fix update install-values for subclouds

    Currently, all parameter values are being enclosed in quotes when
    parsing the subcloud update request. This works fine for string
    parameters (description, location, group-id, etc.), however it causes
    an issue with the install-values parameter, since it's an yaml file.
    This causes the yaml.safe_load() to return a string instead of a
    dictionary with the parsed install-values content.

    This fix simplifies the parsing function (_get_patch_data) by only
    applying the yaml.safe_load() function to the install-values parameter.
    Enclosing the fields in quotes is not necessary anymore (related to
    issue #1989619, change #857762).

    Test plan:
    PASS: Update the subcloud description and location through Horizon;
    PASS: Update the subcloud with the --install-values parameter through
    the CLI.
    PASS: Manage a subcloud with the --force parameter (the subcloud manage
    command uses the subcloud update endpoint and accepts the --force
    param.)

    Closes-Bug: #1995716
    Related-bug: #1989619

    Signed-off-by: Gustavo Herzmann <email address hidden>
    Change-Id: I40194f1b6bf7a8bd480914eac6b659be3e021d19

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.