Package: needrestart
Version: 3.7-3.1

The new needrestart offers to restart the LXC containers it has found
somehow, but then it fails for a more complex scenario. Sample session:

# --------------------------------------------------------------------------
root@srvl033a:~# needrestart -u NeedRestart::UI::stdio
Scanning processes...                                                           
                                        
Scanning candidates...                                                          
                                        
Scanning processor microcode...                                                 
                                        
Scanning linux images...                                                        
                                        

Pending kernel upgrade!

Running kernel version:
  6.10.11+bpo-amd64

Diagnostics:
  The currently running kernel version is not the expected kernel version 
6.11.5+bpo-amd64.

Restarting the system to load the new kernel will not be handled automatically, 
so you should consider rebooting.
[Return]


The processor microcode seems to be up-to-date.

Restarting services...
Services to be restarted:
Restart «dbus.service»? [yNas?] 
Restart «getty@tty1.service»? [yNas?] 
Restart «lxc»? [yNas?] 
Restart «lxc-monitord.service»? [yNas?] 
Restart «lxc-net»? [yNas?] 
Restart «serial-getty@ttyS0.service»? [yNas?] 
Restart «systemd-logind.service»? [yNas?] 
Restart «unattended-upgrades.service»? [yNas?] 
Service restarts being deferred:
 /etc/needrestart/restart.d/dbus.service
 systemctl restart getty@tty1.service
 systemctl restart lxc.service
 systemctl restart lxc-monitord.service
 systemctl restart lxc-net.service
 systemctl restart serial-getty@ttyS0.service
 systemctl restart systemd-logind.service
 systemctl restart unattended-upgrades.service

Restarting containers...
Containers to be restarted:
Restart «LXC debian10»? [Ynas?] 
 lxc-stop --reboot --name debian10
lxc-stop: debian10: ../src/lxc/tools/lxc_stop.c: lxc_stop_main: 169 debian10 is 
not running
Restart «LXC nfs00»? [Ynas?] 
 lxc-stop --reboot --name nfs00
lxc-stop: nfs00: ../src/lxc/tools/lxc_stop.c: lxc_stop_main: 169 nfs00 is not 
running
Restart «LXC sample1a»? [Ynas?] 
 lxc-stop --reboot --name sample1a
lxc-stop: sample1a: ../src/lxc/tools/lxc_stop.c: lxc_stop_main: 169 sample1a is 
not running
Restart «LXC sample1c»? [Ynas?] 
 lxc-stop --reboot --name sample1c
lxc-stop: sample1c: ../src/lxc/tools/lxc_stop.c: lxc_stop_main: 169 sample1c is 
not running

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host.
# --------------------------------------------------------------------------


Without knowing(!) the path of the container config files restarting the
LXC containers is dangerous. Its easy to start a second instance by
accident, or to fail, as shown above.

A wild guess, /var/lib/lxc/name/config must be the right file, if it exists,
would be fatal. needrestart has to obtain the path to the right, unmodified
config file path from LXC, if the container is already running.


Regards

Harri

Reply via email to