Skip to content

Commit

Permalink
node-builder: fix SHIM_USE_DEBUG_CONFIG behavior
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
sprt committed Oct 17, 2024
1 parent 9d7074b commit 10c1785
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/osbuilder/node-builder/azure-linux/package_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 10c1785

Please sign in to comment.