From 8821fe49a36c5901b00e10c5c76b0f5b778740e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Bombo?= Date: Tue, 10 Sep 2024 21:18:43 +0000 Subject: [PATCH] node-builder: Fix SHIM_USE_DEBUG_CONFIG behavior MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using a symlink would create a cycle after calling this script again when copying the final configuration at line 74 so we just use cp instead. Signed-off-by: Aurélien Bombo --- tools/osbuilder/node-builder/azure-linux/package_install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/osbuilder/node-builder/azure-linux/package_install.sh b/tools/osbuilder/node-builder/azure-linux/package_install.sh index ecc2b8bee02b..65a443457b96 100755 --- a/tools/osbuilder/node-builder/azure-linux/package_install.sh +++ b/tools/osbuilder/node-builder/azure-linux/package_install.sh @@ -48,8 +48,10 @@ if [ "${CONF_PODS}" == "yes" ]; then if [ "${SHIM_USE_DEBUG_CONFIG}" == "yes" ]; then # We simply override the release config with the debug config, - # which is probably fine when debugging. - ln -sf src/runtime/config/"${SHIM_DBG_CONFIG_FILE_NAME}" src/runtime/config/"${SHIM_CONFIG_FILE_NAME}" + # which is probably fine when debugging. Not symlinking as that + # would create cycles the next time this script is called. + echo "Overriding shim configuration with debug shim configuration" + cp -a --backup=numbered src/runtime/config/"${SHIM_DBG_CONFIG_FILE_NAME}" src/runtime/config/"${SHIM_CONFIG_FILE_NAME}" fi echo "Enabling and starting snapshotter service"