[lxc-users] lxc stop ignored

0 views
Skip to first unread message

Aleksandar Ivanisevic

unread,
Sep 4, 2020, 3:33:05 AM9/4/20
to lxc-...@lists.linuxcontainers.org
Hi,

I have containerised my old centos6 physical machine by rsyncing into
an empty container and fixing the uids and so far so good, except lxc
stop doesn't work, it simply does nothing, just hangs in there.

I have launched a centos6 image from images.linuxcontainers.org and
with it it works OK, but even after a few hours spent on this I
couldn't figure out what is it that the official image does
differently than my rsynced copy

how does lxc/lxd signal the container that it needs to shut down? How
does one debug this in general? Triex lxc stop --verbose --debug but
all i'm seeing are API requests going back and forth. tried running
lxd --debug but still nothing in the logs.

thanks,

Harald Dunkel

unread,
Sep 4, 2020, 4:16:24 AM9/4/20
to lxc-...@lists.linuxcontainers.org
Hi Aleksandar,

I've found some old README for configuring RedHat LXC containers:

# create an upstart handler for SIGPWR
cat <<EOF >/etc/init/power-status-changed.conf
# power-status-changed - shutdown on SIGPWR
#
start on power-status-changed

exec /sbin/shutdown -h now "SIGPWR received"
EOF
# for RHEL5: edit /etc/inittab to set
pf::powerfail:/sbin/shutdown -h now "Power Failure; System Shutting Down"


But I am not sure if this is applicable to CentOS 6.

Hope this helps
Harri

Aleksandar Ivanisevic

unread,
Sep 4, 2020, 4:30:49 AM9/4/20
to LXC users mailing-list
Hi,

perfect, thank you, that file is still there in centos6 image. It is actually right there in the source, I don’t know how I missed it, probably too far down ;)




_______________________________________________
lxc-users mailing list
lxc-...@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users


Reply all
Reply to author
Forward
0 new messages