[lxc-devel] [PATCH] use /var/lock/subsys/lxc-centos instead of /var/lock/subsys/lxc as a lock name

2013-12-07 Thread S . Çağlar Onur
Signed-off-by: S.Çağlar Onur cag...@10ur.org --- templates/lxc-centos.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/lxc-centos.in b/templates/lxc-centos.in index 6000cf2..95802dc 100644 --- a/templates/lxc-centos.in +++ b/templates/lxc-centos.in @@ -376,7

[lxc-devel] [PATCH] use $LOCALSTATEDIR/lock/subsys/lxc-ubuntu$release as lock filename

2013-12-07 Thread S . Çağlar Onur
Otherwise one cannot create two containers with different releases (let's say saucy [cached] and raring [not caced]) if both are not cached on the local filesystem already. The lock blocks cached one to move forward until not cached one finishes it's downloads. Fix that by seperating locks using

[lxc-devel] [PATCH] add comments about running unconfined or nesting containers back to ubuntu.common.conf

2013-12-07 Thread S . Çağlar Onur
Signed-off-by: S.Çağlar Onur cag...@10ur.org --- config/templates/ubuntu.common.conf.in | 7 +++ 1 file changed, 7 insertions(+) diff --git a/config/templates/ubuntu.common.conf.in b/config/templates/ubuntu.common.conf.in index 8c61033..1195175 100644 ---

Re: [lxc-devel] [PATCH] ubuntu: Fix regression in post-process

2013-12-04 Thread S . Çağlar Onur
Hi Dwight, On Wed, Dec 4, 2013 at 3:47 PM, Dwight Engen dwight.en...@oracle.com wrote: On Tue, 3 Dec 2013 23:34:43 -0500 S.Çağlar Onur cag...@10ur.org wrote: Hi, On Tue, Dec 3, 2013 at 6:53 PM, Stéphane Graber stgra...@ubuntu.com wrote: On Tue, Dec 03, 2013 at 05:43:47PM -0600, Serge

[lxc-devel] [PATCH] add destroy option to lxc-snapshot

2013-12-03 Thread S . Çağlar Onur
Signed-off-by: S.Çağlar Onur cag...@10ur.org --- src/lxc/lxc_snapshot.c | 22 +++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/lxc/lxc_snapshot.c b/src/lxc/lxc_snapshot.c index f80afe5..1de5671 100644 --- a/src/lxc/lxc_snapshot.c +++

Re: [lxc-devel] [PATCH] ubuntu: Fix regression in post-process

2013-12-03 Thread S . Çağlar Onur
Hi, On Tue, Dec 3, 2013 at 6:53 PM, Stéphane Graber stgra...@ubuntu.com wrote: On Tue, Dec 03, 2013 at 05:43:47PM -0600, Serge Hallyn wrote: Quoting S.Çağlar Onur (cag...@10ur.org): Hey Stéphane, On Wed, Nov 27, 2013 at 7:49 PM, Stéphane Graber stgra...@ubuntu.com wrote: THe recent

Re: [lxc-devel] [PATCH] ubuntu: Fix regression in post-process

2013-12-01 Thread S . Çağlar Onur
Hey Stéphane, On Wed, Nov 27, 2013 at 7:49 PM, Stéphane Graber stgra...@ubuntu.com wrote: THe recent reorg of lxc-ubuntu introduced some package installation in post-process but without first disabling service startup. As a result, if the cache is a bit out of date and a ssh update is

[lxc-devel] [PATCH] Add LXC version information to version.h

2013-12-01 Thread S . Çağlar Onur
So that applications can get the LXC version number at compile time. This can be used to make applications/bindings that support compiling against multiple versions of LXC. Signed-off-by: S.Çağlar Onur cag...@10ur.org --- .gitignore | 1 + configure.ac | 7 ++-

Re: [lxc-devel] [PATCH] Allow unsetting daemonize and close_fds

2013-11-29 Thread S . Çağlar Onur
On Fri, Nov 29, 2013 at 2:34 PM, Serge Hallyn serge.hal...@ubuntu.com wrote: Quoting Stéphane Graber (stgra...@ubuntu.com): As mentioned in a previous commit, this does two changes: - Make want_daemonize return a bool (false on failure, true on success) - Make both want_daemonize and

[lxc-devel] [PATCH] add lxc-usernsexec to .gitignore

2013-11-22 Thread S . Çağlar Onur
Signed-off-by: S.Çağlar Onur cag...@10ur.org --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 82b144a..b3eff27 100644 --- a/.gitignore +++ b/.gitignore @@ -68,6 +68,7 @@ src/lxc/lxc-start-ephemeral src/lxc/lxc-stop src/lxc/lxc-unfreeze

[lxc-devel] [PATCH] fix memory leaks reported by cppcheck in src/lxc/lxc_usernsexec.c

2013-11-19 Thread S . Çağlar Onur
Free previously allocated memory if realloc fails. Signed-off-by: S.Çağlar Onur cag...@10ur.org --- src/lxc/lxc_usernsexec.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/lxc/lxc_usernsexec.c b/src/lxc/lxc_usernsexec.c index 9416f27..2957dd5 100644 ---

Re: [lxc-devel] [PATCH] fix memory leaks reported by cppcheck in src/lxc/conf.c, this also fixes possible crashes due to passing NULL to strlen

2013-11-18 Thread S . Çağlar Onur
Hi Serge, On Mon, Nov 18, 2013 at 10:52 AM, Serge Hallyn serge.hal...@ubuntu.com wrote: Quoting S.Çağlar Onur (cag...@10ur.org): Signed-off-by: S.Çağlar Onur cag...@10ur.org Hi, please try to keep a single, one-line description as the subject, with the longer patch description in the body.

[lxc-devel] [PATCH] fix memory leaks reported by cppcheck in src/lxc/conf.c (v2)

2013-11-18 Thread S . Çağlar Onur
This also fixes possible crashes due to passing NULL to strlen function Changes since v1; * Fixed a typo spotted by Serge Signed-off-by: S.Çağlar Onur cag...@10ur.org --- src/lxc/conf.c | 28 +++- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git

Re: [lxc-devel] Sorry for the git mess

2013-11-15 Thread S . Çağlar Onur
Hey Stéphane, On Fri, Nov 15, 2013 at 4:12 PM, Stéphane Graber stgra...@ubuntu.com wrote: Hey everyone, Sorry for the github flood, apparently one should mix up --all and --tags when doing a release or you end up with a dozen extra branch in a matter of seconds... Anyway, that's all fixed

[lxc-devel] [PATCH] fix memory leaks reported by cppcheck in src/lxc/bdev.c

2013-11-14 Thread S . Çağlar Onur
Signed-off-by: S.Çağlar Onur cag...@10ur.org --- src/lxc/bdev.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lxc/bdev.c b/src/lxc/bdev.c index c7e5e5e..6acd29a 100644 --- a/src/lxc/bdev.c +++ b/src/lxc/bdev.c @@ -962,8 +962,10 @@ static int lvm_snapshot(const char

[lxc-devel] [PATCH] add missing paranthesis

2013-11-14 Thread S . Çağlar Onur
Signed-off-by: S.Çağlar Onur cag...@10ur.org --- src/lxc/lsm/apparmor.c | 1 + src/lxc/lxccontainer.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lxc/lsm/apparmor.c b/src/lxc/lsm/apparmor.c index aaf8056..a8d36c1 100644 --- a/src/lxc/lsm/apparmor.c +++

Re: [lxc-devel] [PATCH] add missing paranthesis

2013-11-14 Thread S . Çağlar Onur
Please don't apply this as it contains an unrelated chunk in it. Correct one will hit the list in a minute. On Thu, Nov 14, 2013 at 11:21 PM, S.Çağlar Onur cag...@10ur.org wrote: Signed-off-by: S.Çağlar Onur cag...@10ur.org --- src/lxc/lsm/apparmor.c | 1 + src/lxc/lxccontainer.c | 4 ++--

[lxc-devel] [PATCH] add missing paranthesis (v2)

2013-11-14 Thread S . Çağlar Onur
Signed-off-by: S.Çağlar Onur cag...@10ur.org --- src/lxc/lxccontainer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index 3cabf0d..11e70cb 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -2958,9

[lxc-devel] [PATCH] free previously allocated memory if realloc fails in src/lxc/lsm/apparmor.c

2013-11-14 Thread S . Çağlar Onur
Signed-off-by: S.Çağlar Onur cag...@10ur.org --- src/lxc/lsm/apparmor.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/lxc/lsm/apparmor.c b/src/lxc/lsm/apparmor.c index aaf8056..f7f2ff9 100644 --- a/src/lxc/lsm/apparmor.c +++ b/src/lxc/lsm/apparmor.c @@ -68,7

[lxc-devel] [PATCH] gather all locking related code into src/lxc/lxclock.c

2013-11-13 Thread S . Çağlar Onur
Signed-off-by: S.Çağlar Onur cag...@10ur.org --- src/lxc/lxclock.c | 74 +-- src/lxc/lxclock.h | 3 +++ src/lxc/utils.c | 57 +- 3 files changed, 65 insertions(+), 69 deletions(-) diff --git

Re: [lxc-devel] [PATCH] replace redundant creat() with open()

2013-11-12 Thread S . Çağlar Onur
On Nov 8, 2013 5:20 PM, Serge Hallyn serge.hal...@ubuntu.com wrote: Quoting S.Çağlar Onur (cag...@10ur.org): Hey Serge, On Fri, Nov 8, 2013 at 4:06 PM, Serge Hallyn serge.hal...@ubuntu.com wrote: Quoting S.Çağlar Onur (cag...@10ur.org): creat() is equivalent to open() with flags

Re: [lxc-devel] [PATCH] Protect global variables in log module via mutex

2013-11-12 Thread S . Çağlar Onur
Hi Serge, On Mon, Nov 11, 2013 at 4:04 PM, Serge Hallyn serge.hal...@ubuntu.com wrote: Quoting S.Çağlar Onur (cag...@10ur.org): Log module contains multiple global variables so protect them introducing a new mutex and serialize accessing log functions. Also gather all locking related code

Re: [lxc-devel] [PATCH] fix multithreaded create()

2013-11-12 Thread S . Çağlar Onur
On Tue, Nov 12, 2013 at 2:04 PM, Dwight Engen dwight.en...@oracle.com wrote: We were calling save_config() twice within the create() flow, each from a different process. Depending on order of scheduling, sometimes the data from the first save_config() (which was just the stuff from

Re: [lxc-devel] [PATCH] fix multithreaded create()

2013-11-12 Thread S . Çağlar Onur
Hi Dwight, On Tue, Nov 12, 2013 at 3:31 PM, Dwight Engen dwight.en...@oracle.com wrote: On Tue, 12 Nov 2013 14:35:58 -0500 S.Çağlar Onur cag...@10ur.org wrote: On Tue, Nov 12, 2013 at 2:04 PM, Dwight Engen dwight.en...@oracle.com wrote: We were calling save_config() twice within the

[lxc-devel] [PATCH] introduce lxcapi_add_device_node and lxcapi_remove_device_node to API (v2)

2013-11-12 Thread S . Çağlar Onur
Adding block/char devices to running container is a common operation so provide a common implementation for users to consume. changes since v2; * removed duplicated code Signed-off-by: S.Çağlar Onur cag...@10ur.org --- src/lxc/lxccontainer.c | 84

Re: [lxc-devel] [PATCH] introduce lxcapi_add_device_node and lxcapi_remove_device_node to API (v2)

2013-11-12 Thread S . Çağlar Onur
Hi Stéphane, On Tue, Nov 12, 2013 at 10:51 PM, Stéphane Graber stgra...@ubuntu.com wrote: On Tue, Nov 12, 2013 at 10:47:06PM -0500, S.Çağlar Onur wrote: Adding block/char devices to running container is a common operation so provide a common implementation for users to consume. changes since

Re: [lxc-devel] [PATCH] fix multithreaded create()

2013-11-12 Thread S . Çağlar Onur
Hey Dwight, On Tue, Nov 12, 2013 at 3:35 PM, S.Çağlar Onur cag...@10ur.org wrote: Hmm, you are testing through the go binding correct? I ran these two without error: ./src/tests/lxc-test-concurrent -i 200 -j 8 create,destroy ./src/tests/lxc-test-concurrent -i 100 -j 8 I wonder if

[lxc-devel] [PATCH] introduce lxcapi_add_device_node and lxcapi_remove_device_node to API (v3)

2013-11-12 Thread S . Çağlar Onur
Adding block/char devices to running container is a common operation so provide a common implementation for users to consume. changes since v2; * lets the user set an alternate path inside the container as Stéphane suggested changes since v1; * removed duplicated code Signed-off-by: S.Çağlar

[lxc-devel] [PATCH] replace redundant creat() with open()

2013-11-08 Thread S . Çağlar Onur
creat() is equivalent to open() with flags equal to O_CREAT|O_WRONLY|O_TRUNC Signed-off-by: S.Çağlar Onur cag...@10ur.org --- src/lxc/bdev.c | 2 +- src/lxc/conf.c | 6 +++--- src/lxc/lxc_start.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lxc/bdev.c

Re: [lxc-devel] [PATCH] replace redundant creat() with open()

2013-11-08 Thread S . Çağlar Onur
Hey Serge, On Fri, Nov 8, 2013 at 4:06 PM, Serge Hallyn serge.hal...@ubuntu.com wrote: Quoting S.Çağlar Onur (cag...@10ur.org): creat() is equivalent to open() with flags equal to O_CREAT|O_WRONLY|O_TRUNC Hi, I'm confused - what is redundant in the use of creat()? If there is an

Re: [lxc-devel] [PATCH] allow setting/getting lxc.loglevel and lxc.logfile via set_config_item/get_config_item API calls

2013-11-04 Thread S . Çağlar Onur
Hi Serge, On Mon, Nov 4, 2013 at 7:23 AM, Serge Hallyn serge.hal...@ubuntu.com wrote: Quoting S.Çağlar Onur (cag...@10ur.org): Signed-off-by: S.Çağlar Onur cag...@10ur.org A bit more description would have been appreciated :) But I think I see. Yeah, you are right. I was working on

[lxc-devel] [PATCH] make sure to check c-lxc_conf is not NULL before dereferencing it.

2013-11-02 Thread S . Çağlar Onur
Signed-off-by: S.Çağlar Onur cag...@10ur.org --- 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 a9d97ad..362b429 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -441,7 +441,7 @@

[lxc-devel] [PATCH] valgrind drd tool shows conflicting stores happening at lxc_global_config_value@src/lxc/utils.c (v2)

2013-11-01 Thread S . Çağlar Onur
Conflict occurs between following lines [...] 269 if (values[i]) 270 return values[i]; [...] and [...] 309 /* could not find value, use default */ 310 values[i] = (*ptr)[1]; [...] fix it using a specific lock dedicated to that problem as Serge suggested.

[lxc-devel] [PATCH] ignore tags files that can be created via make ctags target

2013-11-01 Thread S . Çağlar Onur
Signed-off-by: S.Çağlar Onur cag...@10ur.org --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 8901fc7..82b144a 100644 --- a/.gitignore +++ b/.gitignore @@ -128,3 +128,4 @@ src/stamp-h1 patches *.orig *.rej +tags -- 1.8.3.2

[lxc-devel] [PATCH] allow setting/getting lxc.loglevel and lxc.logfile via set_config_item/get_config_item API calls

2013-11-01 Thread S . Çağlar Onur
Signed-off-by: S.Çağlar Onur cag...@10ur.org --- src/lxc/log.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/lxc/log.c b/src/lxc/log.c index 0946e44..e5eb04f 100644 --- a/src/lxc/log.c +++ b/src/lxc/log.c @@ -295,13 +295,13 @@ extern int lxc_log_init(const

[lxc-devel] [PATCH] valgrind drd tool shows conflicting stores happening at lxc_global_config_value@src/lxc/utils.c

2013-10-30 Thread S . Çağlar Onur
Conflict occurs between following lines [...] 269 if (values[i]) 270 return values[i]; [...] and [...] 309 /* could not find value, use default */ 310 values[i] = (*ptr)[1]; [...] so call it while holding the process_lock Signed-off-by: S.Çağlar Onur

[lxc-devel] [PATCH] unnamed semaphores should be destroyed not closed

2013-10-28 Thread S . Çağlar Onur
Signed-off-by: S.Çağlar Onur cag...@10ur.org --- src/lxc/lxclock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/lxclock.c b/src/lxc/lxclock.c index 020bd34..d403bcc 100644 --- a/src/lxc/lxclock.c +++ b/src/lxc/lxclock.c @@ -240,7 +240,7 @@ void lxc_putlock(struct

[lxc-devel] [PATCH] free getline allocated line variable to make valgrind happy

2013-10-28 Thread S . Çağlar Onur
Signed-off-by: S.Çağlar Onur cag...@10ur.org --- src/lxc/lxccontainer.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index 1600276..f2f7240 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -3129,6 +3129,9 @@ int

[lxc-devel] [PATCH] Use actual length of socket's name for abstract sockets (v3)

2013-10-25 Thread S . Çağlar Onur
The addrlen parameter should be the actual length of socket's name for abstract sockets. Otherwise socket gets padded with NULLs. cat /proc/net/unix | grep lxc [...] : 0003 0001 03 226548

[lxc-devel] [PATCH] Use actual length of socket's name for abstract sockets (v2)

2013-10-23 Thread S . Çağlar Onur
The addrlen parameter should be the actual length of socket's name for abstract sockets. Otherwise socket gets padded with NULLs. cat /proc/net/unix | grep lxc [...] : 0003 0001 03 226548

[lxc-devel] [PATCH] Eliminate duplicate entries from list_active_containers (v2)

2013-10-23 Thread S . Çağlar Onur
list_active_containers parses /proc/net/unix which can contain multiple entries for the same container; : 0002 0001 0001 01 273672 @/var/lib/lxc/6/command : 0002 0001 0001 01 274395 @/var/lib/lxc/5/command :

[lxc-devel] [PATCH] Eliminate duplicate entries from list_active_containers

2013-10-21 Thread S . Çağlar Onur
list_active_containers parses /proc/net/unix which can contain multiple entries for the same container; : 0002 0001 0001 01 273672 @/var/lib/lxc/6/command : 0002 0001 0001 01 274395 @/var/lib/lxc/5/command :

[lxc-devel] [PATCH] Use actual length of socket's name for abstract sockets

2013-10-21 Thread S . Çağlar Onur
The addrlen parameter should be the actual length of socket's name for abstract sockets. Otherwise socket gets padded with NULLs. cat /proc/net/unix | grep lxc [...] : 0003 0001 03 226548

Re: [lxc-devel] [PATCH] Use actual length of socket's name for abstract sockets

2013-10-21 Thread S . Çağlar Onur
Hi, On Mon, Oct 21, 2013 at 8:30 PM, Serge Hallyn serge.hal...@ubuntu.comwrote: Quoting S.Çağlar Onur (cag...@10ur.org): The addrlen parameter should be the actual length of socket's name for abstract sockets. Otherwise socket gets padded with NULLs. cat /proc/net/unix | grep lxc

Re: [lxc-devel] [PATCH] umount $rootfs/lib on errors as well otherwise system ends up with stalled mounts

2013-10-21 Thread S . Çağlar Onur
Hi Serge, Then there must be something else going on cause without this patch I find myself in the situation that I described earlier in this email [1] [1] http://sourceforge.net/mailarchive/message.php?msg_id=31539485 On Mon, Oct 21, 2013 at 8:11 PM, Serge Hallyn serge.hal...@ubuntu.comwrote:

Re: [lxc-devel] [PATCH] Eliminate duplicate entries from list_active_containers

2013-10-21 Thread S . Çağlar Onur
Hi, On Mon, Oct 21, 2013 at 8:22 PM, Serge Hallyn serge.hal...@ubuntu.comwrote: Quoting S.Çağlar Onur (cag...@10ur.org): list_active_containers parses /proc/net/unix which can contain multiple entries for the same container; : 0002 0001 0001 01 273672

Re: [lxc-devel] Strange problem (stray mounts) with lxc-create...

2013-10-19 Thread S . Çağlar Onur
Hey, I upgraded my ubuntu box to saucy (using do-release-upgrade tool) minutes ago and I realized that this very same problem starts to happen on my system as well (using lxc@master). [caglar@oOo:~] lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 13.10

Re: [lxc-devel] Strange problem (stray mounts) with lxc-create...

2013-10-19 Thread S . Çağlar Onur
Hi, On Sat, Oct 19, 2013 at 1:43 PM, S.Çağlar Onur cag...@10ur.org wrote: Hey, I upgraded my ubuntu box to saucy (using do-release-upgrade tool) minutes ago and I realized that this very same problem starts to happen on my system as well (using lxc@master). Never mind this as it turns

[lxc-devel] [PATCH] umount $rootfs/lib on errors as well otherwise system ends up with stalled mounts

2013-10-19 Thread S . Çağlar Onur
Signed-off-by: S.Çağlar Onur cag...@10ur.org --- templates/lxc-busybox.in | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in index cbdaaf3..44f0a45 100644 --- a/templates/lxc-busybox.in +++ b/templates/lxc-busybox.in @@ -209,6 +209,7 @@ EOFF

[lxc-devel] [PATCH] Fix following compile error on ubuntu 12.10

2013-10-18 Thread S . Çağlar Onur
[...] make[3]: Entering directory `/home/caglar/Projects/lxc/src/tests' depbase=`echo attach.o | sed 's|[^/]*$|.deps/|;s|\.o$||'`;\ gcc -DHAVE_CONFIG_H -I. -I../../src-I../../src -DLXCROOTFSMOUNT=\/usr/lib/x86_64-linux-gnu/lxc/rootfs\ -DLXCPATH=\/var/lib/lxc\

[lxc-devel] [PATCH] call lxc_container_put when needed in lxc_destroy.c

2013-10-18 Thread S . Çağlar Onur
Signed-off-by: S.Çağlar Onur cag...@10ur.org --- src/lxc/lxc_destroy.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/lxc/lxc_destroy.c b/src/lxc/lxc_destroy.c index 9983241..1d1e687 100644 --- a/src/lxc/lxc_destroy.c +++ b/src/lxc/lxc_destroy.c @@ -108,5 +108,12

[lxc-devel] [PATCH] use snapshot_destroy in tests/snapshot.c and clean up containers after the test run

2013-10-18 Thread S . Çağlar Onur
Signed-off-by: S.Çağlar Onur cag...@10ur.org --- src/tests/snapshot.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/tests/snapshot.c b/src/tests/snapshot.c index 8f16548..1f6d115 100644 --- a/src/tests/snapshot.c +++ b/src/tests/snapshot.c @@ -118,13

[lxc-devel] [PATCH] introduce snapshot_destroy

2013-10-16 Thread S . Çağlar Onur
Signed-off-by: S.Çağlar Onur cag...@10ur.org --- src/lxc/lxccontainer.c | 32 src/lxc/lxccontainer.h | 7 +++ 2 files changed, 39 insertions(+) diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index 6f97879..73a71ce 100644 ---

[lxc-devel] [PATCH] use snapshot_destroy in tests/snapshot.c and clean containers after the test

2013-10-16 Thread S . Çağlar Onur
Signed-off-by: S.Çağlar Onur cag...@10ur.org --- src/tests/snapshot.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/tests/snapshot.c b/src/tests/snapshot.c index 8f16548..ef3f9c2 100644 --- a/src/tests/snapshot.c +++ b/src/tests/snapshot.c @@ -118,8 +118,19

Re: [lxc-devel] [PATCH] do not allocate lxc_snapshot array if NULL is passed into snapshot_list as a ret_snaps parameter.

2013-10-15 Thread S . Çağlar Onur
Hi, I just realized that the only reason of not being able to pass native data types to C world was my mistake so I believe you can ignore this patch :) Best, On Tue, Oct 15, 2013 at 12:32 AM, S.Çağlar Onur cag...@10ur.org wrote: All the other (similar) API calls behaves this way, aka

[lxc-devel] [PATCH] do not allocate lxc_snapshot array if NULL is passed into snapshot_list as a ret_snaps parameter.

2013-10-14 Thread S . Çağlar Onur
All the other (similar) API calls behaves this way, aka passing NULL returns the count. This patch both provides consistency to calling conventions and also may make binding's life little easier cause we need to call those function two times. First to get the length and then get the data itself.

Re: [lxc-devel] API errors

2013-10-05 Thread S . Çağlar Onur
Hi Serge, On Sat, Oct 5, 2013 at 12:27 AM, Serge Hallyn serge.hal...@ubuntu.comwrote: Quoting Serge Hallyn (serge.hal...@ubuntu.com): Quoting S.Çağlar Onur (cag...@10ur.org): Hi, src/lxc/lxccontainer.h contains two public field named error_string and error_num. If I'm not missing

[lxc-devel] API errors

2013-10-04 Thread S . Çağlar Onur
Hi, src/lxc/lxccontainer.h contains two public field named error_string and error_num. If I'm not missing anything no one seems to be using them. What was the intention? Should API calls set those and stop using macros like ERROR and SYSERROR? Cheers, -- S.Çağlar Onur cag...@10ur.org

Re: [lxc-devel] [minor] Changing the version naming

2013-09-26 Thread S . Çağlar Onur
Hi, On Thu, Sep 26, 2013 at 9:51 AM, Dwight Engen dwight.en...@oracle.comwrote: On Wed, 25 Sep 2013 17:57:02 -0400 Stéphane Graber stgra...@ubuntu.com wrote: On Wed, Sep 25, 2013 at 05:48:26PM -0400, S.Çağlar Onur wrote: Hey, It's not that important but I just wanted to learn your

Re: [lxc-devel] [PATCH 2/2] fix some larger memory leaks in cgroup code

2013-09-25 Thread S . Çağlar Onur
Uhh something is wrong with this commit (178938fe0ac891092205d76f67af855dcf7397af), both go bindings and some lxc tools started to seg fault sudo lxc-ps Segmentation fault (core dumped) Segmentation fault (core dumped) Segmentation fault (core dumped) Segmentation fault (core dumped) Segmentation

Re: [lxc-devel] [PATCH 2/2] fix some larger memory leaks in cgroup code

2013-09-25 Thread S . Çağlar Onur
On Wed, Sep 25, 2013 at 4:56 PM, Serge Hallyn serge.hal...@ubuntu.comwrote: Quoting Dwight Engen (dwight.en...@oracle.com): Okay, it looks like you didn't merge any of the first one (cleanup fds, memory in lxc_cgroup_load_meta2()) so I'll look at rebasing that on git head, re-valgrind, and

[lxc-devel] [minor] Changing the version naming

2013-09-25 Thread S . Çağlar Onur
Hey, It's not that important but I just wanted to learn your thoughts about starting to use more predictable version names for releases. I was trying to do some stuff based on the LXC version that is installed on the system and realized that current naming is little different than what I was

Re: [lxc-devel] [PATCH] Expose underlying close_all_fds config value via API

2013-09-21 Thread S . Çağlar Onur
Actually I think there is no reason not to return a result to the caller, I'll send an incremental patch to do that. On Sat, Sep 21, 2013 at 12:47 AM, Serge Hallyn serge.hal...@ubuntu.comwrote: Quoting S.Çağlar Onur (cag...@10ur.org): Being able to set close_all_fds via API would be usefull

[lxc-devel] [PATCH] return the result of the lxcapi_want_close_all_fds call to the caller

2013-09-21 Thread S . Çağlar Onur
Signed-off-by: S.Çağlar Onur cag...@10ur.org --- src/lxc/lxccontainer.c | 7 --- src/lxc/lxccontainer.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index 727c680..5c49b8b 100644 --- a/src/lxc/lxccontainer.c +++

Re: [lxc-devel] [PATCH] Add get_interfaces to the API - v3

2013-09-18 Thread S . Çağlar Onur
Do you want me to sync this on top of staging and re-send?I think they are conflicting right now. On Wed, Sep 18, 2013 at 2:47 PM, Stéphane Graber stgra...@ubuntu.comwrote: On Mon, Sep 16, 2013 at 05:01:11PM -0400, S.Çağlar Onur wrote: get_ips accepts an interface name as a parameter but

[lxc-devel] [PATCH] Add get_interfaces to the API - v4

2013-09-18 Thread S . Çağlar Onur
get_ips accepts an interface name as a parameter but there was no way to get the interfaces names from the container. This patch introduces a new get_interfaces call to the API so that users can obtain the name of the interfaces. Support for python bindings also introduced as a part of this

Re: [lxc-devel] [PATCH] Add get_interfaces to the API - v3

2013-09-18 Thread S . Çağlar Onur
Not at all as I already did it on my tree, sending in a minute as v4... On Wed, Sep 18, 2013 at 2:58 PM, Stéphane Graber stgra...@ubuntu.comwrote: On Wed, Sep 18, 2013 at 02:53:33PM -0400, S.Çağlar Onur wrote: Do you want me to sync this on top of staging and re-send?I think they are

Re: [lxc-devel] [PATCH] Add get_interfaces to the API - v2

2013-09-16 Thread S . Çağlar Onur
Hi Stéphane, On Mon, Sep 16, 2013 at 3:04 PM, Stéphane Graber stgra...@ubuntu.comwrote: On Mon, Sep 16, 2013 at 02:54:44PM -0400, S.Çağlar Onur wrote: On Mon, Sep 16, 2013 at 2:39 PM, Stéphane Graber stgra...@ubuntu.com wrote: On Mon, Sep 16, 2013 at 02:26:47PM -0400, S.Çağlar Onur

[lxc-devel] [PATCH] Add get_interfaces to the API - v2

2013-09-16 Thread S . Çağlar Onur
get_ips accepts an interface name as a parameter but there was no way to get the interfaces names from the container. This patch introduces a new get_interfaces call to the API so that users can obtain the name of the interfaces. Signed-off-by: S.Çağlar Onur cag...@10ur.org ---

Re: [lxc-devel] [PATCH] Add get_interfaces to the API - v2

2013-09-16 Thread S . Çağlar Onur
On Mon, Sep 16, 2013 at 2:39 PM, Stéphane Graber stgra...@ubuntu.comwrote: On Mon, Sep 16, 2013 at 02:26:47PM -0400, S.Çağlar Onur wrote: get_ips accepts an interface name as a parameter but there was no way to get the interfaces names from the container. This patch introduces a new

[lxc-devel] [PATCH] Add get_interfaces to the API - v3

2013-09-16 Thread S . Çağlar Onur
get_ips accepts an interface name as a parameter but there was no way to get the interfaces names from the container. This patch introduces a new get_interfaces call to the API so that users can obtain the name of the interfaces. Support for python bindings also introduced as a part of this

Re: [lxc-devel] [PATCH] tests: Introduce lxc-test-concurrent for testing basic actions concurrently

2013-09-14 Thread S . Çağlar Onur
Hi Serge, This seems to fix the creates but starts started to fail this time. One quick note, my concurrent.c still uses ubuntu as it's much more easy to replicate the issue with it. diff --git a/src/tests/concurrent.c b/src/tests/concurrent.c index 7faf34c..ffc025c 100644 ---

[lxc-devel] [PATCH] use busybox instead of ubuntu to test as it's much more lightweight, also wait containers to enter desired state

2013-09-13 Thread S . Çağlar Onur
Signed-off-by: S.Çağlar Onur cag...@10ur.org --- src/tests/concurrent.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/tests/concurrent.c b/src/tests/concurrent.c index 41c171b..7faf34c 100644 --- a/src/tests/concurrent.c +++ b/src/tests/concurrent.c @@ -40,7

Re: [lxc-devel] [PATCH] Add get_interfaces to the API and start not to filter out loopback interface

2013-09-13 Thread S . Çağlar Onur
Hey Stéphane, On Fri, Sep 13, 2013 at 6:32 PM, Stéphane Graber stgra...@ubuntu.comwrote: On Fri, Sep 13, 2013 at 06:21:20PM -0400, S.Çağlar Onur wrote: Signed-off-by: S.Çağlar Onur cag...@10ur.org The loopback filtering was there so that all the software using get_ips to wait for the

Re: [lxc-devel] [PATCH] tests: Introduce lxc-test-concurrent for testing basic actions concurrently

2013-09-13 Thread S . Çağlar Onur
Hi Dwight, Yes it only stuck during creating concurrent containers for me and start/stop/freeze/unfreeze seems to work fine. If it helps I'm pretty sure that it was working fine till last week (or I was so lucky not to hit by this problem before). Go binding's test suite does lots of concurrent

Re: [lxc-devel] regression: lxc-start -d hangs in lxc_monitor_sock_name (at process_lock)

2013-09-12 Thread S . Çağlar Onur
Hi, I think staging (my head is @ 813a48...) started to stuck while creating containers concurrently after monitoring related changes. I observed that issue with the Go bindings first. Then I wrote a test case to remove Go from the picture and I also thought that having a test case would be

[lxc-devel] [PATCH] tests: Introduce lxc-test-concurrent for testing basic actions concurrently

2013-09-12 Thread S . Çağlar Onur
Signed-off-by: S.Çağlar Onur cag...@10ur.org --- .gitignore | 3 ++ src/tests/Makefile.am | 6 ++- src/tests/concurrent.c | 116 + 3 files changed, 123 insertions(+), 2 deletions(-) create mode 100644 src/tests/concurrent.c diff

Re: [lxc-devel] Clarifying the licensing of LXC

2013-09-05 Thread S . Çağlar Onur
Hey Stéphane, I realized that Go bindings are licensed as GPLv2. I've no objection to re-licensing them with LGPL v2.1 but wanted to clarify it with you first. Should I go ahead and change the license or is it ok to stay with GPLv2? Best, On Fri, Aug 30, 2013 at 3:42 PM, Stéphane Graber

Re: [lxc-devel] Clarifying the licensing of LXC

2013-09-05 Thread S . Çağlar Onur
Hi, On Fri, Sep 6, 2013 at 12:10 AM, Stéphane Graber stgra...@ubuntu.comwrote: Hi, Well since they're currently shipped out of tree, you're free to do whatever you want. GPLv2 code is allowed to link with an LGPLv2.1+ library so your code isn't in violation of LXC's license. However this

[lxc-devel] [PATCH] bdev_copy segfaults if bdevtype is NULL

2013-09-03 Thread S . Çağlar Onur
Signed-off-by: S.Çağlar Onur cag...@10ur.org --- src/lxc/bdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/bdev.c b/src/lxc/bdev.c index 39592b2..b45f2cb 100644 --- a/src/lxc/bdev.c +++ b/src/lxc/bdev.c @@ -1939,7 +1939,7 @@ struct bdev *bdev_copy(const char *src,

Re: [lxc-devel] RFC: aliases

2013-08-21 Thread S . Çağlar Onur
Hey Serge, I'm not opposed the idea but just trying to understand the motivation behind it. We are doing exactly what you described (daily builds uses somename-date-buildnumber and two symlinks latest and stable points some containers) and I'm just using something like following sudo lxc-clone

Re: [lxc-devel] [PATCH] lxc_create: add outfile option

2013-07-11 Thread S . Çağlar Onur
Hi, On Thu, Jul 11, 2013 at 5:39 PM, Dwight Engen dwight.en...@oracle.comwrote: On Thu, 11 Jul 2013 16:22:11 -0500 Serge Hallyn serge.hal...@ubuntu.com wrote: Quoting Dwight Engen (dwight.en...@oracle.com): On Thu, 11 Jul 2013 15:40:10 -0500 Serge Hallyn serge.hal...@ubuntu.com

Re: [lxc-devel] template output

2013-07-10 Thread S . Çağlar Onur
Hi Serge, On Wed, Jul 10, 2013 at 10:36 AM, Serge Hallyn serge.hal...@ubuntu.comwrote: Quoting S.Çağlar Onur (cag...@10ur.org): Hi, It looks like LXC@staging started to write template outputs to stdout like following when one uses the API;

[lxc-devel] template output

2013-07-09 Thread S . Çağlar Onur
Hi, It looks like LXC@staging started to write template outputs to stdout like following when one uses the API; [caglar@oOo:~/go/src/github.com/caglar10ur/lxc/examples] sudo ./create Creating container... Checking cache download in /var/cache/lxc/raring/rootfs-amd64 ... Copy

Re: [lxc-devel] create api

2013-05-15 Thread S . Çağlar Onur
Hi Serge, On Tue, May 14, 2013 at 3:13 PM, Serge Hallyn serge.hal...@ubuntu.comwrote: Hi, I'd like to rewrite lxc-create to be c (calling out to the c templates which continue to be scripts for the most part). Unfortunately right now the lxcapi_create() just takes arguments to send to the

Re: [lxc-devel] lxc_monitord - monitor exiting

2013-05-06 Thread S . Çağlar Onur
Hi Dwight, Thank you so much for quick triage and a patch! I briefly tested it and looks like it fixed the issue here as well. IMHO the thread safety of LXC is not that bad with the staging tree (thanks to your lxc-monitord and couple of other concurrency fixes). I believe we can

Re: [lxc-devel] lxc_monitord - monitor exiting

2013-05-03 Thread S . Çağlar Onur
Hi all, I think I understand why I'm confused before while chasing another bug. This is what I'm seeing right now. * I patched lxc_monitord.c with following diff --git a/src/lxc/lxc_monitord.c b/src/lxc/lxc_monitord.c index e76af71..59f1e9d 100644 --- a/src/lxc/lxc_monitord.c +++

[lxc-devel] lxcpath/default_path

2013-04-30 Thread S . Çağlar Onur
Hey Serge, It looks like staging requires following as https://github.com/lxc/lxc/commit/a8428dfa2c6a43ee195f4be3e04a519ca1fc6ec0uses default_path but lxc_config provides lxcpath. index a454e07..cf19c7b 100644 --- a/src/lxc/lxc_config.c +++ b/src/lxc/lxc_config.c @@ -9,7 +9,7 @@ struct

[lxc-devel] [PATCH 2/3] Update .gitignore

2013-04-30 Thread S . Çağlar Onur
Signed-off-by: S.Çağlar Onur cag...@10ur.org --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index c614a75..0cec29a 100644 --- a/.gitignore +++ b/.gitignore @@ -42,7 +42,9 @@ src/lxc/lxc-cgroup src/lxc/lxc-checkconfig src/lxc/lxc-checkpoint

[lxc-devel] [PATCH 1/3] silence sh: 1: zfs: not found errors on systems without ZFS

2013-04-30 Thread S . Çağlar Onur
Signed-off-by: S.Çağlar Onur cag...@10ur.org --- src/lxc/bdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/bdev.c b/src/lxc/bdev.c index a3577a2..1de302f 100644 --- a/src/lxc/bdev.c +++ b/src/lxc/bdev.c @@ -440,7 +440,7 @@ static int zfs_list_entry(const char

Re: [lxc-devel] [PATCH 2/3] Update .gitignore

2013-04-30 Thread S . Çağlar Onur
On Tue, Apr 30, 2013 at 3:08 PM, Serge Hallyn serge.hal...@ubuntu.comwrote: Quoting S.Çağlar Onur (cag...@10ur.org): Signed-off-by: S.Çağlar Onur cag...@10ur.org --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index c614a75..0cec29a

Re: [lxc-devel] [PATCH 3/3] Use correct parameter name (default_path instead of lxcpath)

2013-04-30 Thread S . Çağlar Onur
Nope, you missed a backquote :) diff --git a/src/lxc/lxc.functions.in b/src/lxc/lxc.functions.in index 8c25bd5..de268df 100644 --- a/src/lxc/lxc.functions.in +++ b/src/lxc/lxc.functions.in @@ -25,6 +25,6 @@ bindir=@BINDIR@ templatedir=@LXCTEMPLATEDIR@ lxcinitdir=@LXCINITDIR@

[lxc-devel] lxc_monitord - monitor exiting

2013-04-26 Thread S . Çağlar Onur
Hey Dwight, I'm observing following behavior with staging tree and just wanted to make sure that what I'm seeing is the expected; * Initially nothing runs [caglar@qgq:~/Projects/lxc/examples] sudo ./list bankai (STOPPED) bleach (STOPPED) zangetsu (STOPPED) * I start one container using the API

Re: [lxc-devel] [PATCH] implement backend drivers and container clone API (v2)

2013-04-24 Thread S . Çağlar Onur
Hi Serge, Also do you have a git repository somewhere to pull this patch as this one won't apply cleanly on top of staging tree and I wanted to give it a try. On Wed, Apr 24, 2013 at 11:51 AM, S.Çağlar Onur cag...@10ur.org wrote: Hi Serge, [resending as list rejected my first mail due to

Re: [lxc-devel] [PATCH 1/2] Support starting containers concurrently

2013-04-24 Thread S . Çağlar Onur
Just wanted to remind that we still need this on top of Dwight's awesome work so that start work reliably. On Tue, Apr 23, 2013 at 5:24 PM, S.Çağlar Onur cag...@10ur.org wrote: From: S.Çağlar Onur cag...@10ur.org Trying to start multiple containers concurrently may cause

[lxc-devel] No child processes - unexpected waitpid return value on double-fork

2013-04-24 Thread S . Çağlar Onur
Hey Serge, Unfortunately I don't have time to debug it today but I believe started to get following after your last commit [1]. [caglar@qgq:~/Project/lxc/examples] sudo ./concurrent_start Starting the container (5)... Starting the container (7)... Starting the container (0)... Starting the

[lxc-devel] [PATCH 2/2] Support stopping containers concurrently

2013-04-23 Thread S . Çağlar Onur
From: S.Çağlar Onur cag...@10ur.org Trying to stop multiple containers concurrently ends up with cgroup is not mounted errors as multiple threads corrupts the shared variables. Fix that stack corruption and start to use getmntent_r to support stopping multiple containers concurrently.

[lxc-devel] [PATCH 1/2] Support starting containers concurrently

2013-04-23 Thread S . Çağlar Onur
From: S.Çağlar Onur cag...@10ur.org Trying to start multiple containers concurrently may cause lxc_monitor_read_timeout to fail as select call could be interrupted by a signal, handle it. Signed-off-by: S.Çağlar Onur cag...@10ur.org --- src/lxc/state.c |7 +-- 1 file changed, 5

Re: [lxc-devel] [PATCH] Use container specific domain socket name

2013-04-17 Thread S . Çağlar Onur
Hi Serge, Yeah you are correct we need regular users to be able to monitor their own containes. I guess we can encrypt the messages but I'm not going there :) Cheers, On Wed, Apr 17, 2013 at 8:52 AM, Serge Hallyn serge.hal...@ubuntu.comwrote: Quoting S.Çağlar Onur (cag...@10ur.org): Hi

Re: [lxc-devel] [PATCH 1/2] Support starting containers concurrently

2013-04-17 Thread S . Çağlar Onur
Hi, That's up to you, I can keep them in my branch till we endup with a new monitor code or you can merge them now and they start to work with new monitor code later. I'm using git to send those patches and I can easily add signed-off lines (I even don't know why they are missing as I believe I

  1   2   >