- replace 'echo -e' with printf
- replace 'if [[ ... ]]' with 'if [ ... ]'
- add \ at after && and || when those are at end of line
Signed-off-by: Natanael Copa
---
Changes v1 -> v2:
- rebase against current staging
src/lxc/lxc-checkconfig.in | 32
1 file chang
There is no reason to depend on bash for a single echo.
Signed-off-by: Natanael Copa
---
Changes v1 -> v2:
- add signed-off-by
src/lxc/lxc-version.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lxc/lxc-version.in b/src/lxc/lxc-version.in
index 1bd055a..b6875da 10064
Avoid getop --longoptions.
Signed-off-by: Natanael Copa
---
src/lxc/lxc-setuid.in | 34 +-
1 file changed, 21 insertions(+), 13 deletions(-)
diff --git a/src/lxc/lxc-setuid.in b/src/lxc/lxc-setuid.in
index 84f18af..e6a7b96 100644
--- a/src/lxc/lxc-setuid.in
+++ b
Avoid getopt --longoptions
Signed-off-by: Natanael Copa
---
src/lxc/lxc-setcap.in | 34 +-
1 file changed, 21 insertions(+), 13 deletions(-)
diff --git a/src/lxc/lxc-setcap.in b/src/lxc/lxc-setcap.in
index 7fd390c..02c1e09 100644
--- a/src/lxc/lxc-setcap.in
+++ b
There is no reason to depend on bash for a single echo.
---
Should we move this to lxc-info --version?
src/lxc/lxc-version.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lxc/lxc-version.in b/src/lxc/lxc-version.in
index 1bd055a..b6875da 100644
--- a/src/lxc/lxc-version
LXCDIR is only used in lxc_container_new, whereas LXCPATH is used throughout
the rest of lxc, and even in the same file as lxc_container_new (for example
create_container_dir()).
Signed-off-by: Dwight Engen
---
src/lxc/lxccontainer.c |6 +++---
src/lxc/lxccontainer.h |1 -
2 files change
This makes it easier to write a binding, and presents a cleaner API. Use
strdupa in a few places to get mutable strings for tokenizing / parsing.
Also change the argv type in lxcapi_start and lxcapi_create to match
that of execv(3).
Signed-off-by: Dwight Engen
---
src/lxc/conf.c | 10 +
On 11/26/2012 03:08 PM, Serge Hallyn wrote:
> The -u shortopt matching --userdata was not specified, and when -L
> is found shift should have been by 1 not 2 since there is no optarg.
>
> Signed-off-by: Serge Hallyn
Acked-by: Stéphane Graber
Pushed to staging. Thanks
> ---
> templates/lxc-ub
The -u shortopt matching --userdata was not specified, and when -L
is found shift should have been by 1 not 2 since there is no optarg.
Signed-off-by: Serge Hallyn
---
templates/lxc-ubuntu-cloud.in |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/templates/lxc-ubuntu-cl
On 11/26/2012 02:25 PM, Serge Hallyn wrote:
> Quoting Natanael Copa (nc...@alpinelinux.org):
>> Add an option to test for a give state. This is useful for scripts.
>> It lets us you do thing like:
>>
>> if lxc-info --name myname --state-is RUNNING; then
>>...
>>
>> Signed-off-by: Natanael Copa
Quoting Natanael Copa (nc...@alpinelinux.org):
> Add an option to test for a give state. This is useful for scripts.
> It lets us you do thing like:
>
> if lxc-info --name myname --state-is RUNNING; then
>...
>
> Signed-off-by: Natanael Copa
Acked-by: Serge E. Hallyn
> ---
> src/lxc/lxc
Add an option to test for a give state. This is useful for scripts.
It lets us you do thing like:
if lxc-info --name myname --state-is RUNNING; then
...
Signed-off-by: Natanael Copa
---
src/lxc/lxc_info.c | 15 +++
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/s
On 11/26/2012 01:10 PM, Serge Hallyn wrote:
> Quoting Dwight Engen (dwight.en...@oracle.com):
>> Signed-off-by: Dwight Engen
>
> Acked-by: Serge E. Hallyn
Thanks, applied to staging.
>> ---
>> src/lxc/lxccontainer.c |3 ++-
>> 1 files changed, 2 insertions(+), 1 deletions(-)
>>
>> diff --
btw, I'm quite surprised to see such a patch between a rc2 and the
final release.
--
William
--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, d
On 11/26/2012 01:07 PM, Serge Hallyn wrote:
> Quoting Dwight Engen (dwight.en...@oracle.com):
>> Most of these were found with valgrind by repeatedly doing lxc_container_new
>> followed by lxc_container_put. Also free memory when config items are
>> re-parsed, as happens when lxcapi_set_config_item
Quoting Dwight Engen (dwight.en...@oracle.com):
> Signed-off-by: Dwight Engen
Acked-by: Serge E. Hallyn
> ---
> src/lxc/lxccontainer.c |3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c
> index 37f5ed7..4818b2c 10064
Quoting Dwight Engen (dwight.en...@oracle.com):
> Most of these were found with valgrind by repeatedly doing lxc_container_new
> followed by lxc_container_put. Also free memory when config items are
> re-parsed, as happens when lxcapi_set_config_item() is called. Refactored
> path type config items
On Mon, 26 Nov 2012 11:40:40 -0600
Serge Hallyn wrote:
> Quoting Dwight Engen (dwight.en...@oracle.com):
> > Valgrind showed use of ->next field after item has been free()ed.
> > Introduce a lxc_list_for_each_safe() which allows traversal of a
> > list when the body of the loop may remove the cur
Hi Stéphane,
While I was testing the lua binding I did (based largely on the Python
one :) I noticed a memory leak when container objects were garbage
collected, and I think the Python binding may have it as well. I think
Container_dealloc() should probably do lxc_container_put() as shown in
the p
On 11/26/2012 12:40 PM, Serge Hallyn wrote:
> Quoting Dwight Engen (dwight.en...@oracle.com):
>> Valgrind showed use of ->next field after item has been free()ed.
>> Introduce a lxc_list_for_each_safe() which allows traversal of a list
>> when the body of the loop may remove the currently iterated
On 11/26/2012 12:38 PM, Serge Hallyn wrote:
> Quoting Dwight Engen (dwight.en...@oracle.com):
>> lxc_log_init will leak an fd when it is called by a long running
>> program that may call lxc_container_new multiple times. Fix by
>> only opening the log if it is not already open.
>>
>> Signed-off-by:
Hi Serge,
Thank you for you reply.
On Mon, Nov 26, 2012 at 6:28 PM, Serge Hallyn
wrote:
> No, it's the kernel's. Patch for that is however not yet ready.
>
> Failure to set up kmsg should not fail container startup. Commit
> f62b344996937459ae5f31b0358cb440ddde421f fixed that, but that is
> ap
Quoting Dwight Engen (dwight.en...@oracle.com):
> Valgrind showed use of ->next field after item has been free()ed.
> Introduce a lxc_list_for_each_safe() which allows traversal of a list
> when the body of the loop may remove the currently iterated item.
>
> Signed-off-by: Dwight Engen
Thanks (
Quoting Dwight Engen (dwight.en...@oracle.com):
> lxc_log_init will leak an fd when it is called by a long running
> program that may call lxc_container_new multiple times. Fix by
> only opening the log if it is not already open.
>
> Signed-off-by: Dwight Engen
Acked-by: Serge E. Hallyn
> ---
Quoting William Dauchy (wdau...@gmail.com):
> Hello,
>
> I tried to update from lxc-0.8-rc2 to lxc-0.8.
>
> I don't understand this commit: 1bd051a
> link /dev/kmsg to /dev/console in the container
>
> I don't see why lxc is doing this job. I'm using a read only rootfs
> with an additional rw di
Quoting Stéphane Graber (stgra...@ubuntu.com):
> Signed-off-by: Stéphane Graber
Acked-by: Serge E. Hallyn
> ---
> .gitignore | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/.gitignore b/.gitignore
> index 398e4fc..76c9533 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -65,6 +65,
Quoting Stéphane Graber (stgra...@ubuntu.com):
> The new version of the pep8 command is detecting more indentation
> mistakes than it used to, this fixes them.
>
Every instance looks like bike-shedding to me, but ok.
Acked-by: Serge E. Hallyn
> Signed-off-by: Stéphane Graber
> ---
> src/lxc/
Most of these were found with valgrind by repeatedly doing lxc_container_new
followed by lxc_container_put. Also free memory when config items are
re-parsed, as happens when lxcapi_set_config_item() is called. Refactored
path type config items to use a common underlying routine.
Signed-off-by: Dwi
Signed-off-by: Dwight Engen
---
src/lxc/lxccontainer.c |3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c
index 37f5ed7..4818b2c 100644
--- a/src/lxc/lxccontainer.c
+++ b/src/lxc/lxccontainer.c
@@ -683,13 +683,14 @@ static bo
Valgrind showed use of ->next field after item has been free()ed.
Introduce a lxc_list_for_each_safe() which allows traversal of a list
when the body of the loop may remove the currently iterated item.
Signed-off-by: Dwight Engen
---
src/lxc/conf.c| 38 +++--
lxc_log_init will leak an fd when it is called by a long running
program that may call lxc_container_new multiple times. Fix by
only opening the log if it is not already open.
Signed-off-by: Dwight Engen
---
src/lxc/log.c |3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a
Hello,
Recently I wrote a lua binding for lxc on which I built a simple
lxc-top tool. In testing that my container class was properly freeing
all resources during garbage collection, I discovered that lxc itself
needs some cleanups. I will be posting a series of patches to do these
cleanups, which
Quoting Stéphane Graber (stgra...@ubuntu.com):
> Use our own len() function for network interfaces as doing
> len(container.get_config_item("lxc.network")) will fail when the
> list is empty.
>
> Signed-off-by: Stéphane Graber
Acked-by: Serge E. Hallyn
> ---
> src/python-lxc/lxc/__init__.py |
Hello,
I tried to update from lxc-0.8-rc2 to lxc-0.8.
I don't understand this commit: 1bd051a
link /dev/kmsg to /dev/console in the container
I don't see why lxc is doing this job. I'm using a read only rootfs
with an additional rw disk (e.g for the console); so the start is now
broken because i
On 11/14/2012 12:03 PM, Dwight Engen wrote:
> The kernel config option for the memory cgroup was changed in 3.6
> from CONFIG_CGROUP_MEM_RES_CTLR to CONFIG_MEMCG with commit c255a458.
>
> Signed-off-by: Dwight Engen
Sorry for the delay, I somehow missed that one.
Acked-by: Stéphane Graber
Pus
Signed-off-by: Stéphane Graber
---
.gitignore | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.gitignore b/.gitignore
index 398e4fc..76c9533 100644
--- a/.gitignore
+++ b/.gitignore
@@ -65,6 +65,8 @@ src/lxc/lxc-unshare
src/lxc/lxc-version
src/lxc/lxc-wait
+src/python-lxc/lxc/__pycache_
PEP-8 and other bugfixes for the python code.
Stéphane Graber (3):
python: PEP8 compatibility
python: Use builtin len() function for network interfaces
gitignore: Ignore python cache
.gitignore | 2 +
src/lxc/lxc-start-ephemeral.in | 81 +++---
The new version of the pep8 command is detecting more indentation
mistakes than it used to, this fixes them.
Signed-off-by: Stéphane Graber
---
src/lxc/lxc-start-ephemeral.in | 81 +++--
src/python-lxc/examples/api_test.py | 20 -
src/python-lxc/lxc/_
Use our own len() function for network interfaces as doing
len(container.get_config_item("lxc.network")) will fail when the
list is empty.
Signed-off-by: Stéphane Graber
---
src/python-lxc/lxc/__init__.py | 14 +-
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/pyth
On 11/23/2012 03:16 PM, Serge Hallyn wrote:
> Add a container config option to mount and populate /dev in a container.
>
> We might want to add options to specify a max size for /dev other than
> the default 100k, and to specify other devices to create. And maybe
> someone can think of a better n
On 11/23/2012 03:19 PM, Serge Hallyn wrote:
> Quoting Stéphane Graber (stgra...@ubuntu.com):
>>> The cgroup tweaking should be done using generic code. Maybe it's
>>> time to add those to the c api...
>>
>> Totally agreed, I was actually going to nag you again this cycle about
>> getting a set_cgr
On 11/22/2012 08:16 AM, Natanael Copa wrote:
> The e60a8164c12d565f70071ff6b32b823dd495df9e introduced a bug that caused
> first argument passed over to the template script get lost.
>
> This patch fixes it.
>
> Signed-off-by: Natanael Copa
> ---
> src/lxc/lxc-create.in | 1 -
> 1 file changed,
On 11/26/2012 06:00 AM, Natanael Copa wrote:
> Apparently 'local' is not POSIX. Don't use it.
>
> Signed-off-by: Natanael Copa
Acked-by: Stéphane Graber
Applied to staging branch. Thanks.
> ---
> src/lxc/lxc-create.in | 7 +++
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff -
Apparently 'local' is not POSIX. Don't use it.
Signed-off-by: Natanael Copa
---
src/lxc/lxc-create.in | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/lxc/lxc-create.in b/src/lxc/lxc-create.in
index 26ec6a2..30f0c22 100644
--- a/src/lxc/lxc-create.in
+++ b/src/lxc/l
44 matches
Mail list logo