[lxc-devel] [PATCH 1/3] lxc-doc-synopsis-args

2012-09-10 Thread Dwight Engen
I was getting raw nroff ".SH DESCRIPTION" in my man pages. This fixes the synopsis cmd args so that doesn't happen. Added replaceable to a few arguments. Signed-off-by: Dwight Engen --- doc/lxc-attach.sgml.in | 11 +++ doc/lxc-cgroup.sgml.in |7 +

[lxc-devel] [PATCH 2/3] lxc-pkgconfig-dir

2012-09-10 Thread Dwight Engen
Put pkg-config .pc file in libdir. Signed-off-by: Dwight Engen --- Makefile.am |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Makefile.am b/Makefile.am index 887e300..c66ecc6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,7 +6,7 @@ SUBDIRS = src templates doc

[lxc-devel] [PATCH 3/3] lxc-rpm-build

2012-09-10 Thread Dwight Engen
Expand variables to get correct paths in man pages and fix building of rpm by non-root user. Include templates in rpm, fix rpm path of lxc-init. Signed-off-by: Dwight Engen --- configure.ac |6 +++--- lxc.spec.in | 18 -- 2 files changed, 15 insertions(+), 9 deletions

[lxc-devel] [PATCH 2/2] fix compile without apparmor (against git staging)

2012-09-10 Thread Dwight Engen
Add a few missing #if's to fix compilation when configured without AppArmor. Signed-off-by: Dwight Engen --- src/lxc/conf.c|2 ++ src/lxc/confile.c |4 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c index ecd89c1..1450ca6 1

[lxc-devel] [PATCH 1/2] fix gcc error: typedef redefinition (against git staging)

2012-09-10 Thread Dwight Engen
Fix gcc error confile.c:83: error: redefinition of typedef ‘config_cb’. Its already defined the same way in confile.h. Signed-off-by: Dwight Engen --- src/lxc/confile.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/src/lxc/confile.c b/src/lxc/confile.c index 0f4e11d

Re: [lxc-devel] [PATCH 1/3] lxc-doc-synopsis-args

2012-09-10 Thread Dwight Engen
;t happen. Added replaceable to a few arguments. Signed-off-by: Dwight Engen --- doc/lxc-attach.sgml.in | 14 +- doc/lxc-cgroup.sgml.in |7 --- doc/lxc-checkpoint.sgml.in |8 doc/lxc-console.sgml.in|8 doc/lxc-create.sgml.in | 12

Re: [lxc-devel] [PATCH 3/3] lxc-rpm-build

2012-09-10 Thread Dwight Engen
On Mon, 10 Sep 2012 13:53:50 -0400 Stéphane Graber wrote: [...] > >>> diff --git a/configure.ac b/configure.ac > >>> index 70c74ec..b8d86e6 100644 > >>> --- a/configure.ac > >>> +++ b/configure.ac > >>> @@ -70,11 +70,11 @@ AC_ARG_WITH([rootfs-path], > >>> )], [], [with_rootfs_path=['${libdir}/l

Re: [lxc-devel] [PATCH 3/3] lxc-rpm-build

2012-09-11 Thread Dwight Engen
Once we apply your change, we'd have to check for such dead code and > clean it up. Fixing the rpm build can be done without fixing the variable expand problem by using DESTDIR, so this is a split out of fixing the rpm build. --- Fix rpm build, package templates. Signed-off-by: Dwight

Re: [lxc-devel] [PATCH 3/3] lxc-rpm-build

2012-09-11 Thread Dwight Engen
On Tue, 11 Sep 2012 14:30:22 -0400 Dwight Engen wrote: > On Mon, 10 Sep 2012 13:53:50 -0400 > Stéphane Graber wrote: > > [...] > > > The reason I changed them to expand was so the docs would be right > > > (they had SUBST paths with ${var} still in them) but o

[lxc-devel] [PATCH 1/2] fix trivial off by one error

2012-09-18 Thread Dwight Engen
Since the if uses >=, the - 1 is not needed and the MAXFDS'th entry in the fds array can be used. --- src/lxc/cgroup.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/lxc/cgroup.c b/src/lxc/cgroup.c index a02ebc2..7bb88b5 100644 --- a/src/lxc/cgroup.c +++ b/src/lxc/cg

[lxc-devel] [PATCH 2/2] allow short -h and -n options to lxc-ps

2012-09-18 Thread Dwight Engen
--- doc/lxc-ps.sgml.in |4 ++-- src/lxc/lxc-ps.in |4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/lxc-ps.sgml.in b/doc/lxc-ps.sgml.in index f3275ae..401a17c 100644 --- a/doc/lxc-ps.sgml.in +++ b/doc/lxc-ps.sgml.in @@ -51,7 +51,7 @@ Foundation, Inc., 59 Temple P

Re: [lxc-devel] [PATCH 1/2] fix trivial off by one error

2012-09-18 Thread Dwight Engen
On Tue, 18 Sep 2012 22:18:03 +0200 Christian Seiler wrote: > Hi, > > Just a heads up: > > > Since the if uses >=, the - 1 is not needed and the MAXFDS'th > > entry in the fds array can be used. > > This was from part of one of my patches regarding lxc-attach and it is > NOT an off-by-one error

Re: [lxc-devel] [PATCH 1/2] fix trivial off by one error

2012-09-19 Thread Dwight Engen
On Tue, 18 Sep 2012 14:32:02 -0700 (PDT) Christian Seiler wrote: > Hi, > > > Do you think mallocing an fd_set and using FD_SET() and friends > > would be better? The (dispose|finish) loops would visit FD_SETSIZE > > bits with an FD_ISSET() test, which is more work than you have > > currently wit

[lxc-devel] [PATCH] fix minor spelling error

2012-09-26 Thread Dwight Engen
Signed-off-by: Dwight Engen --- doc/lxc-attach.sgml.in |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/doc/lxc-attach.sgml.in b/doc/lxc-attach.sgml.in index a9a2902..34e9027 100644 --- a/doc/lxc-attach.sgml.in +++ b/doc/lxc-attach.sgml.in @@ -133,7 +133,7 @@ Foundation

[lxc-devel] [PATCH] if the rootfs is a btrfs subvolume, delete it instead of rm -rf

2012-09-26 Thread Dwight Engen
Check if the rootfs is btrfs subvolume, and if so delete it. Otherwise fall back to the rm -rf. Signed-off-by: Dwight Engen --- src/lxc/lxc-destroy.in | 13 + 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/lxc/lxc-destroy.in b/src/lxc/lxc-destroy.in index

[lxc-devel] [PATCH] handle clone of btrfs snapshots

2012-09-26 Thread Dwight Engen
de even if $lxc_path isn't on the same filesystem. If $oldroot isn't a subvolume, fall back to making a copy. Signed-off-by: Dwight Engen --- src/lxc/lxc-clone.in | 19 +-- 1 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/lxc/lxc-clone.in b/src/lx

[lxc-devel] [PATCH] Add Oracle Linux template

2012-10-01 Thread Dwight Engen
This is a new template to create containers based on an Oracle Linux rootfs image. The path to the rootfs must be given to the template, and if it resides on a btrfs will be snapshoted rather than copied. Signed-off-by: Dwight Engen --- configure.ac |1 + templates/Makefile.am

Re: [lxc-devel] [PATCH] Add Oracle Linux template

2012-10-01 Thread Dwight Engen
On Mon, 01 Oct 2012 11:56:14 -0400 Stéphane Graber wrote: > On 10/01/2012 11:39 AM, Dwight Engen wrote: > > > > This is a new template to create containers based on an Oracle Linux > > rootfs image. The path to the rootfs must be given to the template, > > and if it

Re: [lxc-devel] [PATCH v2] Add Oracle Linux template

2012-10-01 Thread Dwight Engen
This is a new template to create containers based on an Oracle Linux rootfs image. The path to the rootfs must be given to the template, and if it resides on a btrfs will be snapshoted rather than copied. Signed-off-by: Dwight Engen --- configure.ac|1 + templates/Makefile.am

Re: [lxc-devel] [PATCH v2] Add Oracle Linux template

2012-10-01 Thread Dwight Engen
On Mon, 1 Oct 2012 12:27:16 -0500 Serge Hallyn wrote: > Quoting Dwight Engen (dwight.en...@oracle.com): > > > > This is a new template to create containers based on an Oracle Linux > > rootfs image. The path to the rootfs must be given to the template, > > and if it

Re: [lxc-devel] [PATCH v2] Add Oracle Linux template

2012-10-02 Thread Dwight Engen
On Tue, 2 Oct 2012 09:16:22 -0500 Serge Hallyn wrote: > Quoting Dwight Engen (dwight.en...@oracle.com): > > On Mon, 1 Oct 2012 12:27:16 -0500 > > Serge Hallyn wrote: > > > > > Quoting Dwight Engen (dwight.en...@oracle.com): > > > > > > > >

[lxc-devel] [PATCH] fix "make rpm"

2012-10-04 Thread Dwight Engen
RPM doesn't like "-" in the version number and gives: "error: line 24: Illegal char '-' in: Version: 0.8.0-rc2" Other packages (bind-utils for example) have used . instead of - as a seperator. Signed-off-by: Dwight Engen --- configure.ac |2 +- 1 files ch

[lxc-devel] [PATCH] display warning when yum missing in fedora template

2012-10-04 Thread Dwight Engen
This early exit is preventing the warning message that follows it from being shown. Signed-off-by: Dwight Engen --- templates/lxc-fedora.in |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/templates/lxc-fedora.in b/templates/lxc-fedora.in index 0bcb396..edd4b9d 100644

Re: [lxc-devel] [PATCH v3] Add Oracle Linux template

2012-10-04 Thread Dwight Engen
given to the template with the -t option. The architecture of the downloaded rpms installed in the container can be specified with the -a template option. Signed-off-by: Dwight Engen --- configure.ac|1 + templates/Makefile.am |1 + templates/lxc-oracle.in | 496

Re: [lxc-devel] [PATCH v2] Add Oracle Linux template

2012-10-04 Thread Dwight Engen
On Tue, 2 Oct 2012 09:56:17 -0500 Serge Hallyn wrote: > Quoting Dwight Engen (dwight.en...@oracle.com): > > On Tue, 2 Oct 2012 09:16:22 -0500 > > Serge Hallyn wrote: > > > > > Quoting Dwight Engen (dwight.en...@oracle.com): > > > > On Mon, 1 Oct 2012

Re: [lxc-devel] [PATCH v3] Add Oracle Linux template

2012-10-08 Thread Dwight Engen
On Fri, 5 Oct 2012 16:52:27 -0500 Serge Hallyn wrote: > Quoting Dwight Engen (dwight.en...@oracle.com): > > > > This is a new template to create containers based on Oracle Linux. > > A version such as 5.8, 6.3, or 6.latest can be specified with -R in > > which case a

Re: [lxc-devel] [PATCH v3] Add Oracle Linux template

2012-10-09 Thread Dwight Engen
On Mon, 8 Oct 2012 14:35:10 -0500 Serge Hallyn wrote: > Quoting Dwight Engen (dwight.en...@oracle.com): > > On Fri, 5 Oct 2012 16:52:27 -0500 > > Serge Hallyn wrote: > > > > > Quoting Dwight Engen (dwight.en...@oracle.com): > > > > > > > >

[lxc-devel] [PATCH 4/4] Fix removal of unneeded startup/shutdown scripts

2012-10-09 Thread Dwight Engen
Signed-off-by: Dwight Engen --- templates/lxc-oracle.in | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/lxc-oracle.in b/templates/lxc-oracle.in index 314cd34..efd19ef 100644 --- a/templates/lxc-oracle.in +++ b/templates/lxc-oracle.in @@ -107,8 +107,8

[lxc-devel] [PATCH 2/4] Better rpm database downgrade logic

2012-10-09 Thread Dwight Engen
ut it where the guest expects it to be. Signed-off-by: Dwight Engen --- templates/lxc-oracle.in | 43 ++- 1 files changed, 34 insertions(+), 9 deletions(-) diff --git a/templates/lxc-oracle.in b/templates/lxc-oracle.in index e13f13b..ba62f8f 100644

[lxc-devel] [PATCH 1/4] Honor network type and link from lxc-create -f

2012-10-09 Thread Dwight Engen
Make the oracle template honor the lxc.network.type and lxc.network.link configuration items if a "base" configuration file is passed to lxc-create. If no configuration file is passed, the template falls back to the default name created by libvirt. Signed-off-by: Dwight Engen --- tem

[lxc-devel] [PATCH 3/4] Always rebuild rpm database

2012-10-09 Thread Dwight Engen
Always rebuild the rpm database with the guest's rpm so there are no db version mismatches when you boot the guest and run rpm or yum. Signed-off-by: Dwight Engen --- templates/lxc-oracle.in |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/templates/lxc-oracle

Re: [lxc-devel] [PATCH 1/4] Honor network type and link from lxc-create -f

2012-10-11 Thread Dwight Engen
On Thu, 11 Oct 2012 10:10:03 -0500 Serge Hallyn wrote: > Quoting Dwight Engen (dwight.en...@oracle.com): > > Make the oracle template honor the lxc.network.type and > > lxc.network.link configuration items if a "base" configuration file > > is passed to lxc-crea

Re: [lxc-devel] [PATCH 1/4] Honor network type and link from lxc-create -f

2012-10-11 Thread Dwight Engen
On Thu, 11 Oct 2012 11:48:41 -0500 Serge Hallyn wrote: > Quoting Dwight Engen (dwight.en...@oracle.com): > > On Thu, 11 Oct 2012 10:10:03 -0500 > > Serge Hallyn wrote: > > > > > Quoting Dwight Engen (dwight.en...@oracle.com): > > > > Make the orac

Re: [lxc-devel] [PATCH 1/4] Honor network type and link from lxc-create -f

2012-10-11 Thread Dwight Engen
On Thu, 11 Oct 2012 13:04:27 -0500 Serge Hallyn wrote: > Quoting Dwight Engen (dwight.en...@oracle.com): > > On Thu, 11 Oct 2012 11:48:41 -0500 > > Serge Hallyn wrote: > > > > > Quoting Dwight Engen (dwight.en...@oracle.com): > > > > On Thu, 11 Oc

[lxc-devel] [PATCH 1/5] Better rpm database downgrade logic

2012-10-15 Thread Dwight Engen
ut it where the guest expects it to be. Signed-off-by: Dwight Engen --- templates/lxc-oracle.in | 43 ++- 1 files changed, 34 insertions(+), 9 deletions(-) diff --git a/templates/lxc-oracle.in b/templates/lxc-oracle.in index e13f13b..ba62f8f 100644

[lxc-devel] [PATCH 2/5] Always rebuild rpm database

2012-10-15 Thread Dwight Engen
Always rebuild the rpm database with the guest's rpm so there are no db version mismatches when you boot the guest and run rpm or yum. Signed-off-by: Dwight Engen --- templates/lxc-oracle.in |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/templates/lxc-oracle

[lxc-devel] [PATCH 3/5] Fix removal of unneeded startup/shutdown scripts

2012-10-15 Thread Dwight Engen
Signed-off-by: Dwight Engen --- templates/lxc-oracle.in | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/lxc-oracle.in b/templates/lxc-oracle.in index 9a875af..84c3c33 100644 --- a/templates/lxc-oracle.in +++ b/templates/lxc-oracle.in @@ -94,7 +94,7

[lxc-devel] [PATCH 0/5] Oracle template

2012-10-15 Thread Dwight Engen
On Thu, 11 Oct 2012 13:20:51 -0500 Serge Hallyn wrote: > Quoting Dwight Engen (dwight.en...@oracle.com): > > On Thu, 11 Oct 2012 13:04:27 -0500 > > Serge Hallyn wrote: > > > > > Quoting Dwight Engen (dwight.en...@oracle.com): > > > > On Thu, 11 Oc

[lxc-devel] [PATCH 4/5] Honor network type and link from lxc-create -f

2012-10-15 Thread Dwight Engen
created by libvirt. Signed-off-by: Dwight Engen --- templates/lxc-oracle.in | 17 + 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/templates/lxc-oracle.in b/templates/lxc-oracle.in index 84c3c33..f080dab 100644 --- a/templates/lxc-oracle.in +++ b/templates/lxc

[lxc-devel] [PATCH 5/5] Add distro config file /etc/lxc/lxc.conf

2012-10-15 Thread Dwight Engen
config. Signed-off-by: Dwight Engen --- Makefile.am |2 +- config/Makefile.am |9 + config/lxc.conf.debian |3 +++ config/lxc.conf.libvirt |3 +++ config/lxc.conf.unknown |1 + configure.ac| 25 + lxc.spec.in

Re: [lxc-devel] [PATCH 5/5] Add distro config file /etc/lxc/lxc.conf

2012-10-15 Thread Dwight Engen
On Mon, 15 Oct 2012 12:42:57 -0500 Serge Hallyn wrote: > Quoting Dwight Engen (dwight.en...@oracle.com): > > This allows a distro to put the distro specific default network > > configuration (for example bridge device, link type), or other lxc > > configuration in the case

Re: [lxc-devel] [PATCH 4/5] Honor network type and link from lxc-create -f

2012-10-17 Thread Dwight Engen
Thanks, sounds good. On Mon, 15 Oct 2012 15:30:39 -0500 Serge Hallyn wrote: > Thanks, Dwight, works like a charm for me. I've pulled patches 1-4 > into my github tree, and have asked Stephane to review for the > official staging tree. > > -serge > > Quoti

Re: [lxc-devel] [PATCH 5/5] Add distro config file /etc/lxc/lxc.conf

2012-10-17 Thread Dwight Engen
On Mon, 15 Oct 2012 14:49:26 -0500 Serge Hallyn wrote: > Quoting Dwight Engen (dwight.en...@oracle.com): > > On Mon, 15 Oct 2012 12:42:57 -0500 > > Serge Hallyn wrote: > > > > > Quoting Dwight Engen (dwight.en...@oracle.com): > > > > This allows a

Re: [lxc-devel] [PATCH 5/5 v2] Add distro config file /etc/lxc/lxc.conf

2012-10-17 Thread Dwight Engen
config. Signed-off-by: Dwight Engen --- Makefile.am |2 +- config/Makefile.am |9 + config/lxc.conf.libvirt |3 +++ config/lxc.conf.ubuntu |3 +++ config/lxc.conf.unknown |1 + configure.ac| 42

Re: [lxc-devel] [PATCH 5/5 v2] Add distro config file /etc/lxc/lxc.conf

2012-10-18 Thread Dwight Engen
On Thu, 18 Oct 2012 10:34:16 -0500 Serge Hallyn wrote: > Quoting Dwight Engen (dwight.en...@oracle.com): > > This allows a distro to put the distro specific default network > > configuration (for example bridge device, link type), or other lxc > > configuration in the case

[lxc-devel] [PATCH] Add %{dist} tag to differentiate RPM distributions and releases

2012-10-25 Thread Dwight Engen
Note that an additional Release field is not necessary for the devel package as it will follow the primary Release field. For more information on the dist tag, see http://fedoraproject.org/wiki/Packaging:DistTag Signed-off-by: Dwight Engen --- lxc.spec.in |3 +-- 1 files changed, 1

[lxc-devel] [PATCH] Reinstate README file in rootfs directory

2012-10-25 Thread Dwight Engen
Change 5fd8314f removed the README file explaining why the rootfs directory has to exist. Doing so broke the build on Fedora 17 since this directory will not be created by make install and thus the spec file cannot find it. Signed-off-by: Dwight Engen --- doc/rootfs/Makefile.am |2 +- 1

[lxc-devel] [PATCH] Remove unneeded ksrc spec file macro

2012-10-25 Thread Dwight Engen
Change 910bb4fa obviated the need for the --with-linuxdir configure option which means that the ksrc rpm macro no longer makes sense either. Signed-off-by: Dwight Engen --- Makefile.am |2 +- lxc.spec.in |1 - 2 files changed, 1 insertions(+), 2 deletions(-) diff --git a/Makefile.am b

[lxc-devel] [PATCH] Fix lxc-ps -- argument processing

2012-10-25 Thread Dwight Engen
>From 7531edbca5872537e9cac59d3d51a9f69d93ec2f Mon Sep 17 00:00:00 2001 From: Dwight Engen Date: Thu, 25 Oct 2012 16:21:53 -0400 Subject: [PATCH] Fix lxc-ps -- argument processing lxc-ps is supposed to pass arguments after the -- on to ps. The problem is that i is expanded once from $@ and

[lxc-devel] [PATCH] Fix lxc-netstat -- argument processing

2012-10-25 Thread Dwight Engen
for the real netstat, which the original code handles by shifting out all arguments it recognizes before the -- is hit. Signed-off-by: Dwight Engen --- src/lxc/lxc-netstat.in | 13 + 1 files changed, 1 insertions(+), 12 deletions(-) diff --git a/src/lxc/lxc-netstat.in b/src/lxc/lxc

Re: [lxc-devel] [PATCH] Reinstate README file in rootfs directory

2012-11-06 Thread Dwight Engen
On Wed, 31 Oct 2012 17:20:23 +0100 Daniel Lezcano wrote: > On 10/25/2012 07:46 PM, Dwight Engen wrote: > > Change 5fd8314f removed the README file explaining why the > > rootfs directory has to exist. Doing so broke the build on > > Fedora 17 since this directory will n

Re: [lxc-devel] [PATCH] Reinstate README file in rootfs directory

2012-11-06 Thread Dwight Engen
On Tue, 06 Nov 2012 11:26:37 -0500 Stéphane Graber wrote: > On 11/06/2012 11:21 AM, Dwight Engen wrote: > > On Wed, 31 Oct 2012 17:20:23 +0100 > > Daniel Lezcano wrote: > > > >> On 10/25/2012 07:46 PM, Dwight Engen wrote: > >>> Change 5fd8314f

[lxc-devel] [PATCH] Fix package name needed for building docs with RPM

2012-11-14 Thread Dwight Engen
Tested on Oracle Linux 6 and Fedora 17 Signed-off-by: Dwight Engen --- lxc.spec.in |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lxc.spec.in b/lxc.spec.in index 10b7254..7998cfd 100644 --- a/lxc.spec.in +++ b/lxc.spec.in @@ -30,7 +30,7 @@ Group: Applications/System

[lxc-devel] [PATCH] Fix checkconfig to handle kernel memory cgroup name change

2012-11-14 Thread Dwight Engen
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 --- src/lxc/lxc-checkconfig.in | 25 +++-- 1 files changed, 15 insertions(+), 10 deletions(-) diff --git a

[lxc-devel] Resource cleanups

2012-11-26 Thread Dwight Engen
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

[lxc-devel] [PATCH] Fix fd leak in lxc log

2012-11-26 Thread Dwight Engen
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

[lxc-devel] [PATCH] Fix use of list item memory after free

2012-11-26 Thread Dwight Engen
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|

[lxc-devel] [PATCH] Ensure argv passed by createl to create is NULL terminated

2012-11-26 Thread Dwight Engen
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

[lxc-devel] [PATCH] Free allocated configuration memory

2012-11-26 Thread Dwight Engen
: Dwight Engen --- src/lxc/conf.c |9 + src/lxc/confile.c | 93 +-- src/lxc/lxccontainer.c | 13 --- 3 files changed, 59 insertions(+), 56 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c index fe574ac..5ff64f6 100644

[lxc-devel] lxc python binding

2012-11-26 Thread Dwight Engen
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

Re: [lxc-devel] [PATCH] Fix use of list item memory after free

2012-11-26 Thread Dwight Engen
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

[lxc-devel] [PATCH] Make config api items const

2012-11-26 Thread Dwight Engen
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

[lxc-devel] [PATCH] Use autoconf LXCPATH instead of hardcoded LXCDIR

2012-11-26 Thread Dwight Engen
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

[lxc-devel] [PATCH] Oracle template: make container also boot under libvirt

2012-11-27 Thread Dwight Engen
This allows containers created with lxc-create to also boot under libvirt/Virtual Machine Monitor Signed-off-by: Dwight Engen --- templates/lxc-oracle.in | 21 + 1 files changed, 13 insertions(+), 8 deletions(-) diff --git a/templates/lxc-oracle.in b/templates/lxc

[lxc-devel] [PATCH] Fix build with --enable-tests on Fedora

2012-11-28 Thread Dwight Engen
When using --enable-tests on Fedora, the linker complains with: "undefined reference to symbol sem_getvalue", which nm shows to be in libpthread not librt. Build tested on Fedora, Oracle Linux, and Ubuntu. Signed-off-by: Dwight Engen --- src/tests/Makefile.am |2 +- 1 files

[lxc-devel] [PATCH] Fix busybox template to not have extra aa_profile hunk

2012-11-29 Thread Dwight Engen
Both 69d66f1e and f02ce27d added the aa_profile = unconfined hunk, but only the first was needed, maybe a merge error? The second one causes the template to get an error on the EOF line. This essentially reverts f02ce27d. Signed-off-by: Dwight Engen --- templates/lxc-busybox.in |4 1

Re: [lxc-devel] [PATCH] Fix build with --enable-tests on Fedora

2012-11-29 Thread Dwight Engen
On Thu, 29 Nov 2012 09:24:23 -0600 Serge Hallyn wrote: > Quoting Dwight Engen (dwight.en...@oracle.com): > > When using --enable-tests on Fedora, the linker complains with: > > "undefined reference to symbol sem_getvalue", which nm shows to be > > in libpthread no

[lxc-devel] [PATCH] Include lxc-ubuntu when doing make dist

2012-11-29 Thread Dwight Engen
Removing templates/lxc-ubuntu from configure.ac makes it so that it is not included in the tarball that make dist builds (and therefore also breaks the rpm build). Signed-off-by: Dwight Engen --- templates/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/Makefile.am b

Re: [lxc-devel] [PATCH] Include lxc-ubuntu when doing make dist

2012-11-29 Thread Dwight Engen
On Thu, 29 Nov 2012 13:31:41 -0500 Stéphane Graber wrote: > On 11/29/2012 01:27 PM, Dwight Engen wrote: > > Removing templates/lxc-ubuntu from configure.ac makes it so that it > > is not included in the tarball that make dist builds (and therefore > > also breaks the rpm bu

[lxc-devel] [PATCH] make install should create $LXCPATH directory

2012-11-29 Thread Dwight Engen
The $LXCPATH (default /var/lib/lxc) directory was not being created by make install, so unless it gets created by some other means (packaging tools), commands such as lxc-create will fail. Signed-off-by: Dwight Engen --- Makefile.am | 3 +++ lxc.spec.in | 1 + 2 files changed, 4 insertions

[lxc-devel] [PATCH] Fix compile error when building with -Wp, -D_FORTIFY_SOURCE=2

2012-11-30 Thread Dwight Engen
Fedora by default builds with this flag, and complains about not checking the return from fchdir. There isn't much we can do if we can't change back to the original directory, so just log an error message. Signed-off-by: Dwight Engen --- src/lxc/conf.c | 3 ++- 1 file changed, 2

Re: [lxc-devel] [PATCH] make install should create $LXCPATH directory

2012-11-30 Thread Dwight Engen
On Thu, 29 Nov 2012 16:37:21 -0500 Stéphane Graber wrote: > On 11/29/2012 04:24 PM, Dwight Engen wrote: > > The $LXCPATH (default /var/lib/lxc) directory was not being created > > by make install, so unless it gets created by some other means > > (packaging tools), comman

[lxc-devel] [PATCH v2] make install should create $LXCPATH, cache directories

2012-11-30 Thread Dwight Engen
The $LXCPATH (default /var/lib/lxc) directory was not being created by make install, so unless it gets created by some other means (packaging tools), commands such as lxc-create will fail. Also ensure the cache directory (default /var/cache/lxc, used by some templates) gets created. --- Makefile.a

[lxc-devel] [PATCH] Use LXCPATH and LOCALSTATEDIR instead of hardcoded /var

2012-11-30 Thread Dwight Engen
Signed-off-by: Dwight Engen --- src/lxc/Makefile.am | 3 ++- src/lxc/conf.c| 2 +- src/lxc/lxccontainer.c| 2 +- src/tests/Makefile.am | 3 ++- src/tests/containertests.c| 2 +- src/tests/saveconfig.c| 2 +- src/tests/startone.c

Re: [lxc-devel] [PATCH] Fix compile error when building with -Wp, -D_FORTIFY_SOURCE=2

2012-11-30 Thread Dwight Engen
On Fri, 30 Nov 2012 09:29:56 -0600 Serge Hallyn wrote: > Quoting Dwight Engen (dwight.en...@oracle.com): > > Fedora by default builds with this flag, and complains about not > > checking the return from fchdir. There isn't much we can do if we > > can't change bac

[lxc-devel] [PATCH] Create busybox commands as symlinks instead of hardlinks

2012-11-30 Thread Dwight Engen
so set the root password to root, to match what other templates do. Signed-off-by: Dwight Engen --- templates/lxc-busybox.in | 49 + 1 files changed, 10 insertions(+), 39 deletions(-) diff --git a/templates/lxc-busybox.in b/templates/lxc-busybo

Re: [lxc-devel] [PATCH] Create busybox commands as symlinks instead of hardlinks

2012-11-30 Thread Dwight Engen
On Fri, 30 Nov 2012 23:17:20 +0100 Natanael Copa wrote: > On Fri, 30 Nov 2012 11:49:25 -0500 > Dwight Engen wrote: > > > +# it would be nice to just use "chroot $rootfs busybox > > --install -s /bin" > > +# but that only works right in a chroot w

Re: [lxc-devel] [PATCH 2/2] templates: use hardlink detection in rsync

2012-12-03 Thread Dwight Engen
On Mon, 3 Dec 2012 10:04:13 -0600 Serge Hallyn wrote: > However one question is: is -H ubiquitous? I'm wondering why we don't just use the cp -a? It seems like cp is far more likely to be installed than rsync? rootfs_path probably doesn't already exist so it not like rsync is going to be faster

Re: [lxc-devel] [PATCH 2/2] templates: use hardlink detection in rsync

2012-12-03 Thread Dwight Engen
On Mon, 3 Dec 2012 10:47:26 -0600 Serge Hallyn wrote: > Quoting Dwight Engen (dwight.en...@oracle.com): > > On Mon, 3 Dec 2012 10:04:13 -0600 > > Serge Hallyn wrote: > > > > > However one question is: is -H ubiquitous? > > > > I'm wondering wh

Re: [lxc-devel] [PATCH 2/2] templates: use hardlink detection in rsync

2012-12-03 Thread Dwight Engen
On Mon, 03 Dec 2012 13:55:41 -0500 "Michael H. Warfield" wrote: > On Mon, 2012-12-03 at 12:18 -0600, Serge Hallyn wrote: > > Quoting Dwight Engen (dwight.en...@oracle.com): > > > On Mon, 3 Dec 2012 10:47:26 -0600 > > > Serge Hallyn wrote: > >

Re: [lxc-devel] [PATCH 2/2] templates: use hardlink detection in rsync

2012-12-04 Thread Dwight Engen
d to recode things to run under > > busybox ash shell under TinyCore). I trust rsync better than cp in > > differing environments for that very reason. I know what rsync > > will support (if it's there). I don't always know what options cp

Re: [lxc-devel] [PATCH] Use LXCPATH and LOCALSTATEDIR instead of hardcoded /var

2012-12-05 Thread Dwight Engen
On Fri, 30 Nov 2012 17:09:28 -0500 Stéphane Graber wrote: > On 11/30/2012 09:50 AM, Dwight Engen wrote: > > Signed-off-by: Dwight Engen > > It looks like you're mixing LOCALSTATEDIR "/lib/lxc" and LXCPATH > quite a bit. Shouldn't we use LXCPATH whenever p

[lxc-devel] [PATCH v2] Use LXCPATH and LOCALSTATEDIR instead of hardcoded /var

2012-12-05 Thread Dwight Engen
Signed-off-by: Dwight Engen --- src/lxc/conf.c|4 ++-- src/tests/containertests.c|2 +- src/tests/saveconfig.c|2 +- src/tests/startone.c | 16 templates/lxc-altlinux.in | 10 +- templates/lxc-fedora.in

[lxc-devel] [PATCH] make install should create /var/cache/lxc directory

2012-12-05 Thread Dwight Engen
On Thu, 29 Nov 2012 16:37:21 -0500 Stéphane Graber wrote: > On 11/29/2012 04:24 PM, Dwight Engen wrote: > > The $LXCPATH (default /var/lib/lxc) directory was not being created > > by make install, so unless it gets created by some other means > > (packaging tools), comman

[lxc-devel] oracle template: fixes when using fedora host

2012-12-05 Thread Dwight Engen
Let oracle template work when host is fedora or oracle and the lsb_release command is not present. Verify the arch given is valid. Don't add lxc.network section again if already present. Signed-off-by: Dwight Engen --- templates/lxc-oracle.in | 28 +++- 1 files ch

[lxc-devel] [PATCH] oracle template: use @LOCALSTATEDIR@ instead of hardcoded /var for lock dir

2012-12-06 Thread Dwight Engen
Signed-off-by: Dwight Engen --- templates/lxc-oracle.in |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/lxc-oracle.in b/templates/lxc-oracle.in index 243f0e4..eadee3a 100644 --- a/templates/lxc-oracle.in +++ b/templates/lxc-oracle.in @@ -337,7 +337,7

Re: [lxc-devel] [PATCH] oracle template: use @LOCALSTATEDIR@ instead of hardcoded /var for lock dir

2012-12-06 Thread Dwight Engen
On Thu, 06 Dec 2012 09:42:47 -0500 Stéphane Graber wrote: > On 12/06/2012 09:19 AM, Dwight Engen wrote: > > > > Signed-off-by: Dwight Engen > > Thanks but I already proposed that yesterday and it landed a few > minutes ago :) Sounds good. I just did a pull and didn&

[lxc-devel] [PATCH] lxc.spec: add openssl and rsync as Required since both are used in lxc-clone

2012-12-06 Thread Dwight Engen
Signed-off-by: Dwight Engen --- lxc.spec.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lxc.spec.in b/lxc.spec.in index 094c34d..51997b5 100644 --- a/lxc.spec.in +++ b/lxc.spec.in @@ -29,7 +29,7 @@ Summary: %{name} : Linux Container Group: Applications/System License

Re: [lxc-devel] LXC 0.9.alpha1

2012-12-06 Thread Dwight Engen
On Thu, 06 Dec 2012 12:30:18 -0500 "Michael H. Warfield" wrote: > Deep down below... A correction... > > On Thu, 2012-12-06 at 11:57 -0500, Michael H. Warfield wrote: > > On Wed, 2012-12-05 at 11:54 -0500, Stéphane Graber wrote: > > > Hello, > > > > > After discussing this briefly with Daniel,

Re: [lxc-devel] LXC 0.9.alpha1

2012-12-06 Thread Dwight Engen
On Thu, 6 Dec 2012 12:46:28 -0500 Dwight Engen wrote: > On Thu, 06 Dec 2012 12:30:18 -0500 > "Michael H. Warfield" wrote: > > > Deep down below... A correction... > > > > On Thu, 2012-12-06 at 11:57 -0500, Michael H. Warfield wrote: > > > On W

[lxc-devel] [PATCH] assume LXCPATH took on default localstatedir based value in configure

2012-12-06 Thread Dwight Engen
On Thu, 06 Dec 2012 13:10:09 -0500 "Michael H. Warfield" wrote: > On Thu, 2012-12-06 at 12:46 -0500, Dwight Engen wrote: > > On Thu, 06 Dec 2012 12:30:18 -0500 > > "Michael H. Warfield" wrote: > > > > > Yeah, the duplicates are just warnings

Re: [lxc-devel] API wishlist

2012-12-10 Thread Dwight Engen
On Fri, 07 Dec 2012 12:47:59 -0500 Stéphane Graber wrote: > On 12/07/2012 12:25 PM, Serge Hallyn wrote: > > Quoting Stéphane Graber (stgra...@ubuntu.com): > > ... > >> - get_version() (not container specific) > >> - get_lxc_path() (not container specific) > >>Returns the storage path for th

Re: [lxc-devel] API wishlist

2012-12-10 Thread Dwight Engen
On Mon, 10 Dec 2012 09:44:26 -0500 Stéphane Graber wrote: > On 12/10/2012 09:30 AM, Dwight Engen wrote: > > On Fri, 07 Dec 2012 12:47:59 -0500 > > Stéphane Graber wrote: > > > >> On 12/07/2012 12:25 PM, Serge Hallyn wrote: > >>> Qu

Re: [lxc-devel] LXC 0.9.alpha1

2012-12-10 Thread Dwight Engen
On Mon, 10 Dec 2012 10:35:17 -0500 Stéphane Graber wrote: > On 12/05/2012 11:54 AM, Stéphane Graber wrote: > > Hello, > > > > After discussing this briefly with Daniel, I wanted to make all of > > you aware that we are currently planning on sending a pull request > > of the staging branch on the

[lxc-devel] [PATCH] Don't attempt to symlink kmsg without rootfs->path

2012-12-11 Thread Dwight Engen
fail. See similar code in setup_tty(), setup_console(), etc. Signed-off-by: Dwight Engen --- src/lxc/conf.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c index a58f18d..bf5edfa 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -1202,6 +12

[lxc-devel] [PATCH] Fix race/corruption with multiple lxc-start, lxc-execute

2012-12-11 Thread Dwight Engen
#x27;s run should be covered. The only explicit close of this fd was in the reboot case of lxcapi_start(), which is now moved to lxc_fini(), which I think is more appropriate. Even though it is not checked any more, set maincmd_fd to -1 instead of 0 to indicate its not open since 0 could be a valid

[lxc-devel] [PATCH] oracle template: add support for creating ol4 container from ovm template

2012-12-14 Thread Dwight Engen
Also: disable the interactive part of ovmd so ol5,6 containers won't hang if started for the first time with -d. Don't let containers do rawio, or have access to /dev/rtc0, they can mess up the hosts system clock among other things. Signed-off-by: Dwight Engen --- templates/lxc-oracl

[lxc-devel] ignore lxc.rootfs when using lxc-execute

2012-12-17 Thread Dwight Engen
, and thus not change the termio of /dev/tty. Signed-off-by: Dwight Engen --- src/lxc/execute.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/lxc/execute.c b/src/lxc/execute.c index 99800d0..d84baae 100644 --- a/src/lxc/execute.c +++ b/src/lxc/execute.c @@ -27,6 +27,7 @@ #include

[lxc-devel] [PATCH] lxc-destroy container only if it is in the STOPPED state

2012-12-18 Thread Dwight Engen
Currently, lxc-destory will attempt to destroy a container if it is not in the RUNNING state, but doing so is not good when the container is FROZEN, or in other transitional states. Signed-off-by: Dwight Engen --- src/lxc/lxc-destroy.in | 8 1 file changed, 4 insertions(+), 4 deletions

[lxc-devel] [PATCH] fix lxc-wait waiting forever for FREEZING, FROZEN, THAWED states

2012-12-18 Thread Dwight Engen
his change has lxc send the new state to the lxc-monitor socket. Signed-off-by: Dwight Engen --- src/lxc/freezer.c | 6 ++ src/lxc/lxc_wait.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lxc/freezer.c b/src/lxc/freezer.c index 2a6f0f5..3e4f55d 100644 --- a/src/

  1   2   3   4   5   >