App w/ "timing: pre" updating when new version does not support current k8s version

Bug #2069907 reported by Igor Pires Soares
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
In Progress
Undecided
Unassigned

Bug Description

Brief Description
-----------------
When doing a k8s upgrade, an app that has a new version in the /usr/local/share/applications/helm directory is updated in the kube-pre-upgrade-apps step when the new version is not compatible with the current k8s version, before the upgrade.

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

Steps to Reproduce
-----------------
check current k8s version
[sysadmin@controller-0 ~(keystone_admin)]$ system kube-version-list
+---------+--------+-------------+
| version | target | state       |
+---------+--------+-------------+
| v1.24.4 | False  | unavailable |
| v1.25.3 | False  | unavailable |
| v1.26.1 | True   | active      |
| v1.27.5 | False  | available   |
| v1.28.4 | False  | available   |
| v1.29.2 | False  | available   |
+---------+--------+-------------+
create an app or update the metadata of an available app, e.g : metrics-server:
metadata:
app_name: metrics-server
app_version: 24.09-54
helm_repo: stx-platform
maintain_user_overrides: true
upgrades:
   auto_update: true
k8s_upgrades:
   auto_update: true
   timing: pre
supported_k8s_version:
  minimum: 1.24.4
  maximum: 1.27.5
behavior:
  platform_managed_app: yes

upload and apply the app
create an updated version of the same app with timing: pre in the metadata and the minimum supported_k8s_version is the intended upgrade:
metadata:
app_name: metrics-server
app_version: 24.09-55
helm_repo: stx-platform
maintain_user_overrides: true
upgrades:
  auto_update: true
k8s_upgrades:
  auto_update: true
  timing: pre
supported_k8s_version:
  minimum: 1.27.5
behavior:
  platform_managed_app: yes

start a k8s upgrade to the intended version, 1.27.5 in this scenario
system kube-upgrade-start v1.27.5
system kube-pre-application-update

Expected Behavior
-----------------
app should not update

Actual Behavior
-----------------
app is updated to the newer version

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

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

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

sysadmin@controller-0:~$ cat /etc/build.info
SW_VERSION="24.09"
BUILD_TARGET="Host Installer"
BUILD_TYPE="Formal"
BUILD_ID="2024-06-04_19-00-21"
SRC_BUILD_ID="2026"JOB="master-debian"
BUILD_BY="jenkins"
BUILD_NUMBER="769"
BUILD_DATE="2024-06-04 23:00:21 +0000"

Last Pass
-----------------
N/A

Timestamp/Logs
-----------------
some upgrade logs:

Every 2.0s: system kube-upgrade-show  controller-0: Fri Jun  7 17:20:18 2024+--------------+--------------------------------------+
| Property     | Value                                |
+--------------+--------------------------------------+
| uuid         | 340d8ec6-6d86-4f5b-a64a-4016fa075b9a |
| from_version | v1.26.1                              |
| to_version   | v1.27.5                              |
| state        | pre-updated-apps                     |
| created_at   | 2024-06-07T17:15:54.035101+00:00     |
| updated_at   | 2024-06-07T17:19:39.102865+00:00     |
+--------------+--------------------------------------+

  | metrics-server           | 24.09-55  | metrics-server-fluxcd-manifests
       | fluxcd-manifests | applied  | Application update from version 24.09
-54 to version 24.09-55 completed. |[sysadmin@controller-0 post(keystone_admin)]$ watch system kube-upgrade-show
[sysadmin@controller-0 post(keystone_admin)]$ watch system kube-upgrade-show
[sysadmin@controller-0 post(keystone_admin)]$ system kube-upgrade-abort
+--------------+--------------------------------------+
| Property     | Value                                |
+--------------+--------------------------------------+
| uuid         | 340d8ec6-6d86-4f5b-a64a-4016fa075b9a |
| from_version | v1.26.1                              |
| to_version   | v1.27.5                              |
| state        | upgrade-aborted                      |
| created_at   | 2024-06-07T17:15:54.035101+00:00     |
| updated_at   | 2024-06-07T17:19:39.102865+00:00     |
+--------------+--------------------------------------+

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

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

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

Changed in starlingx:
status: New → In Progress
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.