[lxc-devel] [PATCH] build: Fix support for split build and source dirs

2014-08-22 Thread Daniel Miranda
Building LXC in a separate target directory, by running configure from outside the source tree, failed with multiple errors, mostly in the Python and Lua extensions, due to assuming the source dir and build dir are the same in a few places. To fix that: - Pre-process setup.py with the appropriate

Re: [lxc-devel] [PATCH] Add support for checkpoint and restore via CRIU

2014-08-22 Thread Serge Hallyn
Hm, was trying this out tonight, but I keep getting sh: 1: /usr/lib/x86_64-linux-gnu/lxc/lxc-restore-net: not found despite the fact that I most certainly did copy lxc-restore-net into place: -rwxr-xr-x 1 root root 452 Aug 23 02:09 /usr/lib/x86_64-linux-gnu/lxc/lxc-restore-net Anyway, i did no

[lxc-devel] [lxc/lxc] 614305: statvfs: do nothing if statvfs does not exist (and...

2014-08-22 Thread GitHub
Branch: refs/heads/master Home: https://github.com/lxc/lxc Commit: 614305f3975fbc8eaec7308ce525b6e9866b434c https://github.com/lxc/lxc/commit/614305f3975fbc8eaec7308ce525b6e9866b434c Author: Serge Hallyn Date: 2014-08-22 (Fri, 22 Aug 2014) Changed paths: M configure.ac

Re: [lxc-devel] [PATCH 1/1] Update the openvswitch bridge attach code

2014-08-22 Thread Stéphane Graber
On Fri, Aug 22, 2014 at 08:29:23PM +, Serge Hallyn wrote: > 1. don't determine ovs-vsctl path at configure time, do it at runtime > > 2. lxc-user-nic: set a sane path to protect from unpriv users > > Signed-off-by: Serge Hallyn Acked-by: Stéphane Graber > --- > configure.ac | 1

[lxc-devel] [PATCH 1/1] Update the openvswitch bridge attach code

2014-08-22 Thread Serge Hallyn
1. don't determine ovs-vsctl path at configure time, do it at runtime 2. lxc-user-nic: set a sane path to protect from unpriv users Signed-off-by: Serge Hallyn --- configure.ac | 11 --- src/lxc/Makefile.am| 4 src/lxc/lxc_user_nic.c | 5 + src/lxc/network.c

Re: [lxc-devel] [PATCH] use lxcpath as unprivileged containers log directory

2014-08-22 Thread Stéphane Graber
On Fri, Aug 22, 2014 at 03:53:09PM -0400, S.Çağlar Onur wrote: > Signed-off-by: S.Çağlar Onur That's better than nothing though I suspect we'd want a lxc.logpath option in global_config so the user can override the default target for those logs without having to set lxc.logfile individually for a

[lxc-devel] [PATCH] use lxcpath as unprivileged containers log directory

2014-08-22 Thread S . Çağlar Onur
Signed-off-by: S.Çağlar Onur --- src/lxc/log.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/lxc/log.c b/src/lxc/log.c index d5b862e..b6b3931 100644 --- a/src/lxc/log.c +++ b/src/lxc/log.c @@ -329,11 +329,6 @@ extern int lxc_log_init(const char *name, const char

[lxc-devel] [lxc/lxc] cf03f9: show additional info if btrfs subvolume deletion f...

2014-08-22 Thread GitHub
Branch: refs/heads/master Home: https://github.com/lxc/lxc Commit: cf03f973a8649ac6c74680f788f275f547af51a1 https://github.com/lxc/lxc/commit/cf03f973a8649ac6c74680f788f275f547af51a1 Author: S.Çağlar Onur Date: 2014-08-22 (Fri, 22 Aug 2014) Changed paths: M src/lxc/bdev.

Re: [lxc-devel] [PATCH 1/1] lxc_mount_auto_mounts: honor existing nodev etc at remounts

2014-08-22 Thread Stéphane Graber
On Wed, Aug 20, 2014 at 11:18:40PM +, Serge Hallyn wrote: > Same problem as we had with mount_entry(). lxc_mount_auto_mounts() > sometimes does bind mount followed by remount to change options. > With recent kernels it must pass any preexisting NODEV/NOSUID/etc > flags. > > Signed-off-by: Ser

Re: [lxc-devel] [PATCH 1/1] mount_entry: use statvfs

2014-08-22 Thread Stéphane Graber
On Wed, Aug 20, 2014 at 10:51:43PM +, Serge Hallyn wrote: > Use statvfs instead of parsing /proc/self/mountinfo to check for the > flags we need to and into the msbind mount flags. This will be faster > and the code is cleaner. > > Signed-off-by: Serge Hallyn Acked-by: Stéphane Graber > -

Re: [lxc-devel] [PATCH] build: Fix support for split build and source dirs

2014-08-22 Thread Stéphane Graber
On Thu, Aug 21, 2014 at 07:56:39AM -0300, Daniel Miranda wrote: > Building LXC in a separate target directory, by running configure from > outside the source tree, failed with multiple errors, mostly in the > Python and Lua extensions, due to assuming the source dir and build dir > are the same in

Re: [lxc-devel] [PATCH] lxc-test-usernic: avoid extra downloads

2014-08-22 Thread Stéphane Graber
On Thu, Aug 21, 2014 at 04:01:38PM +, Serge Hallyn wrote: > If the host has the ubuntu trusty download image in /var/cache/lxc, > copy that into lxc-user-nic's account so we can avoid the extra > download. > > Signed-off-by: Serge Hallyn This should be made in a way that's generic and not sp

Re: [lxc-devel] [PATCH] chmod container dir to 0770 (v2)

2014-08-22 Thread Stéphane Graber
On Thu, Aug 21, 2014 at 04:02:18PM +, Serge Hallyn wrote: > This prevents u2 from going into /home/u1/.local/share/lxc/u1/rootfs > and running setuid-root applications to get write access to u1's > container rootfs. > > v2: set umask to 002 for the mkdir. Otherwise if umask happens to be, > s

Re: [lxc-devel] [PATCH] load_config_locked: update unexp network

2014-08-22 Thread Stéphane Graber
On Fri, Aug 22, 2014 at 04:45:18AM +, Serge Hallyn wrote: > When we read a lxc.network.hwaddr line, if it contained any 'x's then > those get quitely filled in at config_network_hwaddr. If that happens > then we want to save the autogenerated hwaddr in the unexpanded config > so that when we w

Re: [lxc-devel] [PATCH] ignore SIGKILL (CTRL-C) and SIGQUIT (CTRL-\) - issue #313

2014-08-22 Thread Serge Hallyn
Quoting S.Çağlar Onur (cag...@10ur.org): > Signed-off-by: S.Çağlar Onur > --- Acked-by: Serge E. Hallyn > src/lxc/attach.c | 7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/src/lxc/attach.c b/src/lxc/attach.c > index 1a753c7..923c497 100644 > --- a/src/lxc/attach.

Re: [lxc-devel] [PATCH] show additional info if btrfs subvolume deletion fails (issue #315)

2014-08-22 Thread Serge Hallyn
Quoting S.Çağlar Onur (cag...@10ur.org): > Unprivileged users require "-o user_subvol_rm_allowed" mount option for btrfs. > Make the INFO level message to ERROR to make it clear, which now says > following; > > [caglar@qop:~] lxc-destroy -n rubik > lxc_container: Is the rootfs mounted with -o use

[lxc-devel] [PATCH] ignore SIGKILL (CTRL-C) and SIGQUIT (CTRL-\) - issue #313

2014-08-22 Thread S . Çağlar Onur
Signed-off-by: S.Çağlar Onur --- src/lxc/attach.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lxc/attach.c b/src/lxc/attach.c index 1a753c7..923c497 100644 --- a/src/lxc/attach.c +++ b/src/lxc/attach.c @@ -26,6 +26,7 @@ #include #include #include +#include

[lxc-devel] [PATCH 1/1] don't determine ovs-vsctl path at configure time

2014-08-22 Thread Serge Hallyn
Signed-off-by: Serge Hallyn --- configure.ac| 11 --- src/lxc/Makefile.am | 4 src/lxc/network.c | 23 +-- 3 files changed, 9 insertions(+), 29 deletions(-) diff --git a/configure.ac b/configure.ac index 462217e..4b1f554 100644 --- a/configure.ac +++ b

[lxc-devel] [PATCH] show additional info if btrfs subvolume deletion fails (issue #315)

2014-08-22 Thread S . Çağlar Onur
Unprivileged users require "-o user_subvol_rm_allowed" mount option for btrfs. Make the INFO level message to ERROR to make it clear, which now says following; [caglar@qop:~] lxc-destroy -n rubik lxc_container: Is the rootfs mounted with -o user_subvol_rm_allowed? lxc_container: Error destroying r

Re: [lxc-devel] [PATCH] Add support for checkpoint and restore via CRIU

2014-08-22 Thread Tycho Andersen
On Fri, Aug 22, 2014 at 08:03:32AM -0500, Tycho Andersen wrote: > On Fri, Aug 22, 2014 at 07:45:06AM -0500, Tycho Andersen wrote: > > > > Maybe just a test and then return false? > > Here's a version that does this. Whoops, I forgot to change lxc_checkpoint.c to reflect the bool return type chang

Re: [lxc-devel] [PATCH] Add support for checkpoint and restore via CRIU

2014-08-22 Thread Serge Hallyn
Quoting Tycho Andersen (tycho.ander...@canonical.com): > On Fri, Aug 22, 2014 at 07:45:06AM -0500, Tycho Andersen wrote: > > > > Maybe just a test and then return false? > > Here's a version that does this. > > Tycho > > > This patch adds support for checkpointing and restoring containers via C

Re: [lxc-devel] [PATCH] Add support for checkpoint and restore via CRIU

2014-08-22 Thread Tycho Andersen
On Fri, Aug 22, 2014 at 07:45:06AM -0500, Tycho Andersen wrote: > > Maybe just a test and then return false? Here's a version that does this. Tycho This patch adds support for checkpointing and restoring containers via CRIU. It adds two api calls, ->checkpoint and ->restore, which are wrappers

Re: [lxc-devel] [PATCH] Add support for checkpoint and restore via CRIU

2014-08-22 Thread Tycho Andersen
On Fri, Aug 22, 2014 at 04:36:37AM +, Serge Hallyn wrote: > Quoting Tycho Andersen (tycho.ander...@canonical.com): > > Thanks, Tycho. Just one remaining request below. Other than that, > > Acked-by: Serge E. Hallyn > > > +static bool lxcapi_checkpoint(struct lxc_container *c, char *direct