Unsuccessful upgrade abort during kube-pre-app-update step
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Fix Released
|
Low
|
Igor Pires Soares |
Bug Description
Brief Description
-----------------
During the kube-pre-
Severity
-----------------
Minor: System/Feature is usable with minor issue
Steps to Reproduce
-----------------
have an app(metadata file has k8s_upgrades:
have an updated app
with app applied, start k8s upgrade
system kube-upgrade-start v1.28.4
execute download images step
system kube-upgrade-
execute kube pre-update-apps step
system kube-pre-
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-
[sysadmin@
SW_VERSION="24.09"
BUILD_TARGET="Host Installer"
BUILD_TYPE="Formal"
BUILD_ID=
BUILD_BY="jenkins"
BUILD_NUMBER="782"
BUILD_DATE=
Last Pass
-----------------
N/A, new feature test
Alarms
-----------------
N/A
Test Activity
-----------------
Feature Testing
Workaround
-----------------
N/A
Changed in starlingx: | |
status: | New → In Progress |
Changed in starlingx: | |
importance: | Undecided → Low |
tags: | added: stx.10.0 stx.containers stx.update |
Changed in starlingx: | |
assignee: | nobody → Igor Pires Soares (ipiresso) |
Reviewed: https:/ /review. opendev. org/c/starlingx /config/ +/923184 /opendev. org/starlingx/ config/ commit/ 36e29fe1dd8bf87 38199c0ee9764fa fd0757f584
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 36e29fe1dd8bf87 38199c0ee9764fa fd0757f584
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 updating- apps-failed' , depending on the application update result.
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-
A check was introduced to verify whether the Kubernetes upgrade process abort' command.
is being aborted. If so, the upgrade remains in the resulting abort
state, thus respecting the outcome of the 'kube-upgrade-
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: I6b34e8e8cfd283 95d8b7e083eabd5 8e83c13eaa9
Signed-off-by: Igor Soares <email address hidden>