kubernetes upgrade aborts w/ app with timing:post
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Fix Released
|
Low
|
Igor Pires Soares |
Bug Description
*+Brief Description+*
When attempting a kubernetes version upgrade(in this scenario 1.27.5 to 1.28.4), the upgrade is aborted due to apps not being compatible with the new version during pre-upgrade-apps step.
*+Severity+*
Minor: System/Feature is usable with minor issue
*+Steps to Reproduce+*
* copied the metrics-server app .tgz from /usr/local/
{code:java}
[sysadmin@
app_name: metrics-server
app_version: 24.03-54
helm_repo: stx-platform
maintain_
upgrades:
auto_update: true
k8s_upgrades:
auto_update: true
timing: post
supported_
minimum: 1.24.4
maximum: 1.27.5
behavior:
platform_
* created another copy and updated it's metadata to:
{code:java}
app_name: metrics-server
app_version: 24.03-55
helm_repo: stx-platform
maintain_
upgrades:
auto_update: true
supported_
minimum: 1.28.4
maximum: 1.29.2
behavior:
platform_
* copied back to apps folder, updated ostree/lock, and checked if database is updated:
{code:java}
2024-05-10 12:11:31.740806 | | | 26 | metrics-server | 24.03-55 | /usr/local/
2024-05-10 15:45:08.90804 | | | 27 | metrics-server | 24.03-54 | /usr/local/
(26 rows) {code}
* started k8s upgrade orchestration.
*+Expected Behavior+*
k8s version upgrade should complete normally since the app available to be post-updated is compatible with the target version.
*+Actual Behavior+*
k8s version upgrade is aborted
*+Reproducibility+*
Reproducible
*+System Configuration+*
SX and DX
*+Load info (eg: 2022-03-
SW_VERSION="24.03"
BUILD_TARGET="Host Installer"
BUILD_TYPE="Formal"
BUILD_ID=
SRC_BUILD_ID="1965"
BUILD_BY="jenkins"
BUILD_NUMBER="740"
BUILD_DATE=
*+Last Pass+*
N/A
*+Timestamp/Logs+*
sysinv:
{code:java}
sysinv 2024-05-10 15:56:19.341 13942 ERROR sysinv.
sysinv 2024-05-10 15:56:19.349 13942 INFO sysinv.
[^sysinv.log]
k8s upgrade log message:
{code:java}
sysinv 2024-05-10 15:56:19.341 13942 ERROR sysinv.
sysinv 2024-05-10 15:56:19.349 13942 INFO sysinv.
*+Alarms+*
upgrade aborted
*+Test Activity+*
Sanity, Feature Testing
*+Workaround+*
N/A
Changed in starlingx: | |
status: | New → In Progress |
Changed in starlingx: | |
importance: | Undecided → Low |
tags: | added: stx.10.0 stx.apps |
Changed in starlingx: | |
assignee: | nobody → Igor Pires Soares (ipiresso) |
Reviewed: https:/ /review. opendev. org/c/starlingx /config/ +/919900 /opendev. org/starlingx/ config/ commit/ 7113c1c99b2632f 413e5df938c074c ae90d50644
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 7113c1c99b2632f 413e5df938c074c ae90d50644
Author: Igor Soares <email address hidden>
Date: Thu May 16 18:20:23 2024 -0300
Prevent app incompatibility gap during k8s upgrade
Introduce an additional check to block Kubernetes upgrades on the upgrade- start step if applied apps marked to be post updated are
kube-
incompatible with the target k8s version. This will prevent
incompatibility gaps in the upgrade process, i.e. avoiding that the
post-update stage is reached while running an incompatible app.
Application developers can leverage the auto update feature and the
pre-update step in case incompatible apps need to be updated before
deploying a new Kubernetes version.
Test Plan:
supported_ k8s_version: minimum: 1.24 and
supported_ k8s_version: maximum: 1.27.
supported_ k8s_version: minimum: 1.28 and
supported_ k8s_version: maximum: 1.29.
supported_ k8s_version: minimum: 1.24 and
supported_ k8s_version: maximum: 1.28.
supported_ k8s_version: minimum: 1.28 and
supported_ k8s_version: maximum: 1.29.
PASS: build-pkgs -a && build-image.
PASS: Deploy platform with Kubernetes 1.24.
Apply a metrics-server version containing
Add a new metrics-server bundle containing
Start Kubernetes upgrade to 1.28.
Confirm that the upgrade was blocked.
PASS: Deploy platform with Kubernetes 1.24.
Apply a metrics-server version containing
Add a new metrics-server bundle containing
Start Kubernetes upgrade to 1.28.
Confirm that metrics-server is updated during post-update step.
Closes-Bug: 2066042
Change-Id: Ie5d7e872ae49f8 33bf1cf1a4eb80a 7f50dad8920
Signed-off-by: Igor Soares <email address hidden>