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

2013-04-17 Thread Serge Hallyn
Well if we really want to go that route, we can a. specify a monitor-port in $lxcpath/lxc.conf b. write a world-unreadable $lxcpath/monitor-secret file c. require catting $lxcpath/monitor-secret at initial connection so /var/lib/lxc/lxc.conf can have monitor-port=9998, while /home/serge/lxcbas

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 wrote: > Quoting S.Çağlar Onur (cag...@10ur.org): > > Hi there, > > > > What abou

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

2013-04-17 Thread Serge Hallyn
Quoting S.Çağlar Onur (cag...@10ur.org): > Hi there, > > What about using AF_INET but binding a restricted port while adding a new > field to the message? As an example we can start to create a hmac (or > something like that) per container in the creation time and save that into > LXCPATH/CONTAINE

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

2013-04-16 Thread S . Çağlar Onur
Hi there, What about using AF_INET but binding a restricted port while adding a new field to the message? As an example we can start to create a hmac (or something like that) per container in the creation time and save that into LXCPATH/CONTAINERNAME/hmac. Then both client (can add that value to m

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

2013-04-16 Thread Serge Hallyn
Quoting Dwight Engen (dwight.en...@oracle.com): > On Tue, 16 Apr 2013 08:52:56 -0500 > Serge Hallyn wrote: > > > Quoting S.Çağlar Onur (cag...@10ur.org): > > > Hi Serge, > > > > > > I was just following your lead as you said you don't wan't any long > > > running monitor daemon :) > > > > Yup,

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

2013-04-16 Thread Dwight Engen
On Tue, 16 Apr 2013 08:52:56 -0500 Serge Hallyn wrote: > Quoting S.Çağlar Onur (cag...@10ur.org): > > Hi Serge, > > > > I was just following your lead as you said you don't wan't any long > > running monitor daemon :) > > Yup, at this point I"m going for the least bad solution. (since the > be

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

2013-04-16 Thread Serge Hallyn
Quoting S.Çağlar Onur (cag...@10ur.org): > Hi Serge, > > I was just following your lead as you said you don't wan't any long running > monitor daemon :) Yup, at this point I"m going for the least bad solution. (since the best solution, multicast af_unix, isn't possible :) > Also I'm not sure ho

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

2013-04-15 Thread Daniel Lezcano
On 04/15/2013 07:18 PM, Serge Hallyn wrote: > Quoting Daniel Lezcano (daniel.lezc...@free.fr): >> On 04/15/2013 07:53 AM, S.Çağlar Onur wrote: >>> Hi Daniel, >>> >>> >>> On Sun, Apr 14, 2013 at 4:42 PM, Daniel Lezcano >>> mailto:daniel.lezc...@free.fr>> wrote: >>> >>> On 04/14/2013 09:56 PM, S.

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

2013-04-15 Thread S . Çağlar Onur
Hi Serge, I was just following your lead as you said you don't wan't any long running monitor daemon :) Also I'm not sure how does that daemon is going to help starting multiple containers concurrently using only API. I'm guessing the first request will cause that daemon to start and it will never

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

2013-04-15 Thread Serge Hallyn
Quoting Daniel Lezcano (daniel.lezc...@free.fr): > On 04/15/2013 07:53 AM, S.Çağlar Onur wrote: > > Hi Daniel, > > > > > > On Sun, Apr 14, 2013 at 4:42 PM, Daniel Lezcano > > mailto:daniel.lezc...@free.fr>> wrote: > > > > On 04/14/2013 09:56 PM, S.Çağlar Onur wrote: > > > Hi all, > > >

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

2013-04-15 Thread S . Çağlar Onur
Hi Daniel, Seems like my assumption was wrong (I was under the impression that calling setsockopt with SO_BROADCAST will require root privileges) as I was able to send fake state updates with my user account using following fake client; #include #include #include #include #include #include

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

2013-04-15 Thread S . Çağlar Onur
Hi Daniel, On Mon, Apr 15, 2013 at 5:14 AM, Daniel Lezcano wrote: > On 04/15/2013 07:53 AM, S.Çağlar Onur wrote: > > Hi Daniel, > > > > > > On Sun, Apr 14, 2013 at 4:42 PM, Daniel Lezcano > > mailto:daniel.lezc...@free.fr>> wrote: > > > > On 04/14/2013 09:56 PM, S.Çağlar Onur wrote: > >

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

2013-04-15 Thread Daniel Lezcano
On 04/15/2013 07:53 AM, S.Çağlar Onur wrote: > Hi Daniel, > > > On Sun, Apr 14, 2013 at 4:42 PM, Daniel Lezcano > mailto:daniel.lezc...@free.fr>> wrote: > > On 04/14/2013 09:56 PM, S.Çağlar Onur wrote: > > Hi all, > > > > I had some free time today so I tried to implement something

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

2013-04-14 Thread S . Çağlar Onur
Hi Daniel, On Sun, Apr 14, 2013 at 4:42 PM, Daniel Lezcano wrote: > On 04/14/2013 09:56 PM, S.Çağlar Onur wrote: > > Hi all, > > > > I had some free time today so I tried to implement something using > > AF_INET messages over loopback broadcast address. I'm not including > > the patch here becau

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

2013-04-14 Thread Daniel Lezcano
On 04/14/2013 09:56 PM, S.Çağlar Onur wrote: > Hi all, > > I had some free time today so I tried to implement something using > AF_INET messages over loopback broadcast address. I'm not including > the patch here because gmail web interface damages it and that's what > I use right now so please use

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

2013-04-14 Thread S . Çağlar Onur
Hi all, I had some free time today so I tried to implement something using AF_INET messages over loopback broadcast address. I'm not including the patch here because gmail web interface damages it and that's what I use right now so please use [1] to see it. I'm sending it to get your feedback and

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

2013-04-12 Thread S . Çağlar Onur
Hi Daniel, I might be completely wrong and I'm only asking for educational purposes as I started to read netlink docs couple of hours ago but it looks like it's possible to crete new netlink protocol/group and use it for IPC between userspace applications, in fact it looks like that's what udev-mo

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

2013-04-12 Thread Daniel Lezcano
On 04/12/2013 06:55 PM, S.Çağlar Onur wrote: > I'm not experienced with it so please forgive me if I'm talking > non-sense but what about switching back to using (or abusing depending > on your point of view) netlink via libnl? Because it is much more than abusing :) It is hacking the rtnetlink se

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

2013-04-12 Thread S . Çağlar Onur
I'm not experienced with it so please forgive me if I'm talking non-sense but what about switching back to using (or abusing depending on your point of view) netlink via libnl? On Fri, Apr 12, 2013 at 10:02 AM, Serge Hallyn wrote: > Quoting Daniel Lezcano (daniel.lezc...@free.fr): > > Sorry for

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

2013-04-12 Thread Serge Hallyn
Quoting Daniel Lezcano (daniel.lezc...@free.fr): > Sorry for jumping so late in the thread but I disagree to use DBUS with > LXC because of the dependency with more packages, LXC has been designed > to be stand alone, nothing prevent to add more complexity and > dependencies but on top of LXC not i

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

2013-04-10 Thread Daniel Lezcano
On 04/10/2013 09:42 PM, Stéphane Graber wrote: > On 04/10/2013 08:15 PM, Serge Hallyn wrote: >> Quoting Christian Seiler (christ...@iwakd.de): >>> Hi there, >>> Let's say I do sudo lxc-monitor -n r1 -n r2 and now do sudo lxc-start -n r1 How do we k

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

2013-04-10 Thread Stéphane Graber
On 04/10/2013 08:15 PM, Serge Hallyn wrote: > Quoting Christian Seiler (christ...@iwakd.de): >> Hi there, >> >>> Let's say I do >>> >>> sudo lxc-monitor -n r1 -n r2 >>> >>> and now do >>> >>> sudo lxc-start -n r1 >>> >>> How do we know to send the 'started' event to the lxc-monitor, since >

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

2013-04-10 Thread Serge Hallyn
Quoting Christian Seiler (christ...@iwakd.de): > Hi there, > > > Let's say I do > > > > sudo lxc-monitor -n r1 -n r2 > > > > and now do > > > > sudo lxc-start -n r1 > > > > How do we know to send the 'started' event to the lxc-monitor, since > > there was not yet a lxc-start daemon run

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

2013-04-10 Thread Christian Seiler
Hi there, > Let's say I do > > sudo lxc-monitor -n r1 -n r2 > > and now do > > sudo lxc-start -n r1 > > How do we know to send the 'started' event to the lxc-monitor, since > there was not yet a lxc-start daemon running? Just to throw my 2¢ in there - why not use DBus for that? It

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

2013-04-10 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): > On 04/10/2013 06:43 PM, Serge Hallyn wrote: > > Quoting Stéphane Graber (stgra...@ubuntu.com): > >> On 04/10/2013 06:49 AM, Serge Hallyn wrote: > >>> Quoting S.Çağlar Onur (cag...@10ur.org): > Hi Serge, > > On Tue, Apr 9, 2013 at 4:47

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

2013-04-10 Thread Stéphane Graber
On 04/10/2013 06:43 PM, Serge Hallyn wrote: > Quoting Stéphane Graber (stgra...@ubuntu.com): >> On 04/10/2013 06:49 AM, Serge Hallyn wrote: >>> Quoting S.Çağlar Onur (cag...@10ur.org): Hi Serge, On Tue, Apr 9, 2013 at 4:47 PM, Serge Hallyn wrote: > All right you made m

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

2013-04-10 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): > On 04/10/2013 06:49 AM, Serge Hallyn wrote: > > Quoting S.Çağlar Onur (cag...@10ur.org): > >> Hi Serge, > >> > >> On Tue, Apr 9, 2013 at 4:47 PM, Serge Hallyn > >> wrote: > >> > >>> All right you made me finally take a closer look at the monitor cod

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

2013-04-10 Thread Stéphane Graber
On 04/10/2013 06:49 AM, Serge Hallyn wrote: > Quoting S.Çağlar Onur (cag...@10ur.org): >> Hi Serge, >> >> On Tue, Apr 9, 2013 at 4:47 PM, Serge Hallyn wrote: >> >>> All right you made me finally take a closer look at the monitor code >>> (which I'd been avoiding). It's much simpler than I'd imagin

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

2013-04-09 Thread Serge Hallyn
Quoting S.Çağlar Onur (cag...@10ur.org): > Hi Serge, > > On Tue, Apr 9, 2013 at 4:47 PM, Serge Hallyn wrote: > > > All right you made me finally take a closer look at the monitor code > > (which I'd been avoiding). It's much simpler than I'd imagined. So > > here are the challenges: > > > > 1.

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

2013-04-09 Thread S . Çağlar Onur
Hi Serge, On Tue, Apr 9, 2013 at 4:47 PM, Serge Hallyn wrote: > All right you made me finally take a closer look at the monitor code > (which I'd been avoiding). It's much simpler than I'd imagined. So > here are the challenges: > > 1. lxc-monitor should be able to watch 'all containers' (at le

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

2013-04-09 Thread Serge Hallyn
All right you made me finally take a closer look at the monitor code (which I'd been avoiding). It's much simpler than I'd imagined. So here are the challenges: 1. lxc-monitor should be able to watch 'all containers' (at least under a given lxcpath). That is actually the strong reason to object

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

2013-04-09 Thread S . Çağlar Onur
Hi Serge, Got it, in this case I'm waiting Daniel to respond before changing the patch based on your comments. On Tue, Apr 9, 2013 at 8:47 AM, Serge Hallyn wrote: > Quoting S.Çağlar Onur (cag...@10ur.org): > > From: "S.Çağlar Onur" > > > > Otherwise trying to start N containers in parallel giv

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

2013-04-09 Thread Serge Hallyn
Quoting S.Çağlar Onur (cag...@10ur.org): > From: "S.Çağlar Onur" > > Otherwise trying to start N containers in parallel gives "lxc_container: bind > : Address already in use" error. > > Found while using Go bindings to create/start/stop large number of containers > in parallel so I reproduced

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

2013-04-08 Thread S . Çağlar Onur
From: "S.Çağlar Onur" Otherwise trying to start N containers in parallel gives "lxc_container: bind : Address already in use" error. Found while using Go bindings to create/start/stop large number of containers in parallel so I reproduced the same using Python API to rule out possible Go rela