Unable to create Kubernetes upgrade strategy for Subcloud using Horizon GUI

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

Bug Description

Brief Description
K8s upgrade strategy from version: v1.23.1 to version: v1.24.4, is failing to be applied when triggered via Horizon.

Severity
Major.

Steps to Reproduce
Install the System Controller and sub clouds with 1.23 K8s then upgrade K8s on the system contoller first. This step was performed using CLI so I am not sure if that issue happens here as well ($ sw-manager kube-upgrade-strategy create --to-version v1.24.4 --alarm-restriction relaxed ; sw-manager kube-upgrade-strategy apply)
Then, upgrade the subclouds via Horizon

Expected Behavior
K8s upgrade on the subclouds

Actual Behavior
kube upgrade pre check: Invalid kube version(s), left: (v1.24.4), right: (1.24.4)

Reproducibility
100%

System Configuration
Distributed Cloud

Last Pass
NA

Timestamp/Logs
Timestamp: 2023-05-01 17:04:02.139938

Log Snippet
/var/log/dcmanager/orchestrator.log:2023-05-01 17:04:31.114 1396342 ERROR dcmanager.orchestrator.orch_thread raise Exception("Invalid kube version(s), left: (%s), right: (%s)" %
/var/log/dcmanager/orchestrator.log:2023-05-01 17:04:31.114 1396342 ERROR dcmanager.orchestrator.orch_thread Exception: Invalid kube version(s), left: (v1.24.4), right: (1.24.4)
/var/log/dcmanager/orchestrator.log:2023-05-01 17:04:31.639 1396342 ERROR dcmanager.orchestrator.orch_thread [req-d9ffa458-35ce-4485-a185-c162456b7845 - - - - -] (kubernetes) Failed! Stage: 1, State: kube upgrade pre check, Subcloud: subcloud489: Exception: Invalid kube version(s), left: (v1.24.4), right: (1.24.4)

Alarms
None.

Test Activity
System Test.

Workaround
Use dcmanager CLI:
$ dcmanager kube-upgrade-strategy create --group batch2 --to-version v1.24.4
$ dcmanager kube-upgrade-strategy apply

Changed in starlingx:
assignee: nobody → Enzo Candotti (ecandotti)
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/+/882450

Changed in starlingx:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to gui (master)

Reviewed: https://review.opendev.org/c/starlingx/gui/+/882450
Committed: https://opendev.org/starlingx/gui/commit/8c0d3f5063455f13855f0270b4cf4a38210ab66c
Submitter: "Zuul (22348)"
Branch: master

commit 8c0d3f5063455f13855f0270b4cf4a38210ab66c
Author: Enzo Candotti <email address hidden>
Date: Fri May 5 12:17:20 2023 -0300

    Fix to-version field on K8S Upgrade Strategy

    When creating a Kubernetes Strategy, the 'to-version' field
    was being sent without the 'v' prefix. This was making that the
    kubernetes pre-check fails.

    This change fixes this issue. Also, the default version that is
    selected when the user doesn't select an item on the 'to-version'
    drop-down menu will be the systemcontroller active version.

    Test Plan:
    PASS: Create and apply a kubernetes upgrade strategy selecting the
    desired 'to-version' option. Verify the pre-check is passed and
    the strategy is completed.
    PASS: Create and apply a kubernetes upgrade strategy using the default
    option on the drop-down menu. Verify that the version that it being
    sent to dcmanager is the systemcontroller's active version.

    Closes-bug: 2018611

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

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Medium
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.