Merge "Add support for symlinks instead of bindmounts for version control"

This commit is contained in:
Zuul 2024-04-26 14:05:31 +00:00 committed by Gerrit Code Review
commit 1d6add41a2
2 changed files with 22 additions and 16 deletions

View File

@ -287,6 +287,9 @@ def mount_new_deployment(deployment_dir):
LOG.warning(info_msg)
raise OSTreeCommandFail(msg)
finally:
# Handle the switch from bind mounts to symlinks for K8s versions.
# Can be removed once the switch is complete.
if os.path.isdir('/usr/local/kubernetes/current'):
try:
sh.mount("/usr/local/kubernetes/current/stage1")
sh.mount("/usr/local/kubernetes/current/stage2")

View File

@ -313,6 +313,9 @@ def mount_new_deployment(deployment_dir):
LOG.warning(info_msg)
raise OSTreeCommandFail(msg)
finally:
# Handle the switch from bind mounts to symlinks for K8s versions.
# Can be removed once the switch is complete.
if os.path.isdir('/usr/local/kubernetes/current'):
try:
sh.mount("/usr/local/kubernetes/current/stage1")
sh.mount("/usr/local/kubernetes/current/stage2")