Fix AIO SX upgrades issue

The backup data stores the puppet data as hieradata.
Use that folder when extracting from the archive

Change-Id: I5dbab8c191c61cc5bdae20072ee747187645264e
Story: 2002886
Task: 22847
Signed-off-by: Jack Ding <jack.ding@windriver.com>
This commit is contained in:
David Sullivan 2018-05-15 14:59:18 -04:00 committed by Jack Ding
parent 4d70f23c65
commit 3bfe8177e2
1 changed files with 2 additions and 2 deletions

View File

@ -1077,7 +1077,7 @@ def extract_data_from_archive(archive, staging_dir, from_release, to_release):
"""Extracts the data from the archive to the staging directory"""
tmp_platform_path = os.path.join(staging_dir, "opt", "platform")
tmp_puppet_path = os.path.join(tmp_platform_path, "puppet",
from_release)
from_release, "hieradata")
tmp_sysinv_path = os.path.join(tmp_platform_path, "sysinv", from_release)
tmp_keyring_path = os.path.join(tmp_platform_path, ".keyring",
from_release)
@ -1097,7 +1097,7 @@ def extract_data_from_archive(archive, staging_dir, from_release, to_release):
os.symlink(tmp_platform_path, PLATFORM_PATH)
extract_relative_directory(archive, "puppet", tmp_puppet_path)
extract_relative_directory(archive, "hieradata", tmp_puppet_path)
extract_relative_directory(archive, ".keyring", tmp_keyring_path)
extract_relative_directory(archive, "config/pxelinux.cfg",
tmp_pxelinux_path)