"Brian K. White" <br...@aljex.com> writes:

> On 12/6/2010 3:01 AM, Trent W. Buck wrote:
>> Trent W. Buck writes:
>>
>>> This post describes my attempts to get "clean" shutdown of Ubuntu 10.04
>>> containers.  The goal here is that a "shutdown -h now" of the dom0
>>> should not result in a potentially inconsistent domU postgres database,
>>> cf. a naive lxc-stop.
>
>
> In my previous note about parallel shutdowns, that same system also
> works for this too. User may ssh in to the container as root and issue
> "shutdown-r now" or "shutdown -h now" and it works as expected from
> their point of view. No cron job on the host. In lxc 0.6.5 you would
> have a watchdog process per container that uses inotify to be alerted
> the instant the containers runlevel file and/or cgroup tasks list file
> changed. I had that as just a shell function right in the init script.
> In 0.7.2 this is handled by lxc internally and is rather more
> reliable, since it was possible to break or kill the separate watchdog
> processes.

I think that handling relies on /var/run/utmp not being "hidden" inside
a tmpfs, which is why the shipped lxc-ubuntu template goes out of its
way to avoid this.

I know that "shutdown -h now" *does* work correctly if /var/run isn't a
tmpfs; it hadn't occurred to me that this might also handle "shutdown -r
now" correctly -- by the time I came to care about rebooting containers,
I'd already decided that having a tmpfs was more important than
lxc-start's autodetection.

I might revise that opinion after trying to handle rebooting manually --
particularly since I've decided to administratively prohibit sys_admin
inside containers.


------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users

Reply via email to