Skip to content

Commit 773254a

Browse files
committed
fix(fialing focal desktop test)
1 parent ff10b20 commit 773254a

6 files changed

Lines changed: 21 additions & 6 deletions

test/systemd/Dockerfile.bookworm-desktop

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ RUN systemctl enable setup-resolvconf-nm.service
3535
# NM by default leaves dummy* interfaces unmanaged. Explicitly mark dns-test0
3636
# as managed so NM activates the connection profile below and drives DNS.
3737
RUN mkdir -p /etc/NetworkManager/conf.d && \
38-
printf '[main]\nplugins=keyfile\n[device]\nmatch-device=interface-name:dns-test0\nmanaged=true\n[keyfile]\nunmanaged-devices=none\n' \
38+
printf '[main]\nplugins=keyfile\n[device]\nmatch-device=interface-name:dns-test0\nmanaged=true\n[keyfile]\nunmanaged-devices=interface-name:eth0\n' \
3939
> /etc/NetworkManager/conf.d/10-docker-dns-test.conf
4040

4141
# type=dummy → NM creates the interface itself on activation.

test/systemd/Dockerfile.bullseye-desktop

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ COPY setup-resolvconf-nm.service /etc/systemd/system/setup-resolvconf-nm.service
2323
RUN systemctl enable setup-resolvconf-nm.service
2424

2525
RUN mkdir -p /etc/NetworkManager/conf.d && \
26-
printf '[main]\nplugins=keyfile\n[device]\nmatch-device=interface-name:dns-test0\nmanaged=true\n[keyfile]\nunmanaged-devices=none\n' \
26+
printf '[main]\nplugins=keyfile\n[device]\nmatch-device=interface-name:dns-test0\nmanaged=true\n[keyfile]\nunmanaged-devices=interface-name:eth0\n' \
2727
> /etc/NetworkManager/conf.d/10-docker-dns-test.conf
2828

2929
RUN mkdir -p /etc/NetworkManager/system-connections

test/systemd/Dockerfile.focal-desktop

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ COPY setup-resolvconf.service /etc/systemd/system/setup-resolvconf.service
3030
RUN systemctl enable setup-resolvconf.service
3131

3232
RUN mkdir -p /etc/NetworkManager/conf.d && \
33-
printf '[main]\nplugins=keyfile\n[device]\nmatch-device=interface-name:dns-test0\nmanaged=true\n[keyfile]\nunmanaged-devices=none\n' \
33+
printf '[main]\nplugins=keyfile\n[device]\nmatch-device=interface-name:dns-test0\nmanaged=true\n[keyfile]\nunmanaged-devices=interface-name:eth0\n' \
3434
> /etc/NetworkManager/conf.d/10-docker-dns-test.conf
3535

3636
# Real Ubuntu Desktop ships this config so NM delegates DNS to systemd-resolved
@@ -42,6 +42,11 @@ RUN printf '[main]\ndns=systemd-resolved\n' \
4242

4343
RUN mkdir -p /etc/NetworkManager/system-connections
4444
COPY dns-test0.nmconnection /etc/NetworkManager/system-connections/dns-test0.nmconnection
45+
# Ubuntu Desktop: resolved handles upstream DNS (via fallback.conf), not NM.
46+
# Remove dns= from the NM profile so NM doesn't push a ~. default route domain
47+
# to resolved — dns-test0 is a dummy interface that can't route to the internet,
48+
# so resolved would time out trying to reach 8.8.8.8 through it.
49+
RUN sed -i '/^dns=/d' /etc/NetworkManager/system-connections/dns-test0.nmconnection
4550
RUN chmod 600 /etc/NetworkManager/system-connections/dns-test0.nmconnection && \
4651
chown root:root /etc/NetworkManager/system-connections/dns-test0.nmconnection
4752

test/systemd/Dockerfile.jammy-desktop

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ COPY setup-resolvconf.service /etc/systemd/system/setup-resolvconf.service
3030
RUN systemctl enable setup-resolvconf.service
3131

3232
RUN mkdir -p /etc/NetworkManager/conf.d && \
33-
printf '[main]\nplugins=keyfile\n[device]\nmatch-device=interface-name:dns-test0\nmanaged=true\n[keyfile]\nunmanaged-devices=none\n' \
33+
printf '[main]\nplugins=keyfile\n[device]\nmatch-device=interface-name:dns-test0\nmanaged=true\n[keyfile]\nunmanaged-devices=interface-name:eth0\n' \
3434
> /etc/NetworkManager/conf.d/10-docker-dns-test.conf
3535

3636
# Real Ubuntu Desktop ships this config so NM delegates DNS to systemd-resolved
@@ -42,6 +42,11 @@ RUN printf '[main]\ndns=systemd-resolved\n' \
4242

4343
RUN mkdir -p /etc/NetworkManager/system-connections
4444
COPY dns-test0.nmconnection /etc/NetworkManager/system-connections/dns-test0.nmconnection
45+
# Ubuntu Desktop: resolved handles upstream DNS (via fallback.conf), not NM.
46+
# Remove dns= from the NM profile so NM doesn't push a ~. default route domain
47+
# to resolved — dns-test0 is a dummy interface that can't route to the internet,
48+
# so resolved would time out trying to reach 8.8.8.8 through it.
49+
RUN sed -i '/^dns=/d' /etc/NetworkManager/system-connections/dns-test0.nmconnection
4550
RUN chmod 600 /etc/NetworkManager/system-connections/dns-test0.nmconnection && \
4651
chown root:root /etc/NetworkManager/system-connections/dns-test0.nmconnection
4752

test/systemd/Dockerfile.noble-desktop

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ RUN systemctl enable setup-resolvconf.service
3737
# NM by default leaves dummy* interfaces unmanaged. Explicitly mark dns-test0
3838
# as managed so NM activates the connection profile below and drives DNS.
3939
RUN mkdir -p /etc/NetworkManager/conf.d && \
40-
printf '[main]\nplugins=keyfile\n[device]\nmatch-device=interface-name:dns-test0\nmanaged=true\n[keyfile]\nunmanaged-devices=none\n' \
40+
printf '[main]\nplugins=keyfile\n[device]\nmatch-device=interface-name:dns-test0\nmanaged=true\n[keyfile]\nunmanaged-devices=interface-name:eth0\n' \
4141
> /etc/NetworkManager/conf.d/10-docker-dns-test.conf
4242

4343
# Real Ubuntu Desktop ships this config so NM delegates DNS to systemd-resolved
@@ -52,6 +52,11 @@ RUN printf '[main]\ndns=systemd-resolved\n' \
5252
# Profile must be mode 0600 or NM refuses to load it.
5353
RUN mkdir -p /etc/NetworkManager/system-connections
5454
COPY dns-test0.nmconnection /etc/NetworkManager/system-connections/dns-test0.nmconnection
55+
# Ubuntu Desktop: resolved handles upstream DNS (via fallback.conf), not NM.
56+
# Remove dns= from the NM profile so NM doesn't push a ~. default route domain
57+
# to resolved — dns-test0 is a dummy interface that can't route to the internet,
58+
# so resolved would time out trying to reach 8.8.8.8 through it.
59+
RUN sed -i '/^dns=/d' /etc/NetworkManager/system-connections/dns-test0.nmconnection
5560
RUN chmod 600 /etc/NetworkManager/system-connections/dns-test0.nmconnection && \
5661
chown root:root /etc/NetworkManager/system-connections/dns-test0.nmconnection
5762

test/systemd/Dockerfile.trixie-desktop

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ COPY setup-resolvconf-nm.service /etc/systemd/system/setup-resolvconf-nm.service
2323
RUN systemctl enable setup-resolvconf-nm.service
2424

2525
RUN mkdir -p /etc/NetworkManager/conf.d && \
26-
printf '[main]\nplugins=keyfile\n[device]\nmatch-device=interface-name:dns-test0\nmanaged=true\n[keyfile]\nunmanaged-devices=none\n' \
26+
printf '[main]\nplugins=keyfile\n[device]\nmatch-device=interface-name:dns-test0\nmanaged=true\n[keyfile]\nunmanaged-devices=interface-name:eth0\n' \
2727
> /etc/NetworkManager/conf.d/10-docker-dns-test.conf
2828

2929
RUN mkdir -p /etc/NetworkManager/system-connections

0 commit comments

Comments
 (0)