Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 427086 - app-emulation/lxc - init.d/lxc stop causes container reboot
Summary: app-emulation/lxc - init.d/lxc stop causes container reboot
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Diego Elio Pettenò (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-18 12:17 UTC by Alexander Zubkov
Modified: 2012-07-21 05:07 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Zubkov 2012-07-18 12:17:50 UTC
I'm trying to stop container by /etc/init.d/lxc.test stop. But container "restarts" immediately after stop. So init.d thinks that container is stopped, but it is working:

lxc ~ # /etc/init.d/lxc.test start
 * Starting test ...                                                      [ ok ]
 * Starting /etc/lxc/test/postup ...                                      [ ok ]
lxc ~ # lxc-info -n test
state:   RUNNING
pid:      9480
lxc ~ # /etc/init.d/lxc.test stop
 * Shutting down system in test ...                                       [ ok ]
 * Stopping test ...                                                      [ ok ]
lxc ~ #

This time in other console:
lxc ~ # lxc-info -n test
state:   RUNNING
pid:      9480
...
lxc ~ # lxc-info -n test
state:   STOPPED
pid:        -1
...
lxc ~ # lxc-info -n test
state:   RUNNING
pid:     10480
lxc ~ # /etc/init.d/lxc.test status
 * status: stopped

As a result, I receive restarted container instead of stopped.
I think this is because init process threats SIGINT as ctrlaltdel. So there should be some other method of shutting down container.
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2012-07-21 05:07:44 UTC
Yes you're right — I decided to fix this by moving to PWR that was already planned anyway. I'll also update sysvinit for shutting down on it.