Skip to content

builders: add support for systemd-nspawn containers#986

Merged
mweinelt merged 1 commit into
NixOS:mainfrom
jfly:add-support-for-nspawn-containers
May 17, 2026
Merged

builders: add support for systemd-nspawn containers#986
mweinelt merged 1 commit into
NixOS:mainfrom
jfly:add-support-for-nspawn-containers

Conversation

@jfly

@jfly jfly commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

This is part of #987. It gets
standalone nspawn containers working, but not tests that include both
nspawn containers and qemu vms.

We discussed this at our last team meeting, and folks didn't seem to
object to enabling these tests.

At the time, I thought it was a purely hypothetical conversation, but it
turns out that some of our jobsets in Hydra actually do include these
new tests
.

@@ -0,0 +1,13 @@
{
# From <https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/development/running-nixos-tests.section.md#system-requirements-sec-running-nixos-tests-requirements>:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@mweinelt

Copy link
Copy Markdown
Member

Drafting while we find out how crazy it is to pass /dev/net into the sandbox.

@mweinelt mweinelt marked this pull request as draft March 24, 2026 12:11
@jfly

jfly commented Mar 24, 2026

Copy link
Copy Markdown
Contributor Author

@mweinelt, to get things unbroken ASAP, I would propose that we:

  1. Merge this PR as is (it does not include the questionable /dev/net mount).
  2. Disable tests that require communication between qemu and nspawn (for now): nixos/tests: disable nixosTests.nixos-test-driver.containers for now nixpkgs#503014

This is part of NixOS#987. It gets
standalone nspawn containers working, but not tests that include both
nspawn containers and qemu vms.

We discussed this at our last team meeting, and folks didn't seem to
object to enabling these tests.

At the time, I thought it was a purely hypothetical conversation, but it
turns out that some of our jobsets in Hydra actually do [include these
new tests](NixOS/nixpkgs#478109 (comment)).
@jfly jfly force-pushed the add-support-for-nspawn-containers branch from 01f10bc to b481df7 Compare March 24, 2026 12:20
Comment thread builders/common/nspawn-test-containers.nix
Comment thread builders/common/nspawn-test-containers.nix
@mweinelt mweinelt marked this pull request as ready for review May 15, 2026 20:38
@mweinelt mweinelt added this pull request to the merge queue May 17, 2026
Merged via the queue into NixOS:main with commit 526cb3d May 17, 2026
14 checks passed
@jfly jfly deleted the add-support-for-nspawn-containers branch May 17, 2026 20:48
jfly added a commit to jfly/nixpkgs that referenced this pull request May 17, 2026
Now that NixOS/infra#986 has landed, we can
enable container based tests that don't require the ability for
containers and vms to communicate.
GirardR1006 pushed a commit to GirardR1006/nixpkgs that referenced this pull request May 29, 2026
Now that NixOS/infra#986 has landed, we can
enable container based tests that don't require the ability for
containers and vms to communicate.
GirardR1006 pushed a commit to GirardR1006/nixpkgs that referenced this pull request May 29, 2026
Now that NixOS/infra#986 has landed, we can
enable container based tests that don't require the ability for
containers and vms to communicate.
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