Use persistent backup during upgrade

Use the persistent backup to store the upgrade data during simplex
upgrades.

Change-Id: I83280fdc5b2c702045a6a51b1c379758dd50baa2
Story: 2007403
Task: 39606
Signed-off-by: David Sullivan <david.sullivan@windriver.com>
This commit is contained in:
David Sullivan 2020-04-30 18:19:29 -04:00
parent 6916d9e8f7
commit fbcdbf63ea
3 changed files with 3 additions and 5 deletions

View File

@ -18,5 +18,3 @@ KEYRING_WORKDIR = '/tmp/python_keyring'
KEYRING_PERMDIR = tsconfig.KEYRING_PATH
INITIAL_CONFIG_COMPLETE_FILE = '/etc/platform/.initial_config_complete'
BACKUPS_PATH = '/opt/backups'

View File

@ -15,7 +15,6 @@ import subprocess
import tsconfig.tsconfig as tsc
from controllerconfig.common import constants
from sysinv.common import constants as sysinv_constants
from controllerconfig.upgrades import utils
@ -186,7 +185,7 @@ def create_simplex_backup(software_upgrade):
backup_filename = get_upgrade_backup_filename(software_upgrade)
backup_vars = "platform_backup_file=%s.tgz backup_dir=%s" % (
backup_filename, constants.BACKUPS_PATH)
backup_filename, tsc.PLATFORM_BACKUP_PATH)
args = [
'ansible-playbook',
'-e', backup_vars,
@ -271,7 +270,7 @@ def abort_upgrade(from_load, to_load, upgrade):
simplex_backup_filename = get_upgrade_backup_filename(upgrade) + "*"
simplex_backup_files = glob.glob(os.path.join(
constants.BACKUPS_PATH, simplex_backup_filename))
tsc.PLATFORM_BACKUP_PATH, simplex_backup_filename))
for file in simplex_backup_files:
try:

View File

@ -174,6 +174,7 @@ DEPLOY_PATH = PLATFORM_PATH + "/deploy/" + SW_VERSION
ETCD_PATH = "/opt/etcd"
EXTENSION_PATH = "/opt/extension"
PLATFORM_CEPH_CONF_PATH = CONFIG_PATH + 'ceph-config'
PLATFORM_BACKUP_PATH = '/opt/platform-backup'
# Controller configuration flags