globalcitizen / lxc-gentoo

lxc-gentoo: Linux Containers Gentoo Guest Template Script
http://globalcitizen.github.com/lxc-gentoo
GNU General Public License v3.0
85 stars 32 forks source link

lxc instance doesn't shutdown #70

Closed atykhonov closed 10 years ago

atykhonov commented 10 years ago

When I'm in lxc-gentoo I execute poweroff:

# poweroff 

Broadcast message from root@gentix (console) (Sat Apr 26 01:14:13 2014):

The system is going down for system halt NOW!
INIT: Switching to runlevel: 0
INIT: Sending processes the TERM signal
gentix ~ #  * Stopping local
 [ ok ]
 * Terminating remaining processes ...
 [ ok ]
 * Killing remaining processes ...
 [ ok ]
 * Saving dependency cache ...
 [ ok ]
INIT: no more processes left in this runlevel

The terminal doesn't react on any keyboard actions. And also I can see the process in ps aux output:

# ps aux | grep lxc
root     13153  0.0  0.0  21084  1136 pts/10   S+   01:01   0:00 lxc-start -f gentix.conf -n gentix
root     13853  0.0  0.0  12580  1080 pts/18   S+   01:17   0:00 grep --colour=auto lxc

To shutdown lxc instance I see only way: kill -9 13153.

# uname -a
Linux demi 3.12.13-gentoo #2 SMP Thu Apr 24 13:04:29 EEST 2014 x86_64 Intel(R) Core(TM) i5-2540M CPU @ 2.60GHz GenuineIntel GNU/Linux
# lxc-checkconfig 
Kernel configuration not found at /proc/config.gz; searching...
Kernel configuration found at /boot/config-3.12.13-gentoo
--- Namespaces ---
Namespaces: enabled
Utsname namespace: enabled
Ipc namespace: enabled
Pid namespace: enabled
User namespace: enabled
Network namespace: enabled
Multiple /dev/pts instances: enabled

--- Control groups ---
Cgroup: enabled
Cgroup clone_children flag: enabled
Cgroup device: enabled
Cgroup sched: enabled
Cgroup cpu account: enabled
Cgroup memory controller: missing
Cgroup cpuset: enabled

--- Misc ---
Veth pair device: enabled
Macvlan: enabled
Vlan: enabled
File capabilities: enabled
globalcitizen commented 10 years ago

This was resolved with yesterday's update... you need to stop LXC from dropping the sys_boot capability, then it will work fine.