I have re-verified using 1:24.04.26 (although the new change was
unrelated to this one):

root@j:~# systemctl disable --now systemd-resolved 
Removed /etc/systemd/system/dbus-org.freedesktop.resolve1.service.
Removed /etc/systemd/system/multi-user.target.wants/systemd-resolved.service.
root@j:~#  sed -i 's/nameserver.*/nameserver 1.1.1.1/g' /etc/resolv.conf
root@j:~# apt update && apt install dnsmasq -y
Get:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [129 kB]
Hit:2 http://archive.ubuntu.com/ubuntu jammy InRelease 
Get:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [128 kB]
Get:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [127 kB]
Get:5 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages [14.1 MB]
Get:6 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages 
[2075 kB]
Get:7 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages 
[961 kB]
Get:8 http://security.ubuntu.com/ubuntu jammy-security/universe Translation-en 
[205 kB]   
Get:9 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 c-n-f 
Metadata [19.5 kB]   
Get:10 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 
Packages [37.6 kB]        
Get:11 http://security.ubuntu.com/ubuntu jammy-security/multiverse 
Translation-en [8260 B]   
Get:12 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 c-n-f 
Metadata [224 B]   
Get:13 http://archive.ubuntu.com/ubuntu jammy/universe Translation-en [5652 kB] 
                  
Get:14 http://archive.ubuntu.com/ubuntu jammy/universe amd64 c-n-f Metadata 
[286 kB]
Get:15 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 Packages [217 kB]
Get:16 http://archive.ubuntu.com/ubuntu jammy/multiverse Translation-en [112 kB]
Get:17 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 c-n-f Metadata 
[8372 B]
Get:18 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [2313 
kB]
Get:19 http://archive.ubuntu.com/ubuntu jammy-updates/main Translation-en [386 
kB]
Get:20 http://archive.ubuntu.com/ubuntu jammy-updates/restricted Translation-en 
[515 kB]
Get:21 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages 
[1184 kB]
Get:22 http://archive.ubuntu.com/ubuntu jammy-updates/universe Translation-en 
[290 kB]
Get:23 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 c-n-f 
Metadata [26.4 kB]
Get:24 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages 
[44.5 kB]
Get:25 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse Translation-en 
[11.5 kB]
Get:26 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 c-n-f 
Metadata [440 B]
Get:27 http://archive.ubuntu.com/ubuntu jammy-backports/main amd64 Packages 
[67.7 kB]
Get:28 http://archive.ubuntu.com/ubuntu jammy-backports/main Translation-en 
[11.1 kB]
Get:29 http://archive.ubuntu.com/ubuntu jammy-backports/main amd64 c-n-f 
Metadata [388 B]
Get:30 http://archive.ubuntu.com/ubuntu jammy-backports/restricted amd64 c-n-f 
Metadata [116 B]
Get:31 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages 
[30.0 kB]
Get:32 http://archive.ubuntu.com/ubuntu jammy-backports/universe Translation-en 
[16.6 kB]
Get:33 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 c-n-f 
Metadata [672 B]
Get:34 http://archive.ubuntu.com/ubuntu jammy-backports/multiverse amd64 c-n-f 
Metadata [116 B]
Fetched 29.0 MB in 5s (5600 kB/s)                         
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  dns-root-data dnsmasq-base
Suggested packages:
  resolvconf
The following NEW packages will be installed:
  dns-root-data dnsmasq dnsmasq-base
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 399 kB of archives.
After this operation, 1025 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 dns-root-data 
all 2023112702~ubuntu0.22.04.1 [5136 B]
Get:2 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 dnsmasq-base 
amd64 2.90-0ubuntu0.22.04.1 [374 kB]
Get:3 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 dnsmasq all 
2.90-0ubuntu0.22.04.1 [19.7 kB]
Fetched 399 kB in 1s (571 kB/s) 
Selecting previously unselected package dns-root-data.
(Reading database ... 34046 files and directories currently installed.)
Preparing to unpack .../dns-root-data_2023112702~ubuntu0.22.04.1_all.deb ...
Unpacking dns-root-data (2023112702~ubuntu0.22.04.1) ...
Selecting previously unselected package dnsmasq-base.
Preparing to unpack .../dnsmasq-base_2.90-0ubuntu0.22.04.1_amd64.deb ...
Unpacking dnsmasq-base (2.90-0ubuntu0.22.04.1) ...
Selecting previously unselected package dnsmasq.
Preparing to unpack .../dnsmasq_2.90-0ubuntu0.22.04.1_all.deb ...
Unpacking dnsmasq (2.90-0ubuntu0.22.04.1) ...
Setting up dnsmasq-base (2.90-0ubuntu0.22.04.1) ...
Setting up dns-root-data (2023112702~ubuntu0.22.04.1) ...
Setting up dnsmasq (2.90-0ubuntu0.22.04.1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/dnsmasq.service → 
/lib/systemd/system/dnsmasq.service.
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for dbus (1.12.20-2ubuntu4.1) ...
Scanning processes...                                                           
                                                                                
                                                                               

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host.
root@j:~# systemctl status dnsmasq systemd-resolved
● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
     Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled; vendor 
preset: enabled)
     Active: active (running) since Tue 2025-02-04 14:47:45 UTC; 1min 38s ago
    Process: 1766 ExecStartPre=/etc/init.d/dnsmasq checkconfig (code=exited, 
status=0/SUCCESS)
    Process: 1774 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, 
status=0/SUCCESS)
    Process: 1783 ExecStartPost=/etc/init.d/dnsmasq systemd-start-resolvconf 
(code=exited, status=0/SUCCESS)
   Main PID: 1782 (dnsmasq)
      Tasks: 1 (limit: 18947)
     Memory: 812.0K
        CPU: 42ms
     CGroup: /system.slice/dnsmasq.service
             └─1782 /usr/sbin/dnsmasq -x /run/dnsmasq/dnsmasq.pid -u dnsmasq -7 
/etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new --local-service 
--trust-anchor=.,20326,8,2,e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104237c7f8ec8d

Feb 04 14:47:45 j systemd[1]: Starting dnsmasq - A lightweight DHCP and caching 
DNS server...
Feb 04 14:47:45 j dnsmasq[1782]: started, version 2.90 cachesize 150
Feb 04 14:47:45 j dnsmasq[1782]: DNS service limited to local subnets
Feb 04 14:47:45 j dnsmasq[1782]: compile time options: IPv6 GNU-getopt DBus 
no-UBus i18n IDN2 DHCP DHCPv6 no-Lua TFTP conntrack ipset no-nftset auth 
cryptohash DNSSEC loop-detect inotify dumpfile
Feb 04 14:47:45 j dnsmasq[1782]: reading /etc/resolv.conf
Feb 04 14:47:45 j dnsmasq[1782]: using nameserver 1.1.1.1#53
Feb 04 14:47:45 j dnsmasq[1782]: read /etc/hosts - 8 names
Feb 04 14:47:45 j systemd[1]: Started dnsmasq - A lightweight DHCP and caching 
DNS server.

○ systemd-resolved.service - Network Name Resolution
     Loaded: loaded (/lib/systemd/system/systemd-resolved.service; disabled; 
vendor preset: enabled)
     Active: inactive (dead)
       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

Feb 04 14:46:52 j systemd[1]: Starting Network Name Resolution...
Feb 04 14:46:52 j systemd-resolved[320]: Positive Trust Anchors:
Feb 04 14:46:52 j systemd-resolved[320]: . IN DS 20326 8 2 
e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104237c7f8ec8d
Feb 04 14:46:52 j systemd-resolved[320]: Negative trust anchors: home.arpa 
10.in-addr.arpa 16.172.in-addr.arpa 17.172.in-addr.arpa 18.172.in-addr.arpa 
19.172.in-addr.arpa 20.172.in-addr.arpa 21.172.in-addr.arpa 22.172.in-addr.arpa 
23.172.>
Feb 04 14:46:52 j systemd-resolved[320]: Using system hostname 'j'.
Feb 04 14:46:52 j systemd[1]: Started Network Name Resolution.
Feb 04 14:47:19 j systemd[1]: Stopping Network Name Resolution...
Feb 04 14:47:19 j systemd[1]: systemd-resolved.service: Deactivated 
successfully.
Feb 04 14:47:19 j systemd[1]: Stopped Network Name Resolution.
root@j:~# do-release-upgrade --proposed
Checking for a new Ubuntu release

= Welcome to Ubuntu 24.04 LTS 'Noble Numbat' =

The Ubuntu team is proud to announce Ubuntu 24.04 LTS 'Noble Numbat'.

To see what's new in this release, visit:
  https://wiki.ubuntu.com/NobleNumbat/ReleaseNotes

Ubuntu is a Linux distribution for your desktop or server, with a fast
and easy install, regular releases, a tight selection of excellent
applications installed by default, and almost any other software you
can imagine available through the network.

We hope you enjoy Ubuntu.

== Feedback and Helping ==

If you would like to help shape Ubuntu, take a look at the list of
ways you can participate at

  http://www.ubuntu.com/community/participate/

Your comments, bug reports, patches and suggestions will help ensure
that our next release is the best release of Ubuntu ever.  If you feel
that you have found a bug please read:

  http://help.ubuntu.com/community/ReportingBugs

Then report bugs using apport in Ubuntu.  For example:

  ubuntu-bug linux

will open a bug report in Launchpad regarding the linux package.

If you have a question, or if you think you may have found a bug but
aren't sure, first try asking on the #ubuntu or #ubuntu-bugs IRC
channels on Libera.Chat, on the Ubuntu Users mailing list, or on the
Ubuntu forums:

  http://help.ubuntu.com/community/InternetRelayChat
  http://lists.ubuntu.com/mailman/listinfo/ubuntu-users
  http://www.ubuntuforums.org/


== More Information ==

You can find out more about Ubuntu on our website, IRC channel and wiki.
If you're new to Ubuntu, please visit:

  http://www.ubuntu.com/


To sign up for future Ubuntu announcements, please subscribe to Ubuntu's
very low volume announcement list at:

  http://lists.ubuntu.com/mailman/listinfo/ubuntu-announce


Continue [yN] y
Get:1 Upgrade tool signature [833 B]                                            
                                                                                
                                                                              
Get:2 Upgrade tool [1277 kB]                                                    
                                                                                
                                                                              
Fetched 1278 kB in 0s (0 B/s)                                                   
                                                                                
                                                                              
authenticate 'noble.tar.gz' against 'noble.tar.gz.gpg' 
extracting 'noble.tar.gz'
[screen is terminating]
root@j:~# grep stub-resolver /var/log/dist-upgrade/main.log 
2025-02-04 14:51:21,382 DEBUG systemd-resolved is not running, not disabling 
stub-resolver
2025-02-04 14:51:23,412 DEBUG systemd-resolved is not running, not disabling 
stub-resolver
2025-02-04 14:51:53,542 DEBUG systemd-resolved is not running, not disabling 
stub-resolver
root@j:~# stat /run/systemd/resolved.conf.d/dist-upgrade-no-stub-resolver.conf
stat: cannot statx 
'/run/systemd/resolved.conf.d/dist-upgrade-no-stub-resolver.conf': No such file 
or directory
root@j:~# cat /etc/os-release 
PRETTY_NAME="Ubuntu 24.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.1 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/";
SUPPORT_URL="https://help.ubuntu.com/";
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/";
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy";
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo


** Tags removed: verification-needed-noble
** Tags added: verification-done-noble

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to dnsmasq in Ubuntu.
https://bugs.launchpad.net/bugs/2078555

Title:
  Upgrading from 22.04 to 24.04.01 breaks dnsmasq

Status in Ubuntu:
  Triaged
Status in dnsmasq package in Ubuntu:
  Invalid
Status in systemd package in Ubuntu:
  Invalid
Status in ubuntu-release-upgrader package in Ubuntu:
  Invalid
Status in The Jammy Jellyfish:
  New
Status in dnsmasq source package in Jammy:
  Invalid
Status in systemd source package in Jammy:
  In Progress
Status in ubuntu-release-upgrader source package in Jammy:
  Invalid
Status in The Noble Numbat:
  New
Status in dnsmasq source package in Noble:
  Invalid
Status in systemd source package in Noble:
  Won't Fix
Status in ubuntu-release-upgrader source package in Noble:
  Fix Committed

Bug description:
  [Impact]

  During upgrades, systemd-resolved will be started and enabled, even if it was 
not previously. This is due to (a) the package split that made systemd-resolved 
its own package (during kinetic cycle, hence between jammy and noble), and (b)
  an ubuntu-release-upgrader quirk that (re)starts systemd-resolved out of stub
  mode during the upgrade to avoid DNS resolution failures during the upgrade.

  [Test Plan]

  The complete test plan requires the fixed version of systemd *and*
  ubuntu-release-upgrader.

  On a Jammy machine, install systemd from jammy-proposed:

  $ cat > /etc/apt/sources.list.d/proposed.list << EOF
  deb http://archive.ubuntu.com/ubuntu/ jammy-proposed main universe
  EOF
  $ cat <<EOF >/etc/apt/preferences.d/proposed-updates
  Package: *
  Pin: release a=jammy-proposed
  Pin-Priority: 400
  EOF
  $ apt update && apt install -y -t jammy-proposed systemd
  $ apt policy systemd

  Then, disable systemd-resolved, and install dnsmasq:

  $ systemctl disable --now systemd-resolved
  $ sed -i 's/nameserver.*/nameserver 1.1.1.1/g' /etc/resolv.conf # Use any DNS 
server
  $ apt install dnsmasq -y
  $ systemctl status dnsmasq systemd-resolved

  At this point, dnsmasq should be running, and systemd-resolved should
  not. Now, we can run the upgrade:

  $ do-release-upgrade --proposed
  [...]

  The upgrade should complete normally. At the end, systemd-resolved
  should still be disabled/inactive, and dnsmasq should still be
  running:

  $ systemctl status dnsmasq systemd-resolved

  [Where problems could occur]

  systemd:

  The patch is adding a new systemd.prerm. Any issues here would be seen
  during package upgrades of systemd in/from Jammy. It is designed to
  only run during upgrades to Noble from Jammy, so the scope is limited
  there. If something did occur, it would be within the deb-systemd-
  helper script, which would not be fatal to the systemd.prerm script
  given the || true after the invocation.

  ubuntu-release-upgrader:

  The patch adds a call to systemctl is-active to check whether systemd-
  resolved is running. If this was broken, systemd-resolved might be
  started during the ugprade anyways. This would not lead to systemd-
  resolved being enabled, though.

  [Other information]

  For the complete upgrade experience to be fixed for affected users,
  both of these updates need to land. Hence, we should aim to release
  these at the same time. However, having one fix but not the other
  would not make the situation any worse.

  [Original Description]

  Was running Ubuntu 22.04 as home gateway/firewall with dnsmasq as
  dns/dhcp server. Previous upgrade from Ubuntu 20.04 to 22.04 had
  worked without issue.

  After the upgrade to 24.04.01, systemd-resovled was automatically
  enabled. The result was that after a reboot, dnsmasq failed to start,
  as systemd-resolved had already bound to the necessary port. This in
  turn meant that my entire home network lost connectivity as it was
  dependant on dnsmasq running to provide both correct dns and dhcp
  functionality.

  Ideally, during the upgrade process, a check should be made for if
  another dns/dhcp service is already enabled, and if so, not enable
  systemd-resolved.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+bug/2078555/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to