debcrafters-packages team mailing list archive
-
debcrafters-packages team
-
Mailing list archive
-
Message #05304
[Bug 2120446] [NEW] needsrestart may kill existing ssh connection without a warning
Public bug reported:
Thanks to the change described in
https://discourse.ubuntu.com/t/needrestart-changes-in-
ubuntu-24-04-service-restarts/44671 one can end up with situation where
you have ssh connection to a server and run `sudo apt dist-upgrade` and
`needsrestart` will kill the network connection for your ssh connection
before the command finishes.
In example case the final lines of output I saw was as follows:
```
Restarting the system to load the new kernel will not be handled automatically, so you should consider rebooting.
The processor microcode seems to be up-to-date.
Restarting services...
systemctl restart accounts-daemon.service atd.service cron.service ifup@eno2.395.service multipathd.service munin-node.service ntpsec.service opendkim.service packagekit.service polkit.service postfix@-.service rsyslog.service smartmontools.service spamd.service thermald.service
```
I think ifup@eno2.395.service was the service that killed my ssh
connection and to make things worse, I couldn't reconnect to the system
using said connection before full system restart so "restarting" the
network connection failed somehow. Luckily this remote server had other
ways to restart the system! At very least needsrestart should delay
killing network connection until there are no existing ssh connection,
preferably no connections of any kind.
Feel free to randomly restart things if `unattended-upgrades` is doing
the upgrade but do not mess with existing connections if user is running
apt manually!
** Affects: needrestart (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of
Debcrafters packages, which is subscribed to needrestart in Ubuntu.
https://bugs.launchpad.net/bugs/2120446
Title:
needsrestart may kill existing ssh connection without a warning
Status in needrestart package in Ubuntu:
New
Bug description:
Thanks to the change described in
https://discourse.ubuntu.com/t/needrestart-changes-in-
ubuntu-24-04-service-restarts/44671 one can end up with situation
where you have ssh connection to a server and run `sudo apt dist-
upgrade` and `needsrestart` will kill the network connection for your
ssh connection before the command finishes.
In example case the final lines of output I saw was as follows:
```
Restarting the system to load the new kernel will not be handled automatically, so you should consider rebooting.
The processor microcode seems to be up-to-date.
Restarting services...
systemctl restart accounts-daemon.service atd.service cron.service ifup@eno2.395.service multipathd.service munin-node.service ntpsec.service opendkim.service packagekit.service polkit.service postfix@-.service rsyslog.service smartmontools.service spamd.service thermald.service
```
I think ifup@eno2.395.service was the service that killed my ssh
connection and to make things worse, I couldn't reconnect to the
system using said connection before full system restart so
"restarting" the network connection failed somehow. Luckily this
remote server had other ways to restart the system! At very least
needsrestart should delay killing network connection until there are
no existing ssh connection, preferably no connections of any kind.
Feel free to randomly restart things if `unattended-upgrades` is doing
the upgrade but do not mess with existing connections if user is
running apt manually!
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/needrestart/+bug/2120446/+subscriptions
Follow ups