Fix make_config_download_dir()

Uses the correct new config-download directory
and links the existing to new, to keep the git
history.

Change-Id: I5fc78158bbff468576eaddf1924e67a6666213e3
This commit is contained in:
ramishra 2021-03-18 10:39:02 +05:30
parent add3c406cd
commit 8d76088137
1 changed files with 9 additions and 5 deletions

View File

@ -521,9 +521,13 @@ def make_config_download_dir(config_download_dir, stack):
# Symlink for the previous default config-download dir to the
# new consistent location.
# This will create the following symlink:
# ~/config-download ->
# ~/overcloud-deploy/<stack>/config-download
config_download_stack_dir = \
# ~/config-download/<stack> ->
# ~/overcloud-deploy-<stack>/config-download/<stack>
old_config_download_stack_dir = \
os.path.join(DEFAULT_WORK_DIR, stack)
if not os.path.exists(config_download_stack_dir):
os.symlink(config_download_dir, config_download_stack_dir)
config_download_stack_dir = \
os.path.join(config_download_dir, stack)
if (not os.path.exists(config_download_stack_dir) and
os.path.exists(old_config_download_stack_dir)):
os.symlink(old_config_download_stack_dir,
config_download_stack_dir)