Unsuccessful upgrade abort during kube-pre-app-update step

Bug #2071743 reported by Igor Pires Soares
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
Igor Pires Soares

Bug Description

Brief Description
-----------------
During the kube-pre-update-apps step, when an apps is in 'updating' status if an 'upgrade-abort' command is issued the abort is not completed.

Severity
-----------------
Minor: System/Feature is usable with minor issue

Steps to Reproduce
-----------------
have an app(metadata file has k8s_upgrades:timing: pre)
have an updated app
with app applied, start k8s upgrade
system kube-upgrade-start v1.28.4
execute download images step
system kube-upgrade-download-images
execute kube pre-update-apps step
system kube-pre-application-update
abort upgrade
system kube-upgrade-abort

Expected Behavior
-----------------
The upgrade is aborted while app is 'updating', app stays with compatible k8s version

Actual Behavior
-----------------
The upgrade is not aborted

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

System Configuration
-----------------
SX

Load info (eg: 2022-03-10_20-00-07)

[sysadmin@controller-0 test(keystone_admin)]$ cat /etc/build.info
SW_VERSION="24.09"
BUILD_TARGET="Host Installer"
BUILD_TYPE="Formal"
BUILD_ID="2024-06-17_19-00-10"
BUILD_BY="jenkins"
BUILD_NUMBER="782"
BUILD_DATE="2024-06-17 23:00:10 +0000"

Last Pass
-----------------
N/A, new feature test

Alarms
-----------------
N/A

Test Activity
-----------------
Feature Testing

Workaround
-----------------
N/A

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

Reviewed: https://review.opendev.org/c/starlingx/config/+/923184
Committed: https://opendev.org/starlingx/config/commit/36e29fe1dd8bf8738199c0ee9764fafd0757f584
Submitter: "Zuul (22348)"
Branch: master

commit 36e29fe1dd8bf8738199c0ee9764fafd0757f584
Author: Igor Soares <email address hidden>
Date: Mon Jul 1 17:06:11 2024 -0300

    Fix k8s upgrade abort during pre app update step

    This commit fixes a race condition when a 'kube-upgrade-abort' command
    is issued while the Kubernetes upgrade is in 'pre-updating-apps' state.
    The upgrade status is correctly changed to 'upgrade-aborted' at first,
    but later on it is mistakenly changed to 'pre-updated-apps' or
    'pre-updating-apps-failed', depending on the application update result.

    A check was introduced to verify whether the Kubernetes upgrade process
    is being aborted. If so, the upgrade remains in the resulting abort
    state, thus respecting the outcome of the 'kube-upgrade-abort' command.

    Test Plan:
    PASS: Run a Kubernetes upgrade.
          Abort upgrade during the pre-updating-app state.
          Confirm that the upgrade was aborted and that the status does not
          change when we are done updating the apps.
    PASS: Run a Kubernetes upgrade.
          Abort upgrade during the post-updating-app state.
          Confirm that the abort request was rejected.
    PASS: Run a Kubernetes upgrade with apps to be updated during pre and
          post update phases.
          Confirm that the upgrade was successful.
    PASS: Run a Kubernetes upgrade without any application updates
          Confirm that the upgrade was successful.

    Closes-bug: 2071743

    Change-Id: I6b34e8e8cfd28395d8b7e083eabd58e83c13eaa9
    Signed-off-by: Igor Soares <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Low
tags: added: stx.10.0 stx.containers stx.update
Changed in starlingx:
assignee: nobody → Igor Pires Soares (ipiresso)
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.