Thank you for your hint!
Looks like it worked with needrestart for `sudo systemd-run apt-get reinstall 
-y libc6`.

First I thought it didn't work, because `needrestart -r l` listed:
---
root@vps:~# needrestart -r l
Scanning processes...                                                           
                                        
Scanning candidates...                                                          
                                        
Scanning linux images...                                                        
                                        

Running kernel seems to be up-to-date.

Services to be restarted:
 systemctl restart ssh.service

Service restarts being deferred:
 /etc/needrestart/restart.d/dbus.service
 systemctl restart getty@tty1.service
 systemctl restart systemd-logind.service
 systemctl restart unattended-upgrades.service
 systemctl restart user@1000.service

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.
---

But ... after about a or two minute, it changed to:
---
root@vps:~# needrestart -r l
Scanning processes...                                                           
                                        
Scanning candidates...                                                          
                                        
Scanning linux images...                                                        
                                        

Running kernel seems to be up-to-date.

Services to be restarted:

Service restarts being deferred:
 /etc/needrestart/restart.d/dbus.service
 systemctl restart getty@tty1.service
 systemctl restart systemd-logind.service
 systemctl restart unattended-upgrades.service
 systemctl restart user@1000.service

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.
---

For the sake of completeness, the `journalctl --unit 
run-r16104e267a224d369bcd2911302deff2.service`:
---
Jun 12 14:04:56 vps.acme.local systemd[1]: Started /usr/bin/apt-get reinstall 
-y libc6.
Jun 12 14:04:57 vps.acme.local apt-get[636754]: Reading package lists...
Jun 12 14:04:57 vps.acme.local apt-get[636754]: Building dependency tree...
Jun 12 14:04:57 vps.acme.local apt-get[636754]: Reading state information...
Jun 12 14:04:58 vps.acme.local apt-get[636754]: 0 upgraded, 0 newly installed, 
1 reinstalled, 0 to remove and 3 not upgraded.
Jun 12 14:04:58 vps.acme.local apt-get[636754]: Need to get 3,235 kB of 
archives.
Jun 12 14:04:58 vps.acme.local apt-get[636754]: After this operation, 0 B of 
additional disk space will be used.
Jun 12 14:04:58 vps.acme.local apt-get[636754]: Get:1 
http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libc6 amd64 
2.35-0ubuntu3.8 [3,235 kB]
Jun 12 14:04:59 vps.acme.local apt-get[636760]: debconf: unable to initialize 
frontend: Dialog
Jun 12 14:04:59 vps.acme.local apt-get[636760]: debconf: (TERM is not set, so 
the dialog frontend is not usable.)
Jun 12 14:04:59 vps.acme.local apt-get[636760]: debconf: falling back to 
frontend: Readline
Jun 12 14:04:59 vps.acme.local apt-get[636760]: debconf: unable to initialize 
frontend: Readline
Jun 12 14:04:59 vps.acme.local apt-get[636760]: debconf: (This frontend 
requires a controlling tty.)
Jun 12 14:04:59 vps.acme.local apt-get[636760]: debconf: falling back to 
frontend: Teletype
Jun 12 14:04:59 vps.acme.local apt-get[636760]: dpkg-preconfigure: unable to 
re-open stdin:
Jun 12 14:04:59 vps.acme.local apt-get[636754]: Fetched 3,235 kB in 1s (3,514 
kB/s)
Jun 12 14:04:59 vps.acme.local apt-get[636754]: [615B blob data]
Jun 12 14:04:59 vps.acme.local apt-get[636754]: Preparing to unpack 
.../libc6_2.35-0ubuntu3.8_amd64.deb ...
Jun 12 14:04:59 vps.acme.local apt-get[636754]: debconf: unable to initialize 
frontend: Dialog
Jun 12 14:04:59 vps.acme.local apt-get[636754]: debconf: (TERM is not set, so 
the dialog frontend is not usable.)
Jun 12 14:04:59 vps.acme.local apt-get[636754]: debconf: falling back to 
frontend: Readline
Jun 12 14:04:59 vps.acme.local apt-get[636754]: Unpacking libc6:amd64 
(2.35-0ubuntu3.8) over (2.35-0ubuntu3.8) ...
Jun 12 14:04:59 vps.acme.local apt-get[636754]: Setting up libc6:amd64 
(2.35-0ubuntu3.8) ...
Jun 12 14:05:00 vps.acme.local apt-get[636754]: debconf: unable to initialize 
frontend: Dialog
Jun 12 14:05:00 vps.acme.local apt-get[636754]: debconf: (TERM is not set, so 
the dialog frontend is not usable.)
Jun 12 14:05:00 vps.acme.local apt-get[636754]: debconf: falling back to 
frontend: Readline
Jun 12 14:05:00 vps.acme.local apt-get[636754]: Processing triggers for 
libc-bin (2.35-0ubuntu3.8) ...
Jun 12 14:05:03 vps.acme.local apt-get[636971]: Running kernel seems to be 
up-to-date.
Jun 12 14:05:03 vps.acme.local apt-get[636971]: Restarting services...
Jun 12 14:05:03 vps.acme.local apt-get[636971]:  systemctl restart 
accounts-daemon.service apache2.service cron.service elasticsearch.service 
fail2ban.service i>
Jun 12 14:05:33 vps.acme.local apt-get[636971]: Service restarts being deferred:
Jun 12 14:05:33 vps.acme.local apt-get[636971]:  systemctl restart 
ModemManager.service
Jun 12 14:05:33 vps.acme.local apt-get[636971]:  
/etc/needrestart/restart.d/dbus.service
Jun 12 14:05:33 vps.acme.local apt-get[636971]:  systemctl restart 
getty@tty1.service
Jun 12 14:05:33 vps.acme.local apt-get[636971]:  systemctl restart 
systemd-logind.service
Jun 12 14:05:33 vps.acme.local apt-get[636971]:  systemctl restart 
unattended-upgrades.service
Jun 12 14:05:33 vps.acme.local apt-get[636971]:  systemctl restart 
user@1000.service
Jun 12 14:05:33 vps.acme.local apt-get[636971]: No containers need to be 
restarted.
Jun 12 14:05:33 vps.acme.local apt-get[636971]: No user sessions are running 
outdated binaries.
Jun 12 14:05:33 vps.acme.local apt-get[636971]: No VM guests are running 
outdated hypervisor (qemu) binaries on this host.
Jun 12 14:05:35 vps.acme.local systemd[1]: 
run-r16104e267a224d369bcd2911302deff2.service: Deactivated successfully.
Jun 12 14:05:35 vps.acme.local systemd[1]: 
run-r16104e267a224d369bcd2911302deff2.service: Consumed 6.537s CPU time.
---

When the next auto update is triggered, I will give you again a
feedback.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2004203

Title:
  With needrestart, apt-get does not respect non-interactive instruction
  when upgrading services

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


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to