[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 Onu

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 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-test-co

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 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 v2; >> * r

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

2013-11-12 Thread Stéphane Graber
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 v2; > * removed duplicated code > lxc-device which currently implements something lik

[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 --- src/lxc/lxccontainer.c | 84 ++ src/lxc/lxcc

Re: [lxc-devel] [PATCH] add process_lock()/unlock() in save_config()

2013-11-12 Thread Serge Hallyn
Quoting Dwight Engen (dwight.en...@oracle.com): > On Tue, 12 Nov 2013 14:42:54 -0600 > Serge Hallyn wrote: > > > Quoting Dwight Engen (dwight.en...@oracle.com): > > > This is likely unnecessary, but is consistent with other uses of > > > fopen()/fclose() in lxc. > > > > > > Signed-off-by: Dwight

Re: [lxc-devel] [PATCH] add process_lock()/unlock() in save_config()

2013-11-12 Thread Serge Hallyn
Quoting Dwight Engen (dwight.en...@oracle.com): > On Tue, 12 Nov 2013 14:42:54 -0600 > Serge Hallyn wrote: > > > Quoting Dwight Engen (dwight.en...@oracle.com): > > > This is likely unnecessary, but is consistent with other uses of > > > fopen()/fclose() in lxc. > > > > > > Signed-off-by: Dwight

Re: [lxc-devel] [PATCH] add process_lock()/unlock() in save_config()

2013-11-12 Thread Dwight Engen
On Tue, 12 Nov 2013 14:42:54 -0600 Serge Hallyn wrote: > Quoting Dwight Engen (dwight.en...@oracle.com): > > This is likely unnecessary, but is consistent with other uses of > > fopen()/fclose() in lxc. > > > > Signed-off-by: Dwight Engen > > Do you think, regardless of your other fix, that it

[lxc-devel] [lxc/lxc] 56390c: doc: Update Japanese lxc-top(1) for kernel memory ...

2013-11-12 Thread GitHub
Branch: refs/heads/master Home: https://github.com/lxc/lxc Commit: 56390ccb5764945d7dbf8bca9efc541ef178d688 https://github.com/lxc/lxc/commit/56390ccb5764945d7dbf8bca9efc541ef178d688 Author: KATOH Yasufumi Date: 2013-11-12 (Tue, 12 Nov 2013) Changed paths: M doc/ja/lxc-t

[lxc-devel] [lxc/lxc] 41ace3: Update lxc_create.c corrected argument usage examp...

2013-11-12 Thread GitHub
Branch: refs/heads/master Home: https://github.com/lxc/lxc Commit: 41ace3de7a17d21438dfeaac771b929e81ea4815 https://github.com/lxc/lxc/commit/41ace3de7a17d21438dfeaac771b929e81ea4815 Author: pc-wurm Date: 2013-11-12 (Tue, 12 Nov 2013) Changed paths: M src/lxc/lxc_create.

[lxc-devel] [lxc/lxc] d59fec: lxc-ubuntu*: Mark non-essential mounts optional

2013-11-12 Thread GitHub
Branch: refs/heads/master Home: https://github.com/lxc/lxc Commit: d59feca3be9651b0ec38a57a8614cc2f3c51ca45 https://github.com/lxc/lxc/commit/d59feca3be9651b0ec38a57a8614cc2f3c51ca45 Author: Stéphane Graber Date: 2013-11-12 (Tue, 12 Nov 2013) Changed paths: M templates/l

Re: [lxc-devel] [PATCH] lxc-ubuntu*: Mark non-essential mounts optional

2013-11-12 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): > Signed-off-by: Stéphane Graber Acked-by: Serge E. Hallyn > --- > templates/lxc-ubuntu-cloud.in | 6 +++--- > templates/lxc-ubuntu.in | 6 +++--- > 2 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/templates/lxc-ubuntu-clou

[lxc-devel] [lxc/lxc] 6c6892: fix multithreaded create()

2013-11-12 Thread GitHub
Branch: refs/heads/master Home: https://github.com/lxc/lxc Commit: 6c6892b5c5c6281d1e74c979168d1cbbe6a50ffc https://github.com/lxc/lxc/commit/6c6892b5c5c6281d1e74c979168d1cbbe6a50ffc Author: Dwight Engen Date: 2013-11-12 (Tue, 12 Nov 2013) Changed paths: M src/lxc/lxccon

Re: [lxc-devel] [PATCH] add process_lock()/unlock() in save_config()

2013-11-12 Thread Serge Hallyn
Quoting Dwight Engen (dwight.en...@oracle.com): > This is likely unnecessary, but is consistent with other uses of > fopen()/fclose() in lxc. > > Signed-off-by: Dwight Engen Do you think, regardless of your other fix, that it would still be worth adding an fsync? Acked-by: Serge E. Hallyn > -

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

2013-11-12 Thread Serge Hallyn
Quoting Dwight Engen (dwight.en...@oracle.com): > 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 > LXC_DEFAULT_CONFIG) would overwrite t

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 wrote: > On Tue, 12 Nov 2013 14:35:58 -0500 > S.Çağlar Onur wrote: > >> On Tue, Nov 12, 2013 at 2:04 PM, Dwight Engen >> wrote: >> > We were calling save_config() twice within the create() flow, each >> > from a different process. Dependi

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

2013-11-12 Thread Dwight Engen
On Tue, 12 Nov 2013 14:35:58 -0500 S.Çağlar Onur wrote: > On Tue, Nov 12, 2013 at 2:04 PM, Dwight Engen > 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_confi

Re: [lxc-devel] lxc and network namespace

2013-11-12 Thread Stéphane Graber
On Tue, Nov 12, 2013 at 12:11:19PM -0800, Arjun Sambamoorthy wrote: > [Trying dev list as there was no response from user list] > > Hi, > > I am using lxc with a couple of veths on ubuntu. I'd like to know its > network namespace name so that i can dynamically add/remove veths to the > netns afte

[lxc-devel] lxc and network namespace

2013-11-12 Thread Arjun Sambamoorthy
[Trying dev list as there was no response from user list] Hi, I am using lxc with a couple of veths on ubuntu. I'd like to know its network namespace name so that i can dynamically add/remove veths to the netns after the lxc is started. Could this be done in lxc? Also, executing "ip netns list" r

Re: [lxc-devel] [PATCH] add process_lock()/unlock() in save_config()

2013-11-12 Thread S . Çağlar Onur
On Tue, Nov 12, 2013 at 2:04 PM, Dwight Engen wrote: > This is likely unnecessary, but is consistent with other uses of > fopen()/fclose() in lxc. > > Signed-off-by: Dwight Engen Acked-by: S.Çağlar Onur > --- > src/lxc/lxccontainer.c | 4 > 1 file changed, 4 insertions(+) > > diff --git

Re: [lxc-devel] [PATCH 2/2] Support files for systemd on Fedora.

2013-11-12 Thread Michael H. Warfield
Crap... Playing around with git and I totally forgot to sign off on these things... Signed-off-by: Michael H. Warfield On Mon, 2013-11-11 at 20:10 -0500, Michael H. Warfield wrote: > Added a file "lxc.service" for a systemd service file. > > Added a file "lxc-devsetup" to setup /dev/ on start

Re: [lxc-devel] [PATCH 1/2] Setup devtmpfs and /dev for autodev bind mounts.

2013-11-12 Thread Michael H. Warfield
Crap... Playing around with git and I totally forgot to sign off on these things... Signed-off-by: Michael H. Warfield On Mon, 2013-11-11 at 20:08 -0500, Michael H. Warfield wrote: > If autodev is not specifically set to 0 or 1, attempts to determine if > systemd is being utilized and forces a

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 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 > LXC_DEFAULT_CONFIG) would overw

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

2013-11-12 Thread Dwight Engen
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 LXC_DEFAULT_CONFIG) would overwrite the config we wanted (the full config), causing a truncat

[lxc-devel] [PATCH] add process_lock()/unlock() in save_config()

2013-11-12 Thread Dwight Engen
This is likely unnecessary, but is consistent with other uses of fopen()/fclose() in lxc. Signed-off-by: Dwight Engen --- src/lxc/lxccontainer.c | 4 1 file changed, 4 insertions(+) diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index ede0113..c7b2f5e 100644 --- a/src/lxc/lxc

[lxc-devel] [PATCH] lxc-ubuntu*: Mark non-essential mounts optional

2013-11-12 Thread Stéphane Graber
Signed-off-by: Stéphane Graber --- templates/lxc-ubuntu-cloud.in | 6 +++--- templates/lxc-ubuntu.in | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/lxc-ubuntu-cloud.in b/templates/lxc-ubuntu-cloud.in index 41f1c70..aeadc2d 100644 --- a/templates/lxc-ubu

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

2013-11-12 Thread Serge Hallyn
Quoting S.Çağlar Onur (cag...@10ur.org): > Hi Serge, > > On Mon, Nov 11, 2013 at 4:04 PM, Serge Hallyn 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. > >> A

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 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 into src/lxc/lxcloc

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" wrote: > > Quoting S.Çağlar Onur (cag...@10ur.org): > > Hey Serge, > > > > On Fri, Nov 8, 2013 at 4:06 PM, Serge Hallyn wrote: > > > Quoting S.Çağlar Onur (cag...@10ur.org): > > >> creat() is equivalent to open() with flags equal to O_CREAT|O_WRONLY|O_TRUNC

Re: [lxc-devel] Ubuntu container failure on Fedora...

2013-11-12 Thread Michael H. Warfield
On Tue, 2013-11-12 at 09:59 -0500, Stéphane Graber wrote: > On Tue, Nov 12, 2013 at 08:31:03AM -0500, Michael H. Warfield wrote: > > Ok all... > > > > Seems like this just started happening in the last few weeks and I'm not > > sure when... But... My newly created Ubuntu containers are failing

Re: [lxc-devel] Ubuntu container failure on Fedora...

2013-11-12 Thread Stéphane Graber
On Tue, Nov 12, 2013 at 08:31:03AM -0500, Michael H. Warfield wrote: > Ok all... > > Seems like this just started happening in the last few weeks and I'm not > sure when... But... My newly created Ubuntu containers are failing to > start on my Fedora hosts because of a mount problem. So... > >

[lxc-devel] Ubuntu container failure on Fedora...

2013-11-12 Thread Michael H. Warfield
Ok all... Seems like this just started happening in the last few weeks and I'm not sure when... But... My newly created Ubuntu containers are failing to start on my Fedora hosts because of a mount problem. So... What's this, what does it do, and is this really required? [root@hydra mhw]# lxc-