Skip to content

node-builder: also build and install runtime-rs#435

Closed
Redent0r wants to merge 3 commits intomsft-previewfrom
saul/build-runtime-rs
Closed

node-builder: also build and install runtime-rs#435
Redent0r wants to merge 3 commits intomsft-previewfrom
saul/build-runtime-rs

Conversation

@Redent0r Redent0r force-pushed the saul/build-runtime-rs branch 7 times, most recently from fa49d7f to 21d88f2 Compare March 26, 2026 16:55
@Redent0r Redent0r force-pushed the saul/build-runtime-rs branch from cf2137e to 0f0b757 Compare March 26, 2026 18:00
@Redent0r
Copy link
Copy Markdown
Author

I'll port these changes back to #429

Copilot AI review requested due to automatic review settings March 26, 2026 22:02
@Redent0r Redent0r force-pushed the saul/build-runtime-rs branch from 7e6512d to b4db746 Compare March 26, 2026 22:02
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Azure Linux node-builder packaging scripts to build and install both Kata shim implementations (runtime-go and runtime-rs) side-by-side, with a toggle to choose which one is installed as the default shim/config.

Changes:

  • Build both runtime-go and runtime-rs shims, and generate debug configs for each.
  • Install both shims/configs side-by-side and install one selected “default” shim/config under the canonical filenames.
  • Introduce runtime-specific config filename variables and a default toggle exported from the Azure Linux node-builder Makefile.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

File Description
tools/osbuilder/node-builder/azure-linux/package_install.sh Installs both shim binaries/configs side-by-side and installs a selected default shim/config.
tools/osbuilder/node-builder/azure-linux/package_build.sh Builds both runtimes and factors debug-config creation into a helper function.
tools/osbuilder/node-builder/azure-linux/common.sh Adds runtime-specific config filename variables and selects default config names based on a toggle.
tools/osbuilder/node-builder/azure-linux/Makefile Exports the new runtime selection toggle with a default value.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Redent0r Redent0r force-pushed the saul/build-runtime-rs branch from b4db746 to 71939d7 Compare March 26, 2026 22:09
Copilot AI review requested due to automatic review settings March 26, 2026 22:27
@Redent0r Redent0r force-pushed the saul/build-runtime-rs branch from 71939d7 to 46c6daa Compare March 26, 2026 22:27
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Redent0r Redent0r force-pushed the saul/build-runtime-rs branch from 46c6daa to 2165bed Compare March 26, 2026 22:35
Copilot AI review requested due to automatic review settings March 26, 2026 22:57
@Redent0r Redent0r force-pushed the saul/build-runtime-rs branch from 2165bed to 4b99c11 Compare March 26, 2026 22:57
@Redent0r Redent0r changed the title node-builder: install both runtime-rs and runtime-go. node-builder: also build and install runtime-rs Mar 26, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Redent0r Redent0r force-pushed the saul/build-runtime-rs branch from 4b99c11 to c4c39e2 Compare March 26, 2026 23:08
Copilot AI review requested due to automatic review settings March 26, 2026 23:17
@Redent0r Redent0r force-pushed the saul/build-runtime-rs branch from 308e2b2 to 3b937f7 Compare March 26, 2026 23:19
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Redent0r Redent0r force-pushed the saul/build-runtime-rs branch from 3b937f7 to a192af0 Compare March 26, 2026 23:28
build runtime-rs binary and debug config

Signed-off-by: Saul Paredes <saulparedes@microsoft.com>
Install both runtime-rs and runtime-go configs and binaries side by side:
  - runtime-go:
      /usr/local/bin/containerd-shim-kata-v2-go
      /usr/local/share/defaults/kata-containers/configuration-clh.toml
      /usr/local/share/defaults/kata-containers/configuration-clh-debug.toml

  - runtime-rs:
      /usr/local/bin/containerd-shim-kata-v2-rs
      /usr/local/share/defaults/kata-containers/configuration-cloud-hypervisor.toml
      /usr/local/share/defaults/kata-containers/configuration-cloud-hypervisor-debug.toml

Also add USE_RUNTIME_RS variable and default to "no". This controls which runtime binary and configuration will be installed
to /usr/local/bin/containerd-shim-kata-v2 and /usr/local/share/defaults/kata-containers/configuration.toml respectively.

Signed-off-by: Saul Paredes <saulparedes@microsoft.com>
Copilot AI review requested due to automatic review settings March 26, 2026 23:39
@Redent0r Redent0r force-pushed the saul/build-runtime-rs branch from a192af0 to 5c1efd7 Compare March 26, 2026 23:39
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

default_shim_binary="${shim_binary_runtime_go}"
shim_config_src_dir="${CONFIG_DIR_RUNTIME_GO}"

if [ "${USE_RUNTIME_RS}" == "yes" ]; then
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

USE_RUNTIME_RS is consulted here even when CONF_PODS=yes, but common.sh ignores USE_RUNTIME_RS in the ConfPods branch and keeps SHIM_CONFIG_FILE_NAME/SHIM_DBG_CONFIG_FILE_NAME set to configuration-clh-snp*.toml. If someone sets USE_RUNTIME_RS=yes with ConfPods, shim_config_src_dir will switch to src/runtime-rs/config while ${SHIM_CONFIG_FILE_NAME} remains configuration-clh-snp.toml, causing the default config copy (and debug override) to fail due to missing files. Consider explicitly forcing USE_RUNTIME_RS=no when CONF_PODS=yes, or selecting ConfPods-appropriate runtime-rs config filenames when USE_RUNTIME_RS=yes.

Suggested change
if [ "${USE_RUNTIME_RS}" == "yes" ]; then
# In ConfPods mode, common.sh ignores USE_RUNTIME_RS and keeps
# ConfPods-specific configuration filenames. To avoid mismatches,
# only honor USE_RUNTIME_RS when CONF_PODS is not "yes".
if [ "${CONF_PODS}" != "yes" ] && [ "${USE_RUNTIME_RS}" == "yes" ]; then

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea, the runtime-rs is broken for confpods in this branch. But so is the go path as we don't have a configuration-clh-snp.toml either in src/runtime/config, so not sure if it's worth bothering here

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we should comment or document and remove the conf pods build path in this branch

so we can test end to end. To remove this commit before merging.

Signed-off-by: Saul Paredes <saulparedes@microsoft.com>
@Redent0r
Copy link
Copy Markdown
Author

changes have been ported back to #429 . Closing in favor of that

@Redent0r Redent0r closed this Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants