Re: [lxc-devel] [Lxc-users] Working LXC templates?

2013-09-09 Thread Natanael Copa
On Sun, 08 Sep 2013 20:33:16 -0400 "Michael H. Warfield" wrote: > With all due respect... > > On Sun, 2013-09-08 at 16:08 -0700, Tony Su wrote: > > After putting some thought into this, > > IMO LXC badly needs a universal tool with the following features > > > > - A single script should be use

Re: [lxc-devel] [Lxc-users] Working LXC templates?

2013-09-09 Thread Michael H. Warfield
On Mon, 2013-09-09 at 08:58 +0200, Natanael Copa wrote: > On Sun, 08 Sep 2013 20:33:16 -0400 > "Michael H. Warfield" wrote: > > > With all due respect... > > > > On Sun, 2013-09-08 at 16:08 -0700, Tony Su wrote: > > > After putting some thought into this, > > > IMO LXC badly needs a universal

Re: [lxc-devel] [Lxc-users] Working LXC templates?

2013-09-09 Thread Michael H. Warfield
On Mon, 2013-09-09 at 17:23 +0530, Shridhar Daithankar wrote: > On Monday, September 09, 2013 07:28:43 AM Michael H. Warfield wrote: > > In the git-stage current Fedora template, the entire problem is embodied > > in the "download_fedora" function starting around line 201... The > > gotcha's are

Re: [lxc-devel] [Lxc-users] Working LXC templates?

2013-09-09 Thread Shridhar Daithankar
On Monday, September 09, 2013 07:28:43 AM Michael H. Warfield wrote: > In the git-stage current Fedora template, the entire problem is embodied > in the "download_fedora" function starting around line 201... The > gotcha's are three commands around line 272 after we've identified and > downloaded

Re: [lxc-devel] [Lxc-users] Working LXC templates?

2013-09-09 Thread Tony Su
Hello Michael, Yes, I would really appreciate your comments on what I'm attempting to do. Here is my thought process... In general, I've found that the problems you describe are all too common exactly because no one seems to have sat down and taken a close look at the flow involved in creating a

Re: [lxc-devel] [RFC] [PATCH 0/6] Major cgroup logic rewrite

2013-09-09 Thread Christian Seiler
Hi Serge, > Thanks, Christian. I did need the trivial white-space-damaged patch below, > but > with that it built and ran for me, both with %n and default (/lxc/%n) > patterns. > This was in a nested container, I haven't tested at host level but have no > reason to think that would fail if nest

Re: [lxc-devel] [RFC] [PATCH 0/6] Major cgroup logic rewrite

2013-09-09 Thread Serge Hallyn
Quoting Christian Seiler (christ...@iwakd.de): > Hi all, > > As discussed previously, I've now done a major rewrite of the entire > cgroup logic. There are now no assumptions made whatsoever when it > comes to the cgroup mount points, the kernel information will be used > to determine the proper l

Re: [lxc-devel] [RFC] [PATCH 0/6] Major cgroup logic rewrite

2013-09-09 Thread Serge Hallyn
Quoting Serge Hallyn (serge.hal...@ubuntu.com): > Quoting Christian Seiler (christ...@iwakd.de): > > Hi Serge, > > > > > Thanks, Christian. I did need the trivial white-space-damaged patch > > > below, but > > > with that it built and ran for me, both with %n and default (/lxc/%n) > > > pattern

[lxc-devel] [PATCH 1/1] error.c: don't return error if container init signaled

2013-09-09 Thread Serge Hallyn
We log that at INFO level in case it is needed. However, in a modern kernel a container which was shut down using 'shutdown' will always have been signaled with SIGINT. Making lxc-start return an error to reflect that seems overkill. It's *conceivable* that someone is depending on this behavior,

Re: [lxc-devel] [RFC] [PATCH 0/6] Major cgroup logic rewrite

2013-09-09 Thread Serge Hallyn
Quoting Christian Seiler (christ...@iwakd.de): > Hi Serge, > > > Thanks, Christian. I did need the trivial white-space-damaged patch below, > > but > > with that it built and ran for me, both with %n and default (/lxc/%n) > > patterns. > > This was in a nested container, I haven't tested at hos

Re: [lxc-devel] [PATCH 1/6] global config: Unify parsing, add additional checks

2013-09-09 Thread Serge Hallyn
Quoting Christian Seiler (christ...@iwakd.de): > Instead of duplicating the code for parsing the global config file for > each option, write one main function, lxc_global_config_value, that > does the parsing for an arbitrary option name and just call that > function from the existing ones. > > Si

Re: [lxc-devel] [PATCH 2/6] Add cgroup.pattern global configuration option

2013-09-09 Thread Serge Hallyn
Quoting Christian Seiler (christ...@iwakd.de): > Signed-off-by: Christian Seiler Acked-by: Serge E. Hallyn > --- > configure.ac|7 +++ > src/lxc/Makefile.am |3 ++- > src/lxc/utils.c |1 + > 3 files changed, 10 insertions(+), 1 deletion(-) > > diff --git a/configur

Re: [lxc-devel] [PATCH 3/6] Add fopen_cloexec function to emulate 'e' mode

2013-09-09 Thread Serge Hallyn
Quoting Christian Seiler (christ...@iwakd.de): > Newer glibc versions (that we can't require) allow for an additional > letter 'e' in the fopen mode that will cause the file to be opened with > the O_CLOEXEC flag, so that it will be closed if the program exec()s > away. This is important because if

Re: [lxc-devel] [PATCH 5/6] utils: Add utility functions that write/read to entire files

2013-09-09 Thread Serge Hallyn
Quoting Christian Seiler (christ...@iwakd.de): > Signed-off-by: Christian Seiler Acked-by: Serge E. Hallyn but I notice that lxc_read_line_from_file() is not being used here or later. The function would seem more useful if it accepted a line number to read. Otherwise I'd suggest we drop the f

Re: [lxc-devel] [PATCH 4/6] utils: Add string and array utility functions

2013-09-09 Thread Serge Hallyn
Quoting Christian Seiler (christ...@iwakd.de): > Adds a few useful string and array manipulation functions to utils.[ch] > > Signed-off-by: Christian Seiler Acked-by: Serge E. Hallyn However, a comment about +/* Normalize and split path: Leading and trailing / are removed, multiple + * / are c