Fetch the correct Kubernetes version during platform upgrade
When perform the platform upgrade after the kubernetes version
upgrade, it fails to fetch the correct Kubernetes version.
This change obtains the kubernetes version by extracting
kubeadm_version field of the kube_cmd_versions table in sysinv
database dump, which is contained in the upgrade_data_*.tgz
backup file during the platform upgrade.
This change is identical to code in the file
playbookconfig/src/playbooks/roles/bootstrap/prepare-env/tasks/main.yml
which retrieves the kubernetes version from the sysinv database file.
Test Plan:
PASS: Install stx5.0, Platform upgrade to stx6.0 and K8s upgrade
1.18 -> 1.19 -> 1.20 -> 1.21. Platform upgrade to stx.7.0
Reviewed: https:/ /review. opendev. org/c/starlingx /ansible- playbooks/ +/900963 /opendev. org/starlingx/ ansible- playbooks/ commit/ d69c34c118146f8 318afb9fdde22f1 ee35990ce4
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit d69c34c118146f8 318afb9fdde22f1 ee35990ce4
Author: Ramesh Kumar Sivanandam <email address hidden>
Date: Tue Nov 14 19:09:46 2023 -0500
Fetch the correct Kubernetes version during platform upgrade
When perform the platform upgrade after the kubernetes version
upgrade, it fails to fetch the correct Kubernetes version.
This change obtains the kubernetes version by extracting
kubeadm_version field of the kube_cmd_versions table in sysinv
database dump, which is contained in the upgrade_data_*.tgz
backup file during the platform upgrade.
This change is identical to code in the file fig/src/ playbooks/ roles/bootstrap /prepare- env/tasks/ main.yml
playbookcon
which retrieves the kubernetes version from the sysinv database file.
Test Plan:
PASS: Install stx5.0, Platform upgrade to stx6.0 and K8s upgrade
1.18 -> 1.19 -> 1.20 -> 1.21. Platform upgrade to stx.7.0
Closes-Bug: 2043518
Change-Id: I5be349db962b7c e4ee0cbd9215dc7 9b63d6cf168
Signed-off-by: Ramesh Kumar Sivanandam <email address hidden>