[lxc-devel] [PATCH 1/1] lxccontainer: don't lock around getstate and freeze/unfreeze

2013-05-28 Thread Serge Hallyn
Those go through commands.c and are already mutex'ed that way. Also remove a unmatched container_disk_unlock in lxcapi_create. Since is_stopped uses getstate which is no longer locked, rename it to drop the _locked suffix. And convert save_config to taking the disk lock. This way the save_ and

Re: [lxc-devel] Container autostart proposal V2

2013-05-28 Thread Serge Hallyn
Quoting Dwight Engen (dwight.en...@oracle.com): > On Tue, 28 May 2013 17:03:43 -0400 > Stéphane Graber wrote: > > > On 05/28/2013 04:53 PM, Serge Hallyn wrote: > > > Quoting Stéphane Graber (stgra...@ubuntu.com): > > >> Hey everyone, > > >> > > >> Thanks for the feedback on my previous autostart

Re: [lxc-devel] Container autostart proposal V2

2013-05-28 Thread Dwight Engen
On Tue, 28 May 2013 17:03:43 -0400 Stéphane Graber wrote: > On 05/28/2013 04:53 PM, Serge Hallyn wrote: > > Quoting Stéphane Graber (stgra...@ubuntu.com): > >> Hey everyone, > >> > >> Thanks for the feedback on my previous autostart proposal. > >> > >> Here's a detailed bullet-point list of what

Re: [lxc-devel] Container autostart proposal V2

2013-05-28 Thread Michael H. Warfield
On Tue, 2013-05-28 at 15:53 -0500, Serge Hallyn wrote: > Quoting Stéphane Graber (stgra...@ubuntu.com): > > Hey everyone, > > > > Thanks for the feedback on my previous autostart proposal. > > > > Here's a detailed bullet-point list of what should be done to implement > > autostarting containers

Re: [lxc-devel] Container autostart proposal V2

2013-05-28 Thread Stéphane Graber
On 05/28/2013 04:37 PM, Michael H. Warfield wrote: > On Tue, 2013-05-28 at 15:58 -0400, Stéphane Graber wrote: >> Hey everyone, > >> Thanks for the feedback on my previous autostart proposal. > >> Here's a detailed bullet-point list of what should be done to implement >> autostarting containers

Re: [lxc-devel] Container autostart proposal V2

2013-05-28 Thread Stéphane Graber
On 05/28/2013 04:53 PM, Serge Hallyn wrote: > Quoting Stéphane Graber (stgra...@ubuntu.com): >> Hey everyone, >> >> Thanks for the feedback on my previous autostart proposal. >> >> Here's a detailed bullet-point list of what should be done to implement >> autostarting containers in upstream LXC. >>

Re: [lxc-devel] [PATCH] lxc-console: use fd instead of 0 in setup_tios

2013-05-28 Thread Serge Hallyn
Quoting Qiang Huang (h.huangqi...@huawei.com): > We should use the fd specified by caller. > > Signed-off-by: Qiang Huang No effective change now, but technically correct. Acked-by: Serge E. Hallyn > --- > src/lxc/lxc_console.c |4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-)

Re: [lxc-devel] [PATCH] lxc.spec.in: remove lxc-shutdown (for commit 3e625e2d)

2013-05-28 Thread Serge Hallyn
Quoting Dwight Engen (dwight.en...@oracle.com): > Signed-off-by: Dwight Engen Acked-by: Serge E. Hallyn > --- > lxc.spec.in | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/lxc.spec.in b/lxc.spec.in > index 5e520c5..e00e60b 100644 > --- a/lxc.spec.in > +++ b/lxc.spec.in > @@ -104,7 +10

Re: [lxc-devel] Container autostart proposal V2

2013-05-28 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): > Hey everyone, > > Thanks for the feedback on my previous autostart proposal. > > Here's a detailed bullet-point list of what should be done to implement > autostarting containers in upstream LXC. > > Changes to the container config: > - ADD: lxc.

Re: [lxc-devel] Container autostart proposal V2

2013-05-28 Thread Michael H. Warfield
On Tue, 2013-05-28 at 15:58 -0400, Stéphane Graber wrote: > Hey everyone, > Thanks for the feedback on my previous autostart proposal. > Here's a detailed bullet-point list of what should be done to implement > autostarting containers in upstream LXC. Yes. I concur with virtually (excuse the p

[lxc-devel] [PATCH 1/1] api_clone: call is_stopped_locked() to avoid deadlock.

2013-05-28 Thread Serge Hallyn
(fyi - I've pushed this to staging to lxc-clone to work again.) Switch lxcapi_clone to use the non-locking is_stopped_locked() instead of c->is_running. Technically as (IIRC) Dwight has mentioned we should probably drop the locking from api_state() altogether, since those are protected through th

[lxc-devel] Container autostart proposal V2

2013-05-28 Thread Stéphane Graber
Hey everyone, Thanks for the feedback on my previous autostart proposal. Here's a detailed bullet-point list of what should be done to implement autostarting containers in upstream LXC. Changes to the container config: - ADD: lxc.start.auto (integer, 0 = disabled, 1 = enabled, default: 0) - AD

Re: [lxc-devel] [Spam-Wahrscheinlichkeit=75]Re: Container autostart proposal

2013-05-28 Thread Michael H. Warfield
On Tue, 2013-05-28 at 14:25 +, Jäkel, Guido wrote: > >> So I'd rather not abuse the sticky bit for that kind of thing, > >> especially as there's no good reason to do so. > >> We can very simply create a separate state file that's removed on > >> shutdown, or just use the one we already have (

[lxc-devel] [PATCH] add console to lxc api

2013-05-28 Thread Dwight Engen
Make lxc_cmd_console() return the fd from the socket connection to the caller. This fd keeps the tty slot allocated until the caller closes it. Returning the fd allows for a long lived process to close the fd and reuse consoles. Add API function for console allocation. Create test program for con

[lxc-devel] [PATCH] lxc.spec.in: remove lxc-shutdown (for commit 3e625e2d)

2013-05-28 Thread Dwight Engen
Signed-off-by: Dwight Engen --- lxc.spec.in | 1 - 1 file changed, 1 deletion(-) diff --git a/lxc.spec.in b/lxc.spec.in index 5e520c5..e00e60b 100644 --- a/lxc.spec.in +++ b/lxc.spec.in @@ -104,7 +104,6 @@ rm -rf %{buildroot} %attr(4111,root,root) %{_bindir}/lxc-attach %attr(4111,root,root) %{

[lxc-devel] [PATCH 1/1] lxc.conf.sgml.in: fill in missing configuration file statements

2013-05-28 Thread Serge Hallyn
Signed-off-by: Serge Hallyn --- doc/lxc.conf.sgml.in | 139 +++ 1 file changed, 139 insertions(+) diff --git a/doc/lxc.conf.sgml.in b/doc/lxc.conf.sgml.in index af8663a..6500e50 100644 --- a/doc/lxc.conf.sgml.in +++ b/doc/lxc.conf.sgml.in @@ -76,6

Re: [lxc-devel] Container autostart proposal

2013-05-28 Thread Michael H. Warfield
Hey all... On Tue, 2013-05-28 at 09:19 -0400, Stéphane Graber wrote: > On 05/28/2013 03:14 AM, Natanael Copa wrote: > > On Mon, 27 May 2013 15:07:03 -0400 > > Stéphane Graber wrote: > > > >> Hello, > >> > >> One feature that distros have been hacking together on their side for a > >> while is c

Re: [lxc-devel] Container autostart proposal

2013-05-28 Thread Dwight Engen
On Tue, 28 May 2013 09:57:13 -0400 "Michael H. Warfield" wrote: > On Tue, 2013-05-28 at 09:29 -0400, Stéphane Graber wrote: > > On 05/28/2013 05:11 AM, Jäkel, Guido wrote: > > > Dear Stéphane, > > > > > > To my opinion, we have to deal with two independent things: > > > System crash recovery an

Re: [lxc-devel] Container autostart proposal

2013-05-28 Thread Dwight Engen
On Mon, 27 May 2013 15:07:03 -0400 Stéphane Graber wrote: > Hello, > > One feature that distros have been hacking together on their side for > a while is container autostart. > > For 1.0 I'd like us to agree on an upstream implementation of this so > distros no longer need to carry patches in l

Re: [lxc-devel] [Spam-Wahrscheinlichkeit=75]Re: Container autostart proposal

2013-05-28 Thread Jäkel , Guido
>> So I'd rather not abuse the sticky bit for that kind of thing, >> especially as there's no good reason to do so. >> We can very simply create a separate state file that's removed on >> shutdown, or just use the one we already have (rootfs.hold). > >I have to also concur with this. I would be ap

Re: [lxc-devel] the solution of top and free in the lxc

2013-05-28 Thread Serge Hallyn
Quoting 魏子然 (duck_...@163.com): > Hello, we encounter a problem in the use of lxc, that the command of free > and top does > not show container\'s cpu and memory but the host server\'s;we know that it > is a problem > of proc directory which is mounted outside the container with remount > opt

Re: [lxc-devel] Container autostart proposal

2013-05-28 Thread Michael H. Warfield
On Tue, 2013-05-28 at 09:29 -0400, Stéphane Graber wrote: > On 05/28/2013 05:11 AM, Jäkel, Guido wrote: > > Dear Stéphane, > > > > To my opinion, we have to deal with two independent things: System crash > > recovery and container startup/shutdown dependencies > > > >> Another problem with this

Re: [lxc-devel] Container autostart proposal

2013-05-28 Thread Stéphane Graber
On 05/28/2013 05:11 AM, Jäkel, Guido wrote: > Dear Stéphane, > > To my opinion, we have to deal with two independent things: System crash > recovery and container startup/shutdown dependencies > >> Another problem with this implementation is that the autostart flag is >> lost when migrating the

Re: [lxc-devel] Container autostart proposal

2013-05-28 Thread Stéphane Graber
On 05/28/2013 03:14 AM, Natanael Copa wrote: > On Mon, 27 May 2013 15:07:03 -0400 > Stéphane Graber wrote: > >> Hello, >> >> One feature that distros have been hacking together on their side for a >> while is container autostart. > ... > >> So I therefore have two proposals on how to implement t

Re: [lxc-devel] Container autostart proposal

2013-05-28 Thread Frederic Crozat
Le lundi 27 mai 2013 à 15:07 -0400, Stéphane Graber a écrit : > Hello, > > One feature that distros have been hacking together on their side for a > while is container autostart. > > For 1.0 I'd like us to agree on an upstream implementation of this so > distros no longer need to carry patches in

Re: [lxc-devel] Container autostart proposal

2013-05-28 Thread Jäkel , Guido
Dear Stéphane, To my opinion, we have to deal with two independent things: System crash recovery and container startup/shutdown dependencies >Another problem with this implementation is that the autostart flag is >lost when migrating the container to another host. One needs to manually >remove t

[lxc-devel] [PATCH v2] lxc-alpine: download a static package manager if its missing

2013-05-28 Thread Natanael Copa
If the package manager, apk-tools is missing, then: - download a static binary and public keys - verify the keys against embedded checksum - verify the signature of the static binary against the downloaded keys - use the verified static binary Signed-off-by: Natanael Copa Signed-off-by: Kaarl

Re: [lxc-devel] Container autostart proposal

2013-05-28 Thread Natanael Copa
On Mon, 27 May 2013 15:07:03 -0400 Stéphane Graber wrote: > Hello, > > One feature that distros have been hacking together on their side for a > while is container autostart. ... > So I therefore have two proposals on how to implement this, let me know > what you prefer: > 1) > - Keep things a