Allow activate script to run for 21.12 upgrade
This is to enabled upgrade migration scripts to allow migrate from 21.12 to 22.12 upgrade. TCs: Passed AIO-DX upgrade from 21.12 to 22.12 Story: 2009303 Task: 47148 Change-Id: I211e667eacb3f125d46a2a00acec1ca348346822 Signed-off-by: Bin Qian <bin.qian@windriver.com>
This commit is contained in:
parent
e7366adc41
commit
53a6d29950
@ -52,7 +52,7 @@ def main():
|
||||
LOG.info("%s invoked from_release = %s to_release = %s action = %s"
|
||||
% (sys.argv[0], from_release, to_release, action))
|
||||
res = 0
|
||||
if action == "migrate" and (from_release == '22.06'and
|
||||
if action == "migrate" and (from_release in ['22.06', '21.12'] and
|
||||
to_release == '22.12'):
|
||||
try:
|
||||
res = do_update()
|
||||
|
@ -92,8 +92,8 @@ if [ "$ACTION" == "activate" ]; then
|
||||
# fluxcd application upgrade is supported
|
||||
if [[ "${UPGRADE_APP_NAME}" =~ ^(platform-integ-apps|nginx-ingress-controller|snmp|metrics-server|auditd|ptp-notification|istio)$ ]]; then
|
||||
log "$NAME: ${UPGRADE_APP_NAME} is a supported platform application."
|
||||
elif [[ "${UPGRADE_APP_NAME}" =~ ^(cert-manager|oidc-auth-apps)$ ]] && [ "$FROM_RELEASE" == "22.06" ]; then
|
||||
log "$NAME: ${UPGRADE_APP_NAME} is a supported platform application from 22.06."
|
||||
elif [[ "${UPGRADE_APP_NAME}" =~ ^(cert-manager|oidc-auth-apps)$ && ( "$FROM_RELEASE" == "22.06" || "$FROM_RELEASE" == "21.12" ) ]]; then
|
||||
log "$NAME: ${UPGRADE_APP_NAME} is a supported platform application from $FROM_RELEASE."
|
||||
elif [[ "${UPGRADE_APP_NAME}" =~ ^(cert-manager|oidc-auth-apps)$ ]]; then
|
||||
log "$NAME: ${UPGRADE_APP_NAME} is handled by another script."
|
||||
continue
|
||||
|
@ -105,8 +105,7 @@ def main():
|
||||
LOG.info("%s invoked with from_release = %s to_release = %s action = %s"
|
||||
% (sys.argv[0], from_release, to_release, action))
|
||||
|
||||
if action == "migrate" and (from_release == '21.12' or
|
||||
from_release == '22.06'):
|
||||
if action == "migrate" and from_release in ['21.12', '22.06']:
|
||||
|
||||
conn = psycopg2.connect("dbname=sysinv user=postgres")
|
||||
try:
|
||||
|
@ -4,7 +4,7 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
# This script will upgrade kubernetes service parameters
|
||||
# from release 22.06 to 22.12
|
||||
# from release 22.06 and 21.12 to 22.12
|
||||
#
|
||||
# Note: this can be removed in the release after STX8.0
|
||||
|
||||
@ -102,7 +102,7 @@ def main():
|
||||
|
||||
LOG.info("%s invoked with from_release = %s to_release = %s action = %s"
|
||||
% (sys.argv[0], from_release, to_release, action))
|
||||
if action == "migrate" and from_release == '22.06':
|
||||
if action == "migrate" and from_release in ['22.06', '21.12']:
|
||||
try:
|
||||
db_conn = psycopg2.connect("dbname=sysinv user=postgres")
|
||||
with db_conn:
|
||||
|
Loading…
x
Reference in New Issue
Block a user