I have verified the fix using systemd 255.4-1ubuntu3.3 from noble-proposed.
In a new container, I can see the issue at first:
nr@six:~$ lxc launch ubuntu:noble lp2055239 Launching lp2055239 nr@six:~$ lxc exec lp2055239 bash root@lp2055239:~# systemctl enable somethingthatdefinitelydoesnotexist.service Failed to enable unit: Unit file somethingthatdefinitelydoesnotexist.service does not exist. root@lp2055239:~# systemctl status systemd-resolved.service Warning: The unit file, source configuration file or drop-ins of systemd-resolved.service changed on disk. Run> ● systemd-resolved.service - Network Name Resolution Loaded: loaded (/usr/lib/systemd/system/systemd-resolved.service; enabled; preset: enabled) Active: active (running) since Thu 2024-08-08 13:34:53 UTC; 43s ago Docs: man:systemd-resolved.service(8) man:org.freedesktop.resolve1(5) https://www.freedesktop.org/wiki/Software/systemd/writing-network-configuration-managers https://www.freedesktop.org/wiki/Software/systemd/writing-resolver-clients Main PID: 176 (systemd-resolve) Status: "Processing requests..." Tasks: 1 (limit: 18947) Memory: 2.6M (peak: 3.3M) CPU: 168ms CGroup: /system.slice/systemd-resolved.service └─176 /usr/lib/systemd/systemd-resolved
Aug 08 13:34:52 lp2055239 systemd[1]: Starting systemd-resolved.service - Network Name Resolution... Aug 08 13:34:52 lp2055239 systemd-resolved[176]: Positive Trust Anchors: Aug 08 13:34:52 lp2055239 systemd-resolved[176]: . IN DS 20326 8 2 e06d44b80b8f1d39a95c0b0d7c65d08458e880409bb> Aug 08 13:34:52 lp2055239 systemd-resolved[176]: Negative trust anchors: home.arpa 10.in-addr.arpa 16.172.in-a> Aug 08 13:34:53 lp2055239 systemd-resolved[176]: Using system hostname 'lp2055239'. Aug 08 13:34:53 lp2055239 systemd[1]: Started systemd-resolved.service - Network Name Resolution. root@lp2055239:~# apt update Warning: The unit file, source configuration file or drop-ins of apt-news.service changed on disk. Run 'systemctl daemon-reload' to reload units. Warning: The unit file, source configuration file or drop-ins of esm-cache.service changed on disk. Run 'systemctl daemon-reload' to reload units. Hit:1 http://archive.ubuntu.com/ubuntu noble InRelease Get:2 http://archive.ubuntu.com/ubuntu noble-updates InRelease [126 kB] Get:3 http://security.ubuntu.com/ubuntu noble-security InRelease [126 kB] Get:4 http://archive.ubuntu.com/ubuntu noble-backports InRelease [126 kB] Get:5 http://archive.ubuntu.com/ubuntu noble/universe amd64 Packages [15.0 MB] 0% [5 Packages 8229 kB/15.0 MB 55%]^C
Then, I enabled noble-proposed, upgraded systemd, and the issue was gone:
root@lp2055239:~# cat > /etc/apt/sources.list.d/noble-proposed.sources << EOF > Types: deb URIs: http://us.archive.ubuntu.com/ubuntu/ Suites: noble-proposed Components: main restricted universe multiverse Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg > EOF root@lp2055239:~# apt update
... SNIP ...
root@lp2055239:~# apt policy systemd systemd: Installed: 255.4-1ubuntu8.2 Candidate: 255.4-1ubuntu8.2 Version table: 255.4-1ubuntu8.3 100 100 http://us.archive.ubuntu.com/ubuntu noble-proposed/main amd64 Packages *** 255.4-1ubuntu8.2 500 500 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages 100 /var/lib/dpkg/status 255.4-1ubuntu8 500 500 http://archive.ubuntu.com/ubuntu noble/main amd64 Packages root@lp2055239:~# apt install systemd -t noble-proposed
root@lp2055239:~# apt policy systemd systemd: Installed: 255.4-1ubuntu8.3 Candidate: 255.4-1ubuntu8.3 Version table: *** 255.4-1ubuntu8.3 100 100 http://us.archive.ubuntu.com/ubuntu noble-proposed/main amd64 Packages 100 /var/lib/dpkg/status 255.4-1ubuntu8.2 500 500 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages 255.4-1ubuntu8 500 500 http://archive.ubuntu.com/ubuntu noble/main amd64 Packages root@lp2055239:~# systemctl enable somethingthatdefinitelydoesnotexist.service Failed to enable unit: Unit file somethingthatdefinitelydoesnotexist.service does not exist. root@lp2055239:~# systemctl status systemd-resolved.service ● systemd-resolved.service - Network Name Resolution Loaded: loaded (/usr/lib/systemd/system/systemd-resolved.service; enabled; preset: enabled) Active: active (running) since Thu 2024-08-08 13:37:39 UTC; 12s ago Docs: man:systemd-resolved.service(8) man:org.freedesktop.resolve1(5) https://www.freedesktop.org/wiki/Software/systemd/writing-network-configuration-managers https://www.freedesktop.org/wiki/Software/systemd/writing-resolver-clients Main PID: 1681 (systemd-resolve) Status: "Processing requests..." Tasks: 1 (limit: 18947) Memory: 2.6M (peak: 3.3M) CPU: 102ms CGroup: /system.slice/systemd-resolved.service └─1681 /usr/lib/systemd/systemd-resolved
Aug 08 13:37:38 lp2055239 systemd[1]: Starting systemd-resolved.service - Network Name Resolution... Aug 08 13:37:39 lp2055239 systemd-resolved[1681]: Positive Trust Anchors: Aug 08 13:37:39 lp2055239 systemd-resolved[1681]: . IN DS 20326 8 2 e06d44b80b8f1d39a95c0b0d7c65d08458e880409b> Aug 08 13:37:39 lp2055239 systemd-resolved[1681]: Negative trust anchors: home.arpa 10.in-addr.arpa 16.172.in-> Aug 08 13:37:39 lp2055239 systemd-resolved[1681]: Using system hostname 'lp2055239'. Aug 08 13:37:39 lp2055239 systemd[1]: Started systemd-resolved.service - Network Name Resolution. root@lp2055239:~# apt update Hit:1 http://us.archive.ubuntu.com/ubuntu noble-proposed InRelease Hit:2 http://archive.ubuntu.com/ubuntu noble InRelease Hit:3 http://security.ubuntu.com/ubuntu noble-security InRelease Hit:4 http://archive.ubuntu.com/ubuntu noble-updates InRelease Hit:5 http://archive.ubuntu.com/ubuntu noble-backports InRelease Reading package lists... Done Building dependency tree... Done Reading state information... Done 5 packages can be upgraded. Run 'apt list --upgradable' to see them.
I have verified the fix using systemd 255.4-1ubuntu3.3 from noble-proposed.
In a new container, I can see the issue at first:
nr@six:~$ lxc launch ubuntu:noble lp2055239 finitelydoesnot exist.service finitelydoesnot exist.service does not exist. resolved. service resolved. service changed on disk. Run> resolved. service - Network Name Resolution systemd/ system/ systemd- resolved. service; enabled; preset: enabled) resolved. service( 8)
man: org.freedesktop .resolve1( 5) /www.freedeskto p.org/wiki/ Software/ systemd/ writing- network- configuration- managers /www.freedeskto p.org/wiki/ Software/ systemd/ writing- resolver- clients slice/systemd- resolved. service systemd/ systemd- resolved
Launching lp2055239
nr@six:~$ lxc exec lp2055239 bash
root@lp2055239:~# systemctl enable somethingthatde
Failed to enable unit: Unit file somethingthatde
root@lp2055239:~# systemctl status systemd-
Warning: The unit file, source configuration file or drop-ins of systemd-
● systemd-
Loaded: loaded (/usr/lib/
Active: active (running) since Thu 2024-08-08 13:34:53 UTC; 43s ago
Docs: man:systemd-
https:/
https:/
Main PID: 176 (systemd-resolve)
Status: "Processing requests..."
Tasks: 1 (limit: 18947)
Memory: 2.6M (peak: 3.3M)
CPU: 168ms
CGroup: /system.
└─176 /usr/lib/
Aug 08 13:34:52 lp2055239 systemd[1]: Starting systemd- resolved. service - Network Name Resolution... resolved[ 176]: Positive Trust Anchors: resolved[ 176]: . IN DS 20326 8 2 e06d44b80b8f1d3 9a95c0b0d7c65d0 8458e880409bb> resolved[ 176]: Negative trust anchors: home.arpa 10.in-addr.arpa 16.172.in-a> resolved[ 176]: Using system hostname 'lp2055239'. resolved. service - Network Name Resolution. archive. ubuntu. com/ubuntu noble InRelease archive. ubuntu. com/ubuntu noble-updates InRelease [126 kB] security. ubuntu. com/ubuntu noble-security InRelease [126 kB] archive. ubuntu. com/ubuntu noble-backports InRelease [126 kB] archive. ubuntu. com/ubuntu noble/universe amd64 Packages [15.0 MB]
Aug 08 13:34:52 lp2055239 systemd-
Aug 08 13:34:52 lp2055239 systemd-
Aug 08 13:34:52 lp2055239 systemd-
Aug 08 13:34:53 lp2055239 systemd-
Aug 08 13:34:53 lp2055239 systemd[1]: Started systemd-
root@lp2055239:~# apt update
Warning: The unit file, source configuration file or drop-ins of apt-news.service changed on disk. Run 'systemctl daemon-reload' to reload units.
Warning: The unit file, source configuration file or drop-ins of esm-cache.service changed on disk. Run 'systemctl daemon-reload' to reload units.
Hit:1 http://
Get:2 http://
Get:3 http://
Get:4 http://
Get:5 http://
0% [5 Packages 8229 kB/15.0 MB 55%]^C
Then, I enabled noble-proposed, upgraded systemd, and the issue was gone:
root@lp2055239:~# cat > /etc/apt/ sources. list.d/ noble-proposed. sources << EOF us.archive. ubuntu. com/ubuntu/ keyrings/ ubuntu- archive- keyring. gpg
> Types: deb
URIs: http://
Suites: noble-proposed
Components: main restricted universe multiverse
Signed-By: /usr/share/
> EOF
root@lp2055239:~# apt update
... SNIP ...
root@lp2055239:~# apt policy systemd 4-1ubuntu8. 3 100 us.archive. ubuntu. com/ubuntu noble-proposed/main amd64 Packages archive. ubuntu. com/ubuntu noble-updates/main amd64 Packages dpkg/status archive. ubuntu. com/ubuntu noble/main amd64 Packages
systemd:
Installed: 255.4-1ubuntu8.2
Candidate: 255.4-1ubuntu8.2
Version table:
255.
100 http://
*** 255.4-1ubuntu8.2 500
500 http://
100 /var/lib/
255.4-1ubuntu8 500
500 http://
root@lp2055239:~# apt install systemd -t noble-proposed
... SNIP ...
root@lp2055239:~# apt policy systemd us.archive. ubuntu. com/ubuntu noble-proposed/main amd64 Packages dpkg/status 4-1ubuntu8. 2 500 archive. ubuntu. com/ubuntu noble-updates/main amd64 Packages archive. ubuntu. com/ubuntu noble/main amd64 Packages finitelydoesnot exist.service finitelydoesnot exist.service does not exist. resolved. service resolved. service - Network Name Resolution systemd/ system/ systemd- resolved. service; enabled; preset: enabled) resolved. service( 8)
man: org.freedesktop .resolve1( 5) /www.freedeskto p.org/wiki/ Software/ systemd/ writing- network- configuration- managers /www.freedeskto p.org/wiki/ Software/ systemd/ writing- resolver- clients slice/systemd- resolved. service systemd/ systemd- resolved
systemd:
Installed: 255.4-1ubuntu8.3
Candidate: 255.4-1ubuntu8.3
Version table:
*** 255.4-1ubuntu8.3 100
100 http://
100 /var/lib/
255.
500 http://
255.4-1ubuntu8 500
500 http://
root@lp2055239:~# systemctl enable somethingthatde
Failed to enable unit: Unit file somethingthatde
root@lp2055239:~# systemctl status systemd-
● systemd-
Loaded: loaded (/usr/lib/
Active: active (running) since Thu 2024-08-08 13:37:39 UTC; 12s ago
Docs: man:systemd-
https:/
https:/
Main PID: 1681 (systemd-resolve)
Status: "Processing requests..."
Tasks: 1 (limit: 18947)
Memory: 2.6M (peak: 3.3M)
CPU: 102ms
CGroup: /system.
└─1681 /usr/lib/
Aug 08 13:37:38 lp2055239 systemd[1]: Starting systemd- resolved. service - Network Name Resolution... resolved[ 1681]: Positive Trust Anchors: resolved[ 1681]: . IN DS 20326 8 2 e06d44b80b8f1d3 9a95c0b0d7c65d0 8458e880409b> resolved[ 1681]: Negative trust anchors: home.arpa 10.in-addr.arpa 16.172.in-> resolved[ 1681]: Using system hostname 'lp2055239'. resolved. service - Network Name Resolution. us.archive. ubuntu. com/ubuntu noble-proposed InRelease archive. ubuntu. com/ubuntu noble InRelease security. ubuntu. com/ubuntu noble-security InRelease archive. ubuntu. com/ubuntu noble-updates InRelease archive. ubuntu. com/ubuntu noble-backports InRelease
Aug 08 13:37:39 lp2055239 systemd-
Aug 08 13:37:39 lp2055239 systemd-
Aug 08 13:37:39 lp2055239 systemd-
Aug 08 13:37:39 lp2055239 systemd-
Aug 08 13:37:39 lp2055239 systemd[1]: Started systemd-
root@lp2055239:~# apt update
Hit:1 http://
Hit:2 http://
Hit:3 http://
Hit:4 http://
Hit:5 http://
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
5 packages can be upgraded. Run 'apt list --upgradable' to see them.