Skip to content

feat(tests): enhance sideContainers to support multi-containers tests - #924

Open
alimx07 wants to merge 1 commit into
urunc-dev:mainfrom
alimx07:feat/sideCar
Open

feat(tests): enhance sideContainers to support multi-containers tests#924
alimx07 wants to merge 1 commit into
urunc-dev:mainfrom
alimx07:feat/sideCar

Conversation

@alimx07

@alimx07 alimx07 commented Aug 8, 2026

Copy link
Copy Markdown

Description

Enhance a SideContainers feature to the e2e test framework, with current spec (Name, Image, Cli, Volumes, NetMode) that can run alongside the primary unikernel, either joining its same named network or sharing its network namespace directly according to mode.

const (
	// sideContainerNetModeNetwork joins the same named/user-defined
	// network as the primary container (docker/nerdctl --network <name>).
	sideContainerNetModeNetwork sideContainerNetMode = "network"
	// sideContainerNetModeShared joins the primary container's network
	// namespace directly, similar to containers sharing a namespace
	// inside a Kubernetes pod (docker/nerdctl --network container:<id>).
	sideContainerNetModeShared sideContainerNetMode = "shared"
) 

Related issues

How was this tested?

Still do not tested yet. I think the most easiet test will be a network calls on the localhost, so this is blocked until #793 merged.

LLM usage

Checklist

  • I have read the contribution guide.
  • The linter passes locally (make lint).
  • The e2e tests of at least one tool pass locally (make test_ctr, make test_nerdctl, make test_docker, make test_crictl).
  • If LLMs were used: I have read the llm policy.

@netlify

netlify Bot commented Aug 8, 2026

Copy link
Copy Markdown

Deploy Preview for urunc canceled.

Name Link
🔨 Latest commit 868d1be
🔍 Latest deploy log https://app.netlify.com/projects/urunc/deploys/6a774842c38e1a00083dddfb

Signed-off-by: Ali Mohamed <amx746@gmail.com>
@HARSHRAJ2789

Copy link
Copy Markdown

I have been running multi-container urunc pods this week while looking at the Argo integration in #573, so some of this may be useful while the PR is blocked on #793.

Two things I can confirm work, on urunc 0.7.0-3c2a37f, k3s v1.36.3+k3s1, monitor spt:

A unikernel primary alongside a plain Linux side container is fine. The unikernel boots, exits 0 and reports Completed, while the side container keeps running in the same pod. Networking from the side container is also fine, with 6 of 6 probes reaching the API server, both when the primary is a unikernel and when it is an ordinary container. So the shared mode you describe should behave the way you expect for the network case.

One thing that will bite the framework, though. exec into any container in a urunc pod fails, including plain Linux side containers:

OCI runtime exec failed: urunc did not terminate successfully: exit status 1

RuntimeClass is set per pod, so a side container that has nothing to do with unikernels still has its exec routed through urunc's shim, and the shim has no exec subcommand. This is the same root cause @Anand-240 documented in #882, and @Cicada1107 is addressing it in #765 as part of the containerd v2 migration.

It matters here because docker exec and nerdctl exec are the obvious way to assert something inside a side container from an e2e test. Any assertion written that way will fail for reasons unrelated to what the test is checking, until #765 lands. Checking side container behaviour through its logs or through a network call avoids that.

On testing before #793 merges, a side container that dials the primary over the shared namespace on localhost works today without needing DNS, if that unblocks anything.

Happy to run any specific case on my setup if that helps.

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.

Enhance SideContainers to Support Multi-Container Test Scenarios

2 participants