Comment 3 for bug 2040495

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