[SOLVED] Debian 9 lxc shutdown issue

dafydd

Renowned Member
Apr 24, 2010
44
7
73
Cardiff, Wales
Hi,
I am running the latest Proxmox v9 with a container running Debian 9 (yes it's very old, running an application which is currently being upgraded).

It was originally created more than 6 years ago and is running fine. I've now created a new container with the same original Debian 9 template (debian-9.0-standard_9.7_1_amd64) using the same settings and options.

It starts up and shuts down correctly with that version. I then applied updates from archive.debian.org which applies many updated packages including upgrading systemd from 232-25+deb9u8 to deb9u18
Now the container won't shutdown cleanly (it times out after 60 seconds). It works with a 'stop'.

Is there any way I can debug what is happening during shutdown ?
 
Based on the behavior observed before and after the update, this might be related to systemd. However, there is currently not enough information to determine which service or process is preventing the container from shutting down. After restarting the container, could you please share the output of the following command?

Code:
journalctl -b -1 -e
 
Containers don't stay compatible for ever as they must share the (much newer) host kernel. Similar issues with Debian and Ubuntu templates have been reported on the forum before. This issue might look a bit atypical, since the problems starts after updating it to the latest Debian 9, but systemd versions are known to cause container compatibility issues. Maybe it's time to run this in a VM instead (so it can run on the Debian 9 kernel)?
 
  • Like
Reactions: Johannes S
A VM may be an option. What I've done now is take a backup and restore of the original working container to a new one. This works fine even on a different physical server.

The one difference I can spot is that the fresh install is running systemd-networkd and systemd-resolved which the old one isn't. That may be the issue as there were some errors about failing to shut down the network interface.
 
  • Like
Reactions: kawano-y
Don't think it's the config. It matches the old container details.

arch: amd64
cores: 2
hostname: test
memory: 2048
net0: name=eth0,bridge=vmbr0,firewall=1,gw=192.168.0.1,hwaddr=XX:XX:XX:XX:XX:XX,ip=192.168.0.29/24,type=veth
onboot: 1
ostype: debian
rootfs: vmdata:vm-114-disk-0,size=21G
swap: 1024

I also tried disabling systemd-networkd and systemd-resolved but that didn't solve it. I'm now just using the snapshot of the old container and have been cleaning it up.
 
No difference. I had initially created the fresh container with nesting enabled (by mistake as it doesn't really need it). But the old containers work without nesting.