Adjust pxeboot config files path in an upgrade
During the upgrade from stx6.0 to stx7.0, the content of /opt/platform/config/22.06/pxelinux.cfg/ is copied from the previous release. This way, the grub.cfg, which is a symlink, points to /pxeboot/pxelinux.cfg.files/grub.cfg. As in release stx7.0 /pxeboot was moved to /var/pxeboot, the symlink should be recreated to point the correct path, which is /var/pxeboot/pxelinux.cfg.files/grub.cfg. This fix recriates the symlink pointing to the correct path. Note: cert-manager nginx-ingress-controller oidc-auth-apps platform-integ-apps The above apps were removed from upgrade path on 65-k8s-app-upgrade.sh script to finish upgrade process successfully Test plan PASS: Run initial bootstrap successfully PASS: Upgrade AIO-DX from stx6.0 to stx7.0 Closes-bug:1972572 Signed-off-by: Samuel Presa Toledo <samuel.presatoledo@windriver.com> Change-Id: Icb2b026ccac583295089e922e98d2acd207cabdb
This commit is contained in:
parent
730c2d69c0
commit
2ba470a29f
@ -32,6 +32,7 @@ from sysinv.puppet import common as puppet_common
|
|||||||
# (the platform.conf file will not have been updated with dynamic values).
|
# (the platform.conf file will not have been updated with dynamic values).
|
||||||
from tsconfig.tsconfig import SW_VERSION
|
from tsconfig.tsconfig import SW_VERSION
|
||||||
from tsconfig.tsconfig import PLATFORM_PATH
|
from tsconfig.tsconfig import PLATFORM_PATH
|
||||||
|
from tsconfig.tsconfig import VOLATILE_PXEBOOT_PATH
|
||||||
from tsconfig.tsconfig import KEYRING_PATH
|
from tsconfig.tsconfig import KEYRING_PATH
|
||||||
from tsconfig.tsconfig import PLATFORM_CONF_FILE
|
from tsconfig.tsconfig import PLATFORM_CONF_FILE
|
||||||
from tsconfig.tsconfig import CONTROLLER_UPGRADE_FLAG
|
from tsconfig.tsconfig import CONTROLLER_UPGRADE_FLAG
|
||||||
@ -282,6 +283,7 @@ def migrate_pxeboot_config(from_release, to_release):
|
|||||||
"pxelinux.cfg", "")
|
"pxelinux.cfg", "")
|
||||||
dest_pxelinux = os.path.join(PLATFORM_PATH, "config", to_release,
|
dest_pxelinux = os.path.join(PLATFORM_PATH, "config", to_release,
|
||||||
"pxelinux.cfg")
|
"pxelinux.cfg")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
subprocess.check_call(
|
subprocess.check_call(
|
||||||
["rsync",
|
["rsync",
|
||||||
@ -293,6 +295,14 @@ def migrate_pxeboot_config(from_release, to_release):
|
|||||||
LOG.exception("Failed to migrate %s" % source_pxelinux)
|
LOG.exception("Failed to migrate %s" % source_pxelinux)
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
to_release_symlink_target = os.path.join(VOLATILE_PXEBOOT_PATH,
|
||||||
|
"pxelinux.cfg.files", "grub.cfg")
|
||||||
|
|
||||||
|
dest_symlink_exists = os.path.islink(dest_pxelinux + "/grub.cfg")
|
||||||
|
if dest_symlink_exists:
|
||||||
|
os.unlink(dest_pxelinux + "/grub.cfg")
|
||||||
|
os.symlink(to_release_symlink_target, dest_pxelinux + "/grub.cfg")
|
||||||
|
|
||||||
|
|
||||||
def migrate_armada_config(from_release, to_release):
|
def migrate_armada_config(from_release, to_release):
|
||||||
""" Migrates armada configuration. """
|
""" Migrates armada configuration. """
|
||||||
|
@ -180,6 +180,7 @@ _load()
|
|||||||
# Platform configuration paths and files
|
# Platform configuration paths and files
|
||||||
|
|
||||||
VOLATILE_PATH = "/var/run"
|
VOLATILE_PATH = "/var/run"
|
||||||
|
VOLATILE_PXEBOOT_PATH = "/var/pxeboot"
|
||||||
PLATFORM_PATH = "/opt/platform"
|
PLATFORM_PATH = "/opt/platform"
|
||||||
CONFIG_PATH = PLATFORM_PATH + "/config/" + SW_VERSION + "/"
|
CONFIG_PATH = PLATFORM_PATH + "/config/" + SW_VERSION + "/"
|
||||||
PUPPET_PATH = PLATFORM_PATH + "/puppet/" + SW_VERSION + "/"
|
PUPPET_PATH = PLATFORM_PATH + "/puppet/" + SW_VERSION + "/"
|
||||||
|
Loading…
Reference in New Issue
Block a user