Re: [lxc-devel] LXC 1.0.4 approaching

2014-06-10 Thread Dwight Engen
On Mon, 9 Jun 2014 11:06:03 -0400
Stéphane Graber stgra...@ubuntu.com wrote:

 Hey there,
 
 I just pushed Mike's lxc-autostart change to 1.0.4 as it was requested
 by both him (for Fedora) and Dwight (for Oracle).
 
 There's one more crasher in the python3 binding I'd like to sort out
 and then I think I'll be good for 1.0.4 on my side.
 
 My current plan is for a release in the early afternoon US eastern
 time on Thursday. It'd be great if distro maintainers planning on
 using 1.0.4 could spend some time testing the current stable-1.0
 branch to make sure it didn't regress in some ways and that the bugs
 you care about have been fixed.

Hey Stéphane,

The stable branch did fine in my testing here. I did explicitly test
the autostart stuff on both OL6.x (sysvinit) and OL7 (systemd). Thanks!

 Thanks!
 

___
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel


Re: [lxc-devel] LXC 1.0.4 approaching

2014-06-10 Thread Michael H. Warfield
On Tue, 2014-06-10 at 07:18 -0400, Dwight Engen wrote:
 On Mon, 9 Jun 2014 11:06:03 -0400
 Stéphane Graber stgra...@ubuntu.com wrote:
 
  Hey there,
  
  I just pushed Mike's lxc-autostart change to 1.0.4 as it was requested
  by both him (for Fedora) and Dwight (for Oracle).
  
  There's one more crasher in the python3 binding I'd like to sort out
  and then I think I'll be good for 1.0.4 on my side.
  
  My current plan is for a release in the early afternoon US eastern
  time on Thursday. It'd be great if distro maintainers planning on
  using 1.0.4 could spend some time testing the current stable-1.0
  branch to make sure it didn't regress in some ways and that the bugs
  you care about have been fixed.

 Hey Stéphane,

 The stable branch did fine in my testing here. I did explicitly test
 the autostart stuff on both OL6.x (sysvinit) and OL7 (systemd). Thanks!

Yeah, stable branch is running fine here on Fedora 20.

  Thanks!

Regards,
Mike
-- 
Michael H. Warfield (AI4NB) | (770) 978-7061 |  m...@wittsend.com
   /\/\|=mhw=|\/\/  | (678) 463-0932 |  http://www.wittsend.com/mhw/
   NIC whois: MHW9  | An optimist believes we live in the best of all
 PGP Key: 0x674627FF| possible worlds.  A pessimist is sure of it!



signature.asc
Description: This is a digitally signed message part
___
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel


[lxc-devel] [PATCH 1/2] python2: Don't require a template name

2014-06-10 Thread Chuck Short
The template name isn't required, if it's not passed, then create will
simply be asked to create a container without a rootfs.

Signed-off-by: Chuck Short chuck.sh...@canonical.com
From c629b7c1adcf64ad1da9f3bdc0b30434147e7100 Mon Sep 17 00:00:00 2001
From: Chuck Short chuck.sh...@canonical.com
Date: Tue, 10 Jun 2014 12:04:36 -0400
Subject: [PATCH 1/2] python2: Don't require a template name

The template name isn't required, if it's not passed, then create will
simply be asked to create a container without a rootfs.

Signed-off-by: Chuck Short chuck.sh...@canonical.com
---
 lxc.c   |  2 +-
 lxc/__init__.py | 13 +
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/lxc.c b/lxc.c
index e53e792..6fb5f43 100644
--- a/lxc.c
+++ b/lxc.c
@@ -729,7 +729,7 @@ Container_create(Container *self, PyObject *args, PyObject *kwds)
 int i = 0;
 static char *kwlist[] = {template, flags, args, NULL};
 
-if (! PyArg_ParseTupleAndKeywords(args, kwds, s|iO, kwlist,
+if (! PyArg_ParseTupleAndKeywords(args, kwds, |siO, kwlist,
   template_name, flags, vargs))
 return NULL;
 
diff --git a/lxc/__init__.py b/lxc/__init__.py
index 45d139d..47b25b8 100644
--- a/lxc/__init__.py
+++ b/lxc/__init__.py
@@ -201,11 +201,11 @@ class Container(_lxc.Container):
 
 return _lxc.Container.set_config_item(self, key, value)
 
-def create(self, template, flags=0, args=()):
+def create(self, template=None, flags=0, args=()):
 
 Create a new rootfs for the container.
 
-template must be a valid template name.
+template if passed must be a valid template name.
 
 flags (optional) is an integer representing the optional
 create flags to be passed.
@@ -222,8 +222,13 @@ class Container(_lxc.Container):
 else:
 template_args = args
 
-return _lxc.Container.create(self, template=template,
- flags=flags, args=tuple(template_args))
+if template:
+return _lxc.Container.create(self, template=template,
+ flags=flags,
+ args=tuple(template_args))
+else:
+return _lxc.Container.create(self, flags=flags,
+ args=tuple(template_args))
 
 def clone(self, newname, config_path=None, flags=0, bdevtype=None,
   bdevdata=None, newsize=0, hookargs=()):
-- 
2.0.0

___
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel


[lxc-devel] [lxc/lxc] b7aa56: tests: Wait 5s for init to respond in lxc-test-aut...

2014-06-10 Thread GitHub
  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: b7aa56b85ca96f321ef6aadb60a28f8c16bec44d
  https://github.com/lxc/lxc/commit/b7aa56b85ca96f321ef6aadb60a28f8c16bec44d
  Author: Stéphane Graber stgra...@ubuntu.com
  Date:   2014-06-10 (Tue, 10 Jun 2014)

  Changed paths:
M src/tests/lxc-test-autostart

  Log Message:
  ---
  tests: Wait 5s for init to respond in lxc-test-autostart

lxc-test-autostart occasionaly fails at the restart test in the CI
environment. Looking at the current test case, the most obvious race
there is if lxc-wait exists succesfuly immediately after LXC marked the
container RUNNING (init spawned) but before init had a chance to setup
the signal handlers.

To avoid this potential race period, let's add a 5s delay between the
tests to give a chance for init to finish starting up.

Signed-off-by: Stéphane Graber stgra...@ubuntu.com
Acked-by: Serge E. Hallyn serge.hal...@ubuntu.com


  Commit: b38b62a6d45f1ca0e4e68b3fb9d5e4d8b3d6b7e6
  https://github.com/lxc/lxc/commit/b38b62a6d45f1ca0e4e68b3fb9d5e4d8b3d6b7e6
  Author: Stéphane Graber stgra...@ubuntu.com
  Date:   2014-06-10 (Tue, 10 Jun 2014)

  Changed paths:
M src/lxc/cgfs.c

  Log Message:
  ---
  cgfs: Log the whole cgroup path too

Signed-off-by: Stéphane Graber stgra...@ubuntu.com
Acked-by: Serge E. Hallyn serge.hal...@ubuntu.com


Compare: https://github.com/lxc/lxc/compare/1c1c70514f20...b38b62a6d45f___
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel


[lxc-devel] [lxc/lxc] b7ee86: cgfs: Log the whole cgroup path too

2014-06-10 Thread GitHub
  Branch: refs/heads/stable-1.0
  Home:   https://github.com/lxc/lxc
  Commit: b7ee866b8afe2c8a002f42218c73a8191b016e03
  https://github.com/lxc/lxc/commit/b7ee866b8afe2c8a002f42218c73a8191b016e03
  Author: Stéphane Graber stgra...@ubuntu.com
  Date:   2014-06-10 (Tue, 10 Jun 2014)

  Changed paths:
M src/lxc/cgfs.c

  Log Message:
  ---
  cgfs: Log the whole cgroup path too

Signed-off-by: Stéphane Graber stgra...@ubuntu.com
Acked-by: Serge E. Hallyn serge.hal...@ubuntu.com


  Commit: ee9b6f5193f05db4b5f416b2ff705f55cd8ef698
  https://github.com/lxc/lxc/commit/ee9b6f5193f05db4b5f416b2ff705f55cd8ef698
  Author: Stéphane Graber stgra...@ubuntu.com
  Date:   2014-06-10 (Tue, 10 Jun 2014)

  Changed paths:
M src/tests/lxc-test-autostart

  Log Message:
  ---
  tests: Wait 5s for init to respond in lxc-test-autostart

lxc-test-autostart occasionaly fails at the restart test in the CI
environment. Looking at the current test case, the most obvious race
there is if lxc-wait exists succesfuly immediately after LXC marked the
container RUNNING (init spawned) but before init had a chance to setup
the signal handlers.

To avoid this potential race period, let's add a 5s delay between the
tests to give a chance for init to finish starting up.

Signed-off-by: Stéphane Graber stgra...@ubuntu.com
Acked-by: Serge E. Hallyn serge.hal...@ubuntu.com


Compare: https://github.com/lxc/lxc/compare/1a9c040fc2ab...ee9b6f5193f0___
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel


Re: [lxc-devel] [PATCH 1/2] python2: Don't require a template name

2014-06-10 Thread Stéphane Graber
On Tue, Jun 10, 2014 at 12:08:20PM -0400, Chuck Short wrote:
 The template name isn't required, if it's not passed, then create will
 simply be asked to create a container without a rootfs.
 
 Signed-off-by: Chuck Short chuck.sh...@canonical.com

Acked-by: Stéphane Graber stgra...@ubuntu.com

 From c629b7c1adcf64ad1da9f3bdc0b30434147e7100 Mon Sep 17 00:00:00 2001
 From: Chuck Short chuck.sh...@canonical.com
 Date: Tue, 10 Jun 2014 12:04:36 -0400
 Subject: [PATCH 1/2] python2: Don't require a template name
 
 The template name isn't required, if it's not passed, then create will
 simply be asked to create a container without a rootfs.
 
 Signed-off-by: Chuck Short chuck.sh...@canonical.com
 ---
  lxc.c   |  2 +-
  lxc/__init__.py | 13 +
  2 files changed, 10 insertions(+), 5 deletions(-)
 
 diff --git a/lxc.c b/lxc.c
 index e53e792..6fb5f43 100644
 --- a/lxc.c
 +++ b/lxc.c
 @@ -729,7 +729,7 @@ Container_create(Container *self, PyObject *args, 
 PyObject *kwds)
  int i = 0;
  static char *kwlist[] = {template, flags, args, NULL};
  
 -if (! PyArg_ParseTupleAndKeywords(args, kwds, s|iO, kwlist,
 +if (! PyArg_ParseTupleAndKeywords(args, kwds, |siO, kwlist,
template_name, flags, vargs))
  return NULL;
  
 diff --git a/lxc/__init__.py b/lxc/__init__.py
 index 45d139d..47b25b8 100644
 --- a/lxc/__init__.py
 +++ b/lxc/__init__.py
 @@ -201,11 +201,11 @@ class Container(_lxc.Container):
  
  return _lxc.Container.set_config_item(self, key, value)
  
 -def create(self, template, flags=0, args=()):
 +def create(self, template=None, flags=0, args=()):
  
  Create a new rootfs for the container.
  
 -template must be a valid template name.
 +template if passed must be a valid template name.
  
  flags (optional) is an integer representing the optional
  create flags to be passed.
 @@ -222,8 +222,13 @@ class Container(_lxc.Container):
  else:
  template_args = args
  
 -return _lxc.Container.create(self, template=template,
 - flags=flags, args=tuple(template_args))
 +if template:
 +return _lxc.Container.create(self, template=template,
 + flags=flags,
 + args=tuple(template_args))
 +else:
 +return _lxc.Container.create(self, flags=flags,
 + args=tuple(template_args))
  
  def clone(self, newname, config_path=None, flags=0, bdevtype=None,
bdevdata=None, newsize=0, hookargs=()):
 -- 
 2.0.0
 

 ___
 lxc-devel mailing list
 lxc-devel@lists.linuxcontainers.org
 http://lists.linuxcontainers.org/listinfo/lxc-devel


-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com


signature.asc
Description: Digital signature
___
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel


Re: [lxc-devel] [PATCH 2/2] python3: Handle invalid global config keys

2014-06-10 Thread Stéphane Graber
On Tue, Jun 10, 2014 at 12:08:59PM -0400, Chuck Short wrote:
 

 From ca1d20fd125bc63f8b0e04c80c1032f5bdb580b8 Mon Sep 17 00:00:00 2001
 From: Chuck Short chuck.sh...@canonical.com
 Date: Tue, 10 Jun 2014 12:05:58 -0400
 Subject: [PATCH 2/2] python3: Handle invalid global config keys
 
 Signed-off-by: Chuck Short chuck.sh...@canonical.com

Acked-by: Stéphane Graber stgra...@ubuntu.com

I also pushed a third change to the python2-lxc branch so that it's now
fully back in sync with the python3 version of the binding.

 ---
  lxc.c | 10 +-
  1 file changed, 9 insertions(+), 1 deletion(-)
 
 diff --git a/lxc.c b/lxc.c
 index 6fb5f43..43b019a 100644
 --- a/lxc.c
 +++ b/lxc.c
 @@ -325,12 +325,20 @@ LXC_get_global_config_item(PyObject *self, PyObject 
 *args, PyObject *kwds)
  {
  static char *kwlist[] = {key, NULL};
  char* key = NULL;
 +const char* value = NULL;
  
  if (! PyArg_ParseTupleAndKeywords(args, kwds, s|, kwlist,
key))
  return NULL;
  
 -return PyUnicode_FromString(lxc_get_global_config_item(key));
 +value = lxc_get_global_config_item(key);
 +
 +if (!value) {
 +PyErr_SetString(PyExc_KeyError, Invalid configuration key);
 +return NULL;
 +}
 +
 +return PyUnicode_FromString(value);
  }
  
  static PyObject *
 -- 
 2.0.0
 

 ___
 lxc-devel mailing list
 lxc-devel@lists.linuxcontainers.org
 http://lists.linuxcontainers.org/listinfo/lxc-devel


-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com


signature.asc
Description: Digital signature
___
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel