Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 387679 - app-emulation/lxc-0.7.5-r2: stop() doesn't stop container gracefully
Summary: app-emulation/lxc-0.7.5-r2: stop() doesn't stop container gracefully
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Diego Elio Pettenò (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-19 13:57 UTC by Alexander Y. Fomichev
Modified: 2011-10-19 17:53 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 Y. Fomichev 2011-10-19 13:57:11 UTC
Hi,
currently loop which should waiting for for containers stops gracefully just doesn't work:
        while [ -n "${missingprocs}" -a $i -lt ${TIMEOUT} ]; do
                sleep 1
                missingprocs=$(pgrep -P ${init_pid})
                i=$(expr $i + 1)
        done
because missingprocs is not defined on first step.

Reproducible: Always

Steps to Reproduce:
1. create somewhat-container
2. /etc/ini.d/lxc.somewhat-container start
3. lxc-stop -nlxc.somewhat-container
4. lxc-start -nlxc.somewhat-container
5. /etc/ini.d/lxc.somewhat-container stop
 
Actual Results:  
container will be stopped immediately 

Expected Results:  
container shutdown gracefully, i.e. 'shutdown -r now' initiated and init scripts have a reasonable time to stop gracefully.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2011-10-19 17:08:22 UTC
Isn't this the same problem as bug #387675?
Comment 2 Alexander Y. Fomichev 2011-10-19 17:39:41 UTC
(In reply to comment #1)
> Isn't this the same problem as bug #387675?

no, this all about processes _inside_ the container but #387675 could send SIGINT to all of the process on the _host_, so it's much more critical.
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-10-19 17:53:20 UTC
Okay logic was changed recently and I missed something it seems; fixed now.