[SOLVED] Gentoo LXC does not stop

Claus Beckenauer

New Member
May 11, 2020
12
1
3
Hi,

my fresh installed and than updated Gentoo LXC (gentoo-current-default_2020031010_amd64.tar.gz) doesn't reboot / shutdown properly.
Before updating it worked quite well.

The Debug log tells me, that there must be something wrong with the signal handling (entire log file attached)

Code:
command 'lxc-stop -n 104 --nokill --timeout 60' failed: exit code 1

Code:
lxc-start 104 20210117154015.668 NOTICE   start - start.c:post_start:2050 - Started "/sbin/init" with pid "21262"
lxc-start 104 20210117154015.668 NOTICE   start - start.c:signal_handler:404 - Received 17 from pid 21253 instead of container init 21262
lxc-start 104 20210117154105.820 DEBUG    start - start.c:signal_handler:421 - Container init process 21262 exited
lxc-start 104 20210117154105.821 DEBUG    start - start.c:__lxc_start:1989 - Unknown exit status for container "104" init 9
lxc-start 104 20210117154105.821 INFO     error - error.c:lxc_error_set_and_log:33 - Child <21262> ended on signal (9)

Any hints or Ideas whats going wrong with my Gentoo?

LXC Foreground booting

Code:
$ lxc-start -n 104 -F -l DEBUG -o /root/104.start-lxc.log
INIT: version 2.97 booting

   OpenRC 0.42.1 is starting up Gentoo Linux (x86_64) [LXC]

* /proc is already mounted
* Mounting /run ...
* /run/openrc: creating directory
* /run/lock: creating directory
* /run/lock: correcting owner
* Caching service dependencies ...                                                                                                                                                                          [ ok ]
* Mounting cgroup filesystem ...                                                                                                                                                                            [ ok ]
mount: /sys/fs/cgroup/openrc: permission denied.
mount: /sys/fs/cgroup/cpu: permission denied.
mount: /sys/fs/cgroup/cpuacct: permission denied.
mount: /sys/fs/cgroup/net_cls: permission denied.
mount: /sys/fs/cgroup/net_prio: permission denied.
* Setting up tmpfiles.d entries for /dev ...                                                                                                                                                                [ ok ]
* Configuring kernel parameters ...
sysctl: permission denied on key "fs.protected_symlinks"
sysctl: permission denied on key "fs.protected_hardlinks"
* Unable to configure some kernel parameters                                                                                                                                                                [ !! ]
* ERROR: sysctl failed to start
* Creating user login records ...                                                                                                                                                                           [ ok ]
* Wiping /tmp directory ...                                                                                                                                                                                 [ ok ]
* Bringing up network interface lo ...                                                                                                                                                                      [ ok ]
* Updating /etc/mtab ...
* Creating mtab symbolic link                                                                                                                                                                               [ ok ]
* Setting up tmpfiles.d entries ...                                                                                                                                                                         [ ok ]
INIT: Entering runlevel: 3
* Configuring kernel parameters ...
sysctl: permission denied on key "fs.protected_symlinks"
sysctl: permission denied on key "fs.protected_hardlinks"
* Unable to configure some kernel parameters                                                                                                                                                                [ !! ]
* ERROR: sysctl failed to start
* Bringing up interface eth0
*   Caching network module dependencies
*   dhcp ...
*     Running udhcpc ...
udhcpc: started, v1.32.1
udhcpc: sending discover
udhcpc: sending select for 192.168.178.107
udhcpc: lease of 192.168.178.107 obtained, lease time 86400                                                                                                                                                  [ ok ]
*     received address 192.168.178.107/24                                                                                                                                                                   [ ok ]
* Starting sshd ...                                                                                                                                                                                         [ ok ]
* Starting local ...

PVE Version
Code:
$ pveversion
pve-manager/6.3-3/eee5f901 (running kernel: 5.4.78-2-pve)

LXC Config

Code:
$ pct config 104
arch: amd64
cores: 4
features: nesting=1
hostname: ct-gentoo-nginx
memory: 4096
net0: name=eth0,bridge=vmbr3,firewall=1,hwaddr=3A:FB:F3:5C:17:08,ip=dhcp,ip6=dhcp,type=veth
net1: name=eth1,bridge=vmbr0,hwaddr=36:9C:9B:9F:25:23,ip=10.0.0.3/24,type=veth
onboot: 1
ostype: gentoo
rootfs: local-zfs:basevol-201-disk-0/subvol-104-disk-0,mountoptions=noatime,size=8G
startup: order=3
swap: 4096
 

Attachments

  • 104.lxc-start.log
    26.1 KB · Views: 1
Seems, that an failure during updating the gentoo installation crashed my inittab.

I've accidentally removed
Code:
pf:12345:powerwait:/sbin/halt
from the inittab (during merging inittab with the updated version).

So inserting that line fixed the problem.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!