Re: [Lxc-users] On clean reboot of Ubuntu 10.04 containers

2010-12-06 Thread Trent W. Buck
I rewrote my init script, too, and now I'm pretty happy. Example interactions below. In the second case, I've dialled the timeout down to 2s to simulate hung containers. r...@omega:~# /etc/init.d/lxc restart Stopping LXC containers: krb-client failed! Killing LXC containers: kdc lda

Re: [Lxc-users] On clean reboot of Ubuntu 10.04 containers

2010-12-06 Thread Trent W. Buck
t...@cybersource.com.au (Trent W. Buck) writes: > I might revise that opinion after trying to handle rebooting manually -- > particularly since I've decided to administratively prohibit sys_admin > inside containers. OK, so I got it working. The sticking points are: - I *MUST* drop CAP_SYS_

Re: [Lxc-users] On clean shutdown of Ubuntu 10.04 containers

2010-12-06 Thread Trent W. Buck
"Brian K. White" writes: > On 12/6/2010 6:49 PM, Trent W. Buck wrote: >> "Brian K. White" writes: >> >>> On 12/6/2010 2:42 AM, Trent W. Buck wrote: I use the latter in my customized /etc/init.d/lxc stop rule. Note that the lxc-wait's SHOULD be parallelized, but this is not possibl

Re: [Lxc-users] On clean shutdown of Ubuntu 10.04 containers

2010-12-06 Thread Brian K. White
On 12/6/2010 6:49 PM, Trent W. Buck wrote: > "Brian K. White" writes: > >> On 12/6/2010 2:42 AM, Trent W. Buck wrote: >>> I use the latter in my customized /etc/init.d/lxc stop rule. >>> Note that the lxc-wait's SHOULD be parallelized, but this is not >>> possible as at lxc 0.7.2 :-( >> >> Sure it

Re: [Lxc-users] On clean reboot of Ubuntu 10.04 containers

2010-12-06 Thread Trent W. Buck
"Brian K. White" 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

Re: [Lxc-users] On clean shutdown of Ubuntu 10.04 containers

2010-12-06 Thread Trent W. Buck
"Michael H. Warfield" writes: >> Ubuntu 10.04 simply REQUIRES /var/run to be a tmpfs; this is hard-coded >> into mountall's (upstart's) /lib/init/fstab. > > Are you absolutely SURE about this? I was under the impression this was > under control of the /etc/default/rcS file and the RAMRUN option.

Re: [Lxc-users] On clean shutdown of Ubuntu 10.04 containers

2010-12-06 Thread Trent W. Buck
"Michael H. Warfield" writes: > Yeah, that's something where I wish we had an "onboot" and/or "disabled" > config file like OpenVZ does. So you can have some configured but that > don't autoboot when you boot the system. As that stands, you would have > to rename or remove the config file. :-P

Re: [Lxc-users] On clean shutdown of Ubuntu 10.04 containers

2010-12-06 Thread Trent W. Buck
"Brian K. White" writes: > On 12/6/2010 2:42 AM, Trent W. Buck wrote: >> I use the latter in my customized /etc/init.d/lxc stop rule. >> Note that the lxc-wait's SHOULD be parallelized, but this is not >> possible as at lxc 0.7.2 :-( > > Sure it is. Sorry, I meant lxc-wait(8) cannot be paralleli

Re: [Lxc-users] On clean shutdown of Ubuntu 10.04 containers

2010-12-06 Thread Trent W. Buck
"Serge E. Hallyn" writes: > Quoting Trent W. Buck (t...@cybersource.com.au): >> Unfortunately, lxc 0.7's utmp detect requires /var/run to NOT be a >> tmpfs. The shipped lxc-ubuntu script works around this by deleting the >> ifstate file and not mounting a tmpfs on /var/run, but to me that is >>

Re: [Lxc-users] On clean shutdown of Ubuntu 10.04 containers

2010-12-06 Thread Michael H. Warfield
On Mon, 2010-12-06 at 17:38 -0500, Brian K. White wrote: > On 12/6/2010 3:34 PM, Michael H. Warfield wrote: > > On Mon, 2010-12-06 at 12:38 -0500, Brian K. White wrote: > >> On 12/6/2010 2:42 AM, Trent W. Buck wrote: > >>> This post describes my attempts to get "clean" shutdown of Ubuntu 10.04 > >

Re: [Lxc-users] On clean shutdown of Ubuntu 10.04 containers

2010-12-06 Thread Brian K. White
On 12/6/2010 3:34 PM, Michael H. Warfield wrote: > On Mon, 2010-12-06 at 12:38 -0500, Brian K. White wrote: >> On 12/6/2010 2:42 AM, Trent W. Buck wrote: >>> 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 dom

Re: [Lxc-users] On clean shutdown of Ubuntu 10.04 containers

2010-12-06 Thread Michael H. Warfield
On Mon, 2010-12-06 at 18:42 +1100, Trent W. Buck wrote: > 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. >

Re: [Lxc-users] On clean shutdown of Ubuntu 10.04 containers

2010-12-06 Thread Michael H. Warfield
On Mon, 2010-12-06 at 12:38 -0500, Brian K. White wrote: > On 12/6/2010 2:42 AM, Trent W. Buck wrote: > > 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 inconsiste

Re: [Lxc-users] On clean reboot of Ubuntu 10.04 containers

2010-12-06 Thread Brian K. White
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 n

Re: [Lxc-users] On clean shutdown of Ubuntu 10.04 containers

2010-12-06 Thread Brian K. White
On 12/6/2010 2:42 AM, Trent W. Buck wrote: 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. As at Ubuntu 10.04 w

Re: [Lxc-users] On clean shutdown of Ubuntu 10.04 containers

2010-12-06 Thread atp
Hi, The way it works on 0.7 was always a stopgap - there does not seem to be a clean way of doing it that bridges both sysv init and upstart. The ideal thing would be to intercept the reboot() syscall. The clean way would be in the kernel. The nasty way would be via LD_PRELOAD or other tricks. The

Re: [Lxc-users] On clean shutdown of Ubuntu 10.04 containers

2010-12-06 Thread Serge E. Hallyn
Quoting Trent W. Buck (t...@cybersource.com.au): > Unfortunately, lxc 0.7's utmp detect requires /var/run to NOT be a > tmpfs. The shipped lxc-ubuntu script works around this by deleting the > ifstate file and not mounting a tmpfs on /var/run, but to me that is > simply waiting for something else

Re: [Lxc-users] 0.7.2 - 0.7.3 changes

2010-12-06 Thread Ozan Çağlayan
Cuma 12 Kasım 2010 günü (saat 12:05:29) Daniel Lezcano şunları yazmıştı: > On 11/09/2010 09:33 PM, Brian K. White wrote: > > If I understood correctly, you are using the git head which is 0.7.3 + 1 > patch, right ? > > After your container is started, what gives the ouput of lxc-ps --lxc ? We'r

Re: [Lxc-users] limiting RAM usage and disk space usage

2010-12-06 Thread Matt Rechenburg
Hi Gordon, On 12/03/2010 05:59 PM, Gordon Henderson wrote: > On Fri, 3 Dec 2010, Matt Rechenburg wrote: > > >> Hi Lxc team, >> >> actually I would vote against a loop mount. >> > I would "vote" to allow the local systems administrator the choice of what > suits them best. > fully ag

Re: [Lxc-users] On clean reboot of Ubuntu 10.04 containers

2010-12-06 Thread Trent W. Buck
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. As this is largely working for me,