Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tools/osbuilder/node-builder/azure-linux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ This section describes how to build and deploy in debug mode.
* `SHIM_USE_DEBUG_CONFIG`: Specify `no` (default) to use the production
configuration, or `yes` to use the debug configuration (all debug
logging enabled). In this case you'll want to enable debug logging
in containerd as well.
in containerd as well. Note that this variable has no effect if
`SHIM_REDEPLOY_CONFIG=no`.

In general, you can specify the debug configuration for all the above
variables by using `BUILD_TYPE=debug` as such:
Expand Down
14 changes: 8 additions & 6 deletions tools/osbuilder/node-builder/azure-linux/package_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ if [ "${CONF_PODS}" == "yes" ]; then
echo "Skipping installation of SNP shim debug configuration"
fi

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}"
fi

echo "Enabling and starting snapshotter service"
if [ "${START_SERVICES}" == "yes" ]; then
systemctl enable tardev-snapshotter && systemctl daemon-reload && systemctl restart tardev-snapshotter
Expand All @@ -70,6 +64,14 @@ cp -a --backup=numbered src/runtime/containerd-shim-kata-v2 "${PREFIX}/${SHIM_BI
if [ "${SHIM_REDEPLOY_CONFIG}" == "yes" ]; then
echo "Installing shim configuration"
cp -a --backup=numbered src/runtime/config/"${SHIM_CONFIG_FILE_NAME}" "${PREFIX}/${SHIM_CONFIG_PATH}/${SHIM_CONFIG_INST_FILE_NAME}"

if [ "${CONF_PODS}" == "yes" ] && [ "${SHIM_USE_DEBUG_CONFIG}" == "yes" ]; then
# We simply override the release config with the debug config,
# 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 SNP debug configuration"
cp -a --backup=numbered src/runtime/config/"${SHIM_DBG_CONFIG_FILE_NAME}" "${PREFIX}/${SHIM_CONFIG_PATH}/${SHIM_CONFIG_INST_FILE_NAME}"
fi
else
echo "Skipping installation of shim configuration"
fi
Expand Down
Loading