Re: [lxc-devel] [PATCH] console API improvements

2013-06-10 Thread Serge Hallyn
> Thanks for the scenario, I tried it here and it is working for me (ie. > gnome-terminal, mosh to server, then screen lxc-console -n -t 0, > then resize gnome-terminal). I did see something else though far more > concerning: in this scenario resizing the gnome-terminal made lxc-start > appear to

Re: [lxc-devel] [PATCH] console API improvements

2013-06-10 Thread Dwight Engen
On Mon, 10 Jun 2013 17:18:03 -0500 Serge Hallyn wrote: > Quoting Dwight Engen (dwight.en...@oracle.com): > > On Mon, 10 Jun 2013 15:49:07 -0500 > > Serge Hallyn wrote: > > > > > Quoting Dwight Engen (dwight.en...@oracle.com): > > > > On Mon, 10 Jun 2013 14:55:08 -0500 > > > > Serge Hallyn wrot

Re: [lxc-devel] [PATCH] console API improvements

2013-06-10 Thread Serge Hallyn
Quoting Dwight Engen (dwight.en...@oracle.com): > On Mon, 10 Jun 2013 15:49:07 -0500 > Serge Hallyn wrote: > > > Quoting Dwight Engen (dwight.en...@oracle.com): > > > On Mon, 10 Jun 2013 14:55:08 -0500 > > > Serge Hallyn wrote: > > > > > > > Quoting Dwight Engen (dwight.en...@oracle.com): > > >

Re: [lxc-devel] [PATCH] console API improvements

2013-06-10 Thread Dwight Engen
On Mon, 10 Jun 2013 15:49:07 -0500 Serge Hallyn wrote: > Quoting Dwight Engen (dwight.en...@oracle.com): > > On Mon, 10 Jun 2013 14:55:08 -0500 > > Serge Hallyn wrote: > > > > > Quoting Dwight Engen (dwight.en...@oracle.com): > > > > Add a higher level console API that opens a tty/console and >

Re: [lxc-devel] the implementation of lxc-freeze

2013-06-10 Thread Serge Hallyn
Quoting Song Tan (belongtos...@gmail.com): > Hello everyone, > I am new to lxc and right now I am trying to find out how the freeze and > unfreeze functions are implemented. > I have read the freezer.c file in the lxc source, but I still don't > quite get it. From my understanding, this should

Re: [lxc-devel] [PATCH] console API improvements

2013-06-10 Thread Serge Hallyn
Quoting Dwight Engen (dwight.en...@oracle.com): > On Mon, 10 Jun 2013 14:55:08 -0500 > Serge Hallyn wrote: > > > Quoting Dwight Engen (dwight.en...@oracle.com): > > > Add a higher level console API that opens a tty/console and runs the > > > mainloop as well. Rename existing API to console_getfd(

Re: [lxc-devel] [PATCH] console API improvements

2013-06-10 Thread Dwight Engen
On Mon, 10 Jun 2013 14:55:08 -0500 Serge Hallyn wrote: > Quoting Dwight Engen (dwight.en...@oracle.com): > > Add a higher level console API that opens a tty/console and runs the > > mainloop as well. Rename existing API to console_getfd(). Use these > > in the python binding. > > > > Allow attac

[lxc-devel] the implementation of lxc-freeze

2013-06-10 Thread Song Tan
Hello everyone, I am new to lxc and right now I am trying to find out how the freeze and unfreeze functions are implemented. I have read the freezer.c file in the lxc source, but I still don't quite get it. From my understanding, this should be something about process scheduling but I am not s

Re: [lxc-devel] [PATCH] console API improvements

2013-06-10 Thread Serge Hallyn
Quoting Dwight Engen (dwight.en...@oracle.com): > Add a higher level console API that opens a tty/console and runs the > mainloop as well. Rename existing API to console_getfd(). Use these in > the python binding. > > Allow attaching a console peer after container bootup, including if the > contai

Re: [lxc-devel] [PATCH] console API improvements

2013-06-10 Thread Serge Hallyn
Quoting Dwight Engen (dwight.en...@oracle.com): > Add a higher level console API that opens a tty/console and runs the > mainloop as well. Rename existing API to console_getfd(). Use these in > the python binding. > > Allow attaching a console peer after container bootup, including if the > contai

Re: [lxc-devel] [PATCH] lxc_stop: return success if api_shutdown succeeded

2013-06-10 Thread Stéphane Graber
On Mon, Jun 10, 2013 at 11:52:44AM -0500, Serge Hallyn wrote: > > I originally forgot to set ret = 0 if it succeeded, meaning that a > simple 'lxc-stop -n container1' returns failure even though the > stop succeeded. > > Signed-off-by: Serge Hallyn Acked-by: Stéphane Graber > --- > src/lxc/l

[lxc-devel] [PATCH] lxc_stop: return success if api_shutdown succeeded

2013-06-10 Thread Serge Hallyn
I originally forgot to set ret = 0 if it succeeded, meaning that a simple 'lxc-stop -n container1' returns failure even though the stop succeeded. Signed-off-by: Serge Hallyn --- src/lxc/lxc_stop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lxc/lxc_stop.c b/src/lx

Re: [lxc-devel] [PATCH 1/1] conf.c: if we don't specify a rootfs, we still need proc mounted

2013-06-10 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): > Sounds good. Only failure case would be if /proc doesn't exist in the host > rootfs, but that's pretty unlikely to ever be the case considering the host > wouldn't be terribly likely to even boot should that be the case. Yeah it might be worth simpl

Re: [lxc-devel] [PATCH 1/1] conf.c: if we don't specify a rootfs, we still need proc mounted

2013-06-10 Thread Stéphane Graber
Sounds good. Only failure case would be if /proc doesn't exist in the host rootfs, but that's pretty unlikely to ever be the case considering the host wouldn't be terribly likely to even boot should that be the case. Acked-by: Stéphane Graber On Mon, Jun 10, 2013 at 09:34:06AM -0500, Serge Hally

[lxc-devel] [PATCH 1/1] conf.c: if we don't specify a rootfs, we still need proc mounted

2013-06-10 Thread Serge Hallyn
otherwise we won't be allowed to set an apparmor context (on pid 1) Signed-off-by: Serge Hallyn --- src/lxc/conf.c |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c index a1aee14..4e3d605 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.

Re: [lxc-devel] [PATCH] lxc-execute: allow lxc-init to log only when we have a valid log level

2013-06-10 Thread Serge Hallyn
Quoting Qiang Huang (h.huangqi...@huawei.com): > Right now if we use lxc-execute without log level set, we get error: > lxc: invalid log priority NOTSET. > Because we set log level manually in execute_start(), but didn't > check if we have a valid log level or not, so fix it. > > Signed-off-by: Qi

Re: [lxc-devel] [PATCH] lxc-ps: display process when container is frozen

2013-06-10 Thread Serge Hallyn
Quoting Weng Meiling (wengmeiling.w...@huawei.com): > > From: Weng Meiling > > When we use lxc-ps to show the process, it's more appropriate to > show process when container is frozen. > > Signed-off-by: Weng Meiling Makes sense to me. Acked-by: Serge E. Hallyn > --- > src/lxc/lxc-ps.in

Re: [lxc-devel] [PATCH] lxc-create: fix the wrong help info of lxc-create

2013-06-10 Thread Serge Hallyn
Quoting Weng Meiling (wengmeiling.w...@huawei.com): > > From: Weng Meiling > > Signed-off-by: Weng Meiling > --- > src/lxc/lxc_create.c |3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/src/lxc/lxc_create.c b/src/lxc/lxc_create.c > index c9231ef..41efeaf 100644 >

Re: [lxc-devel] [PATCH] fix check for lock acquired

2013-06-10 Thread Serge Hallyn
Quoting Dwight Engen (dwight.en...@oracle.com): > Signed-off-by: Dwight Engen Acked-by: Serge E. Hallyn > --- > src/lxc/lxccontainer.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c > index cf5252b..c8fc16f 100644 > ---