Fix load-import --local with proxy

Bug #2043511 reported by Lindley Werner Soares Vieira
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Lindley Werner Soares Vieira

Bug Description

Brief Description
-----------------

In both cases below the load should succeed, but fails:

SUCCESS PATH: Load-import inactive with patch# + local parameter
system --os-region-name SystemController load-import --inactive *.iso *.sig --local
error msg: Load import failed. Reason: No valid upgrade path found

SUCCESS PATH: Load import active load + local parameter
cmd: system --os-region-name SystemController load-import --active .*iso *.sig --local
error:
This operation will take a while. Please wait.
..
Load import failed. Reason: Imported load exists.

Severity
--------
Critical: System/Feature is not usable due to the defect

Steps to Reproduce
------------------
Load-import inactive with 21.12P10/P11 + local parameter
Load import active load + local parameter

Expected Behavior
------------------
The load should succeed

Actual Behavior
----------------
The load fails

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

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

Branch/Pull Time/Commit
-----------------------

Last Pass
---------
New feature

Timestamp/Logs
--------------

Test Activity
-------------

Workaround
----------
load without using --os-region-name SystemController

Changed in starlingx:
assignee: nobody → Lindley Werner Soares Vieira (lindley-vieira)
status: New → In Progress
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to distcloud (master)

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

commit c5e1d7c1319c52eae66ed04e63eb0378b0b59129
Author: Lindley Werner <email address hidden>
Date: Tue Nov 14 15:15:43 2023 -0300

    Fix load-import --local with proxy

    When load-import is called with --local the load is imported locally
    from the active controller. When it's called with "--os-region-name
    SystemController", the request is intercepted by the dc-api-proxy.

    This commit fixes a bug that happens when the request is intercepted
    by the dc-api-proxy. When using --local, the function receives the
    params through "request.body" and when not using it the params come
    through request.POST. Only the second way was being treated.

    Test plan:
      PASS: load-import with --os-region-name SystemController,
      --inactive and --local should be completed if using an upgradable
      load
      PASS: load-import with --os-region-name SystemController,
      --inactive and --local should fail if using a non-upgradable load
      PASS: load-import with --os-region-name SystemController, --active,
      and --local should complete using a load from the same version
      PASS: load-import with --os-region-name SystemController and
      --inactive should be completed if using an upgradable load
      PASS: load-import with --os-region-name SystemController and
      --inactive should fail if using a non-upgradable load

    Closes-bug: 2043511

    Change-Id: Id5c02fdc35c43b4134fd34592de36d35f9fc88b6
    Signed-off-by: Lindley Werner <email address hidden>

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