Horizon crashes when a patch installation is run on a locked host

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

Bug Description

Brief Description

Horizon async installation of patches is failing when triggered from Host list.

It shows the following error:
An unexpected error has occurred. Try refreshing the page. If that doesn't help, contact your local administrator.

Severity

<Minor: System/Feature is usable with minor issue>

Steps to Reproduce

1. Log into starlingx dashboard.
2. Go to a locked online host, press the arrow next to 'Edit Host'
3. Choose 'Install patches'
4. An error screen is showed.

Expected Behavior
An error is displayed, like using the CLI.

Actual Behavior
Horizon redirects to an error screen

Reproducibility
100%

System Configuration
All types

Changed in starlingx:
assignee: nobody → Enzo Candotti (ecandotti)
Changed in starlingx:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on upstream (master)

Change abandoned by "Enzo Candotti <email address hidden>" on branch: master
Review: https://review.opendev.org/c/starlingx/upstream/+/899208
Reason: : Will follow different approach.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to gui (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/starlingx/gui/+/899996

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to gui (master)

Reviewed: https://review.opendev.org/c/starlingx/gui/+/899996
Committed: https://opendev.org/starlingx/gui/commit/7e8845bf25bb079fa7db06fe432759d302a2a61b
Submitter: "Zuul (22348)"
Branch: master

commit 7e8845bf25bb079fa7db06fe432759d302a2a61b
Author: Enzo Candotti <email address hidden>
Date: Thu Nov 2 22:36:32 2023 -0300

    Fix Horizon crash on a patch installation

    When a patch installation is triggered on a locked host via Horizon,
    it crashes redirecting to an error screen. The normal behaviour seen
    using the CLI is just an error message saying that the host is unknown
    because of being locked.

    Horizon should show this error message instead of crashing. The root
    cause is an issue during raising the ValueError expection, because
    of an 'AttributeError' exception raised on the 'split_message'
    function.

    This commit fixes this problem by replacing the ValueError exception
    with the Horizon error message function.

    Closes-Bug: 2040495

    Test Plan:
    PASS: Build the starlingx-dashboard package, install it on a
    system and verify the changes are applied correctly.
    PASS: Execute test scenarios to receive errors in various
    requests impacted by this function. Verify that the error message
    is correctly displayed and logged.

    Signed-off-by: Enzo Candotti <email address hidden>
    Change-Id: Ia8cdce0b89be30abc632a8161201302cd9a51681

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