Merge "Copy upgrade utilities module with precheck script"

This commit is contained in:
Zuul 2024-04-26 20:47:58 +00:00 committed by Gerrit Code Review
commit d89427e359
2 changed files with 5 additions and 0 deletions

View File

@ -33,6 +33,7 @@ RC_SUCCESS = 0
RC_UNHEALTHY = 3
DEPLOY_PRECHECK_SCRIPT = "deploy-precheck"
UPGRADE_UTILS_SCRIPT = "upgrade_utils.py"
DEPLOY_START_SCRIPT = "software-deploy-start"
SEMANTICS_DIR = "%s/semantics" % SOFTWARE_STORAGE_DIR

View File

@ -993,6 +993,10 @@ class PatchFile(object):
tar.extract(constants.DEPLOY_PRECHECK_SCRIPT, path=versioned_dir)
os.chmod(versioned_script, mode=0o755)
LOG.info("Versioned precheck script copied to %s." % versioned_script)
# precheck script requires upgrade utils module to work and it should
# be included together with precheck script
tar.extract(constants.UPGRADE_UTILS_SCRIPT, path=versioned_dir)
LOG.info("Versioned upgrade_utils module copied to %s." % versioned_script)
# in case patch does not contain a precheck script
# then symlink to required patch versioned directory
else: