[Lxc-users] shutting down CentOS6 container

Brian K. White brian at aljex.com
Tue Oct 18 15:09:19 UTC 2011


On 10/17/2011 5:01 PM, Papp Tamas wrote:
> On 10/17/2011 10:54 PM, Derek Simkowiak wrote:
>> > /I tried the python script, it just works fine./
>>
>> Q1: How does the "kill -INT init" method affect running processes,
>> especially MySQL and other databases that may need to shutdown
>> gracefully to avoid data corruption?
>>
>> I believe that the child processes (incl. mysqld, apache, etc.) would
>> be able to shutdown gracefully without data corruption, because they'd
>> be killed with a signal that will invoke their internal signal
>> handlers. But, I am looking for independent confirmation.
>
> That's right.
>
>> Q2: How is lxc-stop -n $CONTAINERNAME different from the Python script
>> mentioned below? Will lxc-stop on a container cause an unclean
>> shutdown, or does it also use a Unix signal?
>
> lxc-stop is part of the script.
> If I'm right it's equivalent of pushing the power button of the machine.

I would say it's like pulling the power cord.

Not just being a pedant. The terminology matters since you are trying 
specifically to clarify and nail down exactly that all-important 
behavioral detail.

Pressing the power button is ambiguous since pressing the power button 
can be either a polite signal resulting in a graceful and orderly 
shutdown, OR not, depending on the machine. And that difference is all 
the difference in the world.

Just in case someone asks I guess you could also say lxc-destroy is like 
removing everything but the hard drive.

-- 
bkw




More information about the lxc-users mailing list