network-manager SRU flags system for restart required but also restarted the service
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
network-manager (Ubuntu) |
Fix Released
|
Low
|
Unassigned | ||
Mantic |
New
|
Undecided
|
Unassigned |
Bug Description
[ Impact ]
* During an upgrade (or installation) of the network-manager package, its debian/
* It requests a reboot, by calling into /usr/share/
* Restarting the systemd service AND asking for a reboot isn't needed. Just the service restart is enough and we shouldn't ask for a reboot as that is bad UX
[ Test Plan ]
* Reboot your system (or clear /var/run/
echo "" | sudo tee /var/run/
* Install network-manager from mantic-proposed
apt install [--reinstall] -t mantic-proposed network-manager
* Observe that the NetworkManager.
systemctl status Networkmanager.
● NetworkManager.
Loaded: loaded (/lib/systemd/
Active: active (running) since Wed 2023-10-25 15:21:27 CEST; 2min ago
Docs: man:NetworkMana
Main PID: 3880250 (NetworkManager)
Tasks: 4 (limit: 28344)
Memory: 6.1M
CPU: 425ms
CGroup: /system.
* Observe that network-manager was NOT written to /var/run/
cat /var/run/
* Observe that no GUI popped up asking you for a reboot because of NetworkManager
[ Where problems could occur ]
* This change is touching a maintainer script (.postinst)
* Failures or syntax errors could leave the network-manager package unconfigured
* It could break installation of the network-manager package
[ Other Info ]
* This SRU should probably just be staged, using `block-
=== original description ===
After applying the network-manager SRU in mantic, I get a notification that a system restart is required to fully apply updates.
This immediately raised a question, because I KNOW my network connection was restarted when the SRU was installed (I have a VPN that did not auto-reconnect).
And I checked the state of the process - it was definitely restarted and is running from the binary currently on disk.
The network-manager postinst has the following code:
# request a reboot (NM tears down interfaces on restart
# which is not the way we want to go)
[ -x /usr/share/
But the service restart is also happening. debian/rules currently has:
override_
No other systemd overrides. Nothing inhibits the restart of the service.
It needs to be one or the other. And if we're doing SRUs of network-manager, then this is bad UX for users applying their daily updates and should be fixed in SRU.
ProblemType: Bug
DistroRelease: Ubuntu 23.10
Package: network-manager 1.44.2-1ubuntu1.1
ProcVersionSign
Uname: Linux 6.5.0-9-generic x86_64
NonfreeKernelMo
ApportVersion: 2.27.0-0ubuntu5
Architecture: amd64
CasperMD5CheckR
CurrentDesktop: ubuntu:GNOME
Date: Tue Oct 24 08:19:38 2023
InstallationDate: Installed on 2019-12-23 (1401 days ago)
InstallationMedia: Ubuntu 19.10 "Eoan Ermine" - Release amd64 (20191017)
RebootRequiredPkgs: Error: path contained symlinks.
SourcePackage: network-manager
UpgradeStatus: Upgraded to mantic on 2023-10-16 (8 days ago)
nmcli-nm:
RUNNING VERSION STATE STARTUP CONNECTIVITY NETWORKING WIFI-HW WIFI WWAN-HW WWAN
running 1.44.2 connected started full enabled enabled enabled missing enabled
Changed in network-manager (Ubuntu): | |
importance: | Undecided → Low |
status: | Confirmed → Triaged |
description: | updated |
tags: | added: block-proposed-mantic |
tags: | removed: block-proposed-mantic |
tags: | added: block-proposed-mantic |
tags: | removed: block-proposed-mantic |
When I added notify- reboot- required years ago, I believe I also suppressed the automatic restart of NetworkManager. At the time, I figured it was better for users to not temporarily lose network connectivity during the upgrade.
However, the snippet disabling restarting NetworkManager was later dropped.
I agree that it does not make sense to both restart NetworkManager and have NetworkManager request restarting the computer.
I do not believe we have a desktop policy to help us determine when it is better to either restart services or notify that a computer restart is recommended.