Skip to content

test/system: Unbreak DNS in Arch Linux containers on Ubuntu 22.04 hosts - #1859

Merged
debarshiray merged 1 commit into
containers:mainfrom
debarshiray:wip/rishi/test-system-203-network-unbreak-archlinux-ubuntu-2204-dns
Nov 17, 2026
Merged

debarshiray merged 1 commit into
containers:mainfrom
debarshiray:wip/rishi/test-system-203-network-unbreak-archlinux-ubuntu-2204-dns

Conversation

@debarshiray

@debarshiray debarshiray commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Currently, the DNS test in Arch Linux containers fails on Ubuntu 22.04
hosts:

  not ok 184 network: DNS inside Arch Linux in 715ms
  # tags: arch-fedora runtime-environment
  # (from function `assert_line' in file
       test/system/libs/bats-assert/src/assert.bash, line 488,
  #  in test file test/system/203-network.bats, line 283)
  #   `assert_line --index 0 "$ipv4_addr"' failed
  #
  # -- line differs --
  # index    : 0
  # expected : 193.0.14.129
  # actual   :
  # --
  #

This is because the underlying resolvectl(1) invocation fails:

  $ resolvectl --legend false --no-pager --type A query
        k.root-servers.net
  k.root-servers.net: resolve call failed:
      org.varlink.service.MethodNotFound

In systemd 262, resolvectl(1) was changed to communicate with
systemd-resolved(8) using Varlink APIs instead of their D-Bus
counterparts. One of them was the ResolveRecord method [1], known as
io.systemd.Resolve.ResolveRecord in the Varlink API and as
org.freedesktop.resolve1.Manager.ResolveRecord in the D-Bus variant.

However, the ResolveRecord method was only exposed through Varlink in
systemd 256 [2] and Ubuntu 22.04 only has systemd 249. This breaks the
compatibility between resolvectl(1) and systemd-resolved(8).

It seems that these days the arch-toolbox image includes python3(1),
which it originally didn't, and the nss-resolve(8) plugin for the GNU
Name Service Switch (or NSS) functionality of the GNU C Library doesn't
use ResolveRecord. Therefore, resolvectl(1) can be replaced by using
getaddrinfo(3), which is a front-end to nss-resolve(8), through
python3(1).

[1] systemd commit cfac7ec169892b38
systemd/systemd@cfac7ec169892b38
systemd/systemd#41840

[2] systemd commit cf1c8cdb87d4e2c1
systemd/systemd@cf1c8cdb87d4e2c1
systemd/systemd#31616

@debarshiray
debarshiray marked this pull request as draft November 13, 2026 14:55
@centosinfra-prod-github-app

Copy link
Copy Markdown

Build succeeded.
https://gateway-cloud-softwarefactory.apps.ocp.cloud.ci.centos.org/zuul/t/local/buildset/ec7c95c3c0c1400d96ef6e124812cde2

✔️ unit-test SUCCESS in 2m 06s
✔️ unit-test-migration-path-for-coreos-toolbox SUCCESS in 2m 59s
✔️ unit-test-restricted SUCCESS in 1m 59s
✔️ system-test-fedora-rawhide-commands-options SUCCESS in 32m 36s
✔️ system-test-fedora-rawhide-runtime-environment-arch-fedora SUCCESS in 23m 39s
✔️ system-test-fedora-rawhide-runtime-environment-ubuntu SUCCESS in 5m 29s
✔️ system-test-fedora-44-commands-options SUCCESS in 31m 42s
✔️ system-test-fedora-44-runtime-environment-arch-fedora SUCCESS in 22m 53s
✔️ system-test-fedora-44-runtime-environment-ubuntu SUCCESS in 5m 29s
✔️ system-test-fedora-43-commands-options SUCCESS in 31m 48s
✔️ system-test-fedora-43-runtime-environment-arch-fedora SUCCESS in 22m 32s
✔️ system-test-fedora-43-runtime-environment-ubuntu SUCCESS in 5m 27s
✔️ system-test-fedora-coreos-next-commands-options SUCCESS in 32m 56s
✔️ system-test-fedora-coreos-next-runtime-environment-arch-fedora SUCCESS in 24m 35s
✔️ system-test-fedora-coreos-next-runtime-environment-ubuntu SUCCESS in 6m 40s
✔️ system-test-fedora-coreos-stable-commands-options SUCCESS in 31m 34s
✔️ system-test-fedora-coreos-stable-runtime-environment-arch-fedora SUCCESS in 23m 50s
✔️ system-test-fedora-coreos-stable-runtime-environment-ubuntu SUCCESS in 6m 17s
✔️ system-test-fedora-coreos-testing-commands-options SUCCESS in 33m 03s
✔️ system-test-fedora-coreos-testing-runtime-environment-arch-fedora SUCCESS in 24m 54s
✔️ system-test-fedora-coreos-testing-runtime-environment-ubuntu SUCCESS in 7m 30s

Currently, the DNS test in Arch Linux containers fails on Ubuntu 22.04
hosts:
  not ok 184 network: DNS inside Arch Linux in 715ms
  # tags: arch-fedora runtime-environment
  # (from function `assert_line' in file
       test/system/libs/bats-assert/src/assert.bash, line 488,
  #  in test file test/system/203-network.bats, line 283)
  #   `assert_line --index 0 "$ipv4_addr"' failed
  #
  # -- line differs --
  # index    : 0
  # expected : 193.0.14.129
  # actual   :
  # --
  #

This is because the underlying resolvectl(1) invocation fails:
  $ resolvectl --legend false --no-pager --type A query
        k.root-servers.net
  k.root-servers.net: resolve call failed:
      org.varlink.service.MethodNotFound

In systemd 262, resolvectl(1) was changed to communicate with
systemd-resolved(8) using Varlink APIs instead of their D-Bus
counterparts.  One of them was the ResolveRecord method [1], known as
io.systemd.Resolve.ResolveRecord in the Varlink API and as
org.freedesktop.resolve1.Manager.ResolveRecord in the D-Bus variant.

However, the ResolveRecord method was only exposed through Varlink in
systemd 256 [2] and Ubuntu 22.04 only has systemd 249.  This breaks the
compatibility between resolvectl(1) and systemd-resolved(8).

It seems that these days the arch-toolbox image includes python3(1),
which it originally didn't, and the nss-resolve(8) plugin for the GNU
Name Service Switch (or NSS) functionality of the GNU C Library doesn't
use ResolveRecord.  Therefore, resolvectl(1) can be replaced by using
getaddrinfo(3), which is a front-end to nss-resolve(8), through
python3(1).

[1] systemd commit cfac7ec169892b38
    systemd/systemd@cfac7ec169892b38
    systemd/systemd#41840

[2] systemd commit cf1c8cdb87d4e2c1
    systemd/systemd@cf1c8cdb87d4e2c1
    systemd/systemd#31616

containers#1859
@debarshiray
debarshiray force-pushed the wip/rishi/test-system-203-network-unbreak-archlinux-ubuntu-2204-dns branch from 551876f to 1c49907 Compare November 17, 2026 00:01
@debarshiray debarshiray changed the title [WIP] test/system: Unbreak DNS in Arch Linux containers on Ubuntu 22.04 hosts test/system: Unbreak DNS in Arch Linux containers on Ubuntu 22.04 hosts Nov 17, 2026
@debarshiray
debarshiray marked this pull request as ready for review November 17, 2026 00:07
@centosinfra-prod-github-app

Copy link
Copy Markdown

Build succeeded.
https://gateway-cloud-softwarefactory.apps.ocp.cloud.ci.centos.org/zuul/t/local/buildset/18c262335d9d428d9efdde7c634a7cf6

✔️ unit-test SUCCESS in 2m 05s
✔️ unit-test-migration-path-for-coreos-toolbox SUCCESS in 3m 17s
✔️ unit-test-restricted SUCCESS in 2m 07s
✔️ system-test-fedora-rawhide-commands-options SUCCESS in 32m 45s
✔️ system-test-fedora-rawhide-runtime-environment-arch-fedora SUCCESS in 22m 55s
✔️ system-test-fedora-rawhide-runtime-environment-ubuntu SUCCESS in 5m 21s
✔️ system-test-fedora-44-commands-options SUCCESS in 32m 18s
✔️ system-test-fedora-44-runtime-environment-arch-fedora SUCCESS in 22m 28s
✔️ system-test-fedora-44-runtime-environment-ubuntu SUCCESS in 5m 29s
✔️ system-test-fedora-43-commands-options SUCCESS in 30m 37s
✔️ system-test-fedora-43-runtime-environment-arch-fedora SUCCESS in 22m 40s
✔️ system-test-fedora-43-runtime-environment-ubuntu SUCCESS in 5m 21s
✔️ system-test-fedora-coreos-next-commands-options SUCCESS in 33m 25s
✔️ system-test-fedora-coreos-next-runtime-environment-arch-fedora SUCCESS in 26m 53s
✔️ system-test-fedora-coreos-next-runtime-environment-ubuntu SUCCESS in 6m 50s
✔️ system-test-fedora-coreos-stable-commands-options SUCCESS in 31m 42s
✔️ system-test-fedora-coreos-stable-runtime-environment-arch-fedora SUCCESS in 23m 03s
✔️ system-test-fedora-coreos-stable-runtime-environment-ubuntu SUCCESS in 6m 12s
✔️ system-test-fedora-coreos-testing-commands-options SUCCESS in 33m 55s
✔️ system-test-fedora-coreos-testing-runtime-environment-arch-fedora SUCCESS in 25m 13s
✔️ system-test-fedora-coreos-testing-runtime-environment-ubuntu SUCCESS in 6m 52s

@debarshiray
debarshiray merged commit 1c49907 into containers:main Nov 17, 2026
3 checks passed
@debarshiray

Copy link
Copy Markdown
Member Author

Thanks for the review, @Rolv-Apneseth !

@debarshiray
debarshiray deleted the wip/rishi/test-system-203-network-unbreak-archlinux-ubuntu-2204-dns branch November 17, 2026 12:21
@Rolv-Apneseth

Copy link
Copy Markdown
Contributor

Np thanks for the fix.

Will you be modifying #1847 / opening a new PR, or do you want me to remove the systemd-tmpfiles related commit and rebase?

@debarshiray

debarshiray commented Nov 18, 2026 •

Copy link
Copy Markdown
Member Author

Np thanks for the fix.

Will you be modifying #1847 / opening a new PR, or do you want me to remove the systemd-tmpfiles related commit and rebase?

Feel free to rebase #1847 on top of main, but no pressure. I want to get the Toolbx 0.4 release out first, because we haven't had one in a while.

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.

2 participants