]> git.ipfire.org Git - thirdparty/lxc.git/log
thirdparty/lxc.git
7 years agostorage: handle overlay for stable 2.0 1747/head
Christian Brauner [Tue, 15 Aug 2017 19:05:42 +0000 (21:05 +0200)] 
storage: handle overlay for stable 2.0

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoRevert "storage: prefix all dir paths"
Christian Brauner [Tue, 15 Aug 2017 16:40:59 +0000 (18:40 +0200)] 
Revert "storage: prefix all dir paths"

This reverts commit 276fb978ee319c690e6c9ce9df16fb7a21953d2d.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoRevert "storage: add lxc_storage_get_path()"
Christian Brauner [Tue, 15 Aug 2017 16:34:54 +0000 (18:34 +0200)] 
Revert "storage: add lxc_storage_get_path()"

This reverts commit ef72d7d681c49c008bf9da2522c7ef436cf78f46.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoRevert "storage: prefix all btrfs paths"
Christian Brauner [Tue, 15 Aug 2017 16:33:21 +0000 (18:33 +0200)] 
Revert "storage: prefix all btrfs paths"

This reverts commit f405c0c5cadbadf5b0beb42a346ca52f593777d3.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoRevert "storage: prefix all lvm paths"
Christian Brauner [Tue, 15 Aug 2017 16:33:04 +0000 (18:33 +0200)] 
Revert "storage: prefix all lvm paths"

This reverts commit 6be74c07d0328f0d7b053524626bc83ae2b2276f.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoRevert "lvm: check whether lxc.bdev.lvm.vg is set"
Christian Brauner [Tue, 15 Aug 2017 16:32:06 +0000 (18:32 +0200)] 
Revert "lvm: check whether lxc.bdev.lvm.vg is set"

This reverts commit 0790b49260cbb48833367f3357b067fb851419cc.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoRevert "lvm: fix check"
Christian Brauner [Tue, 15 Aug 2017 16:30:13 +0000 (18:30 +0200)] 
Revert "lvm: fix check"

This reverts commit 63539ebf3425fa62bbcfda60e7ea1bc7dedef9ef.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoRevert "storage: prefix all nbd paths"
Christian Brauner [Tue, 15 Aug 2017 16:28:50 +0000 (18:28 +0200)] 
Revert "storage: prefix all nbd paths"

This reverts commit bdca6500054d3df9f704bcc5fe5d66f3837cce1b.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoRevert "storage: prefix all rbd paths"
Christian Brauner [Tue, 15 Aug 2017 16:28:35 +0000 (18:28 +0200)] 
Revert "storage: prefix all rbd paths"

This reverts commit 2e0e18cca610359ae132452bc3b190f3d0335688.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoRevert "storage: prefix all zfs paths"
Christian Brauner [Tue, 15 Aug 2017 16:28:22 +0000 (18:28 +0200)] 
Revert "storage: prefix all zfs paths"

This reverts commit aa7802e1095d19388b7b406c03e91a73d53a0b42.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoRevert "storage: handle prefixed rootfs paths"
Christian Brauner [Tue, 15 Aug 2017 16:27:53 +0000 (18:27 +0200)] 
Revert "storage: handle prefixed rootfs paths"

This reverts commit 84ae4b69653268029206317aabd5aaefa1f6a590.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoRevert "btrfs: simplify + bugfix"
Christian Brauner [Tue, 15 Aug 2017 16:14:59 +0000 (18:14 +0200)] 
Revert "btrfs: simplify + bugfix"

This reverts commit 874a329ca6fd92057a3d243bfa6200906051393a.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoRevert "lvm: non-functional changes"
Christian Brauner [Tue, 15 Aug 2017 16:14:46 +0000 (18:14 +0200)] 
Revert "lvm: non-functional changes"

This reverts commit 7a8d7de2476b61005d80503ab8c816809bbc2d89.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoRevert "overlay: simplify and adapt to "overlay""
Christian Brauner [Tue, 15 Aug 2017 16:14:33 +0000 (18:14 +0200)] 
Revert "overlay: simplify and adapt to "overlay""

This reverts commit 7f79cc4c3457459dc20c4e40398395c5150618a9.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoRevert "tools: remove empty snap directory"
Christian Brauner [Tue, 15 Aug 2017 16:14:19 +0000 (18:14 +0200)] 
Revert "tools: remove empty snap directory"

This reverts commit d51915386e22a19da131a578330ab1115905c326.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoRevert "btrfs: non-functional changes"
Christian Brauner [Tue, 15 Aug 2017 16:14:01 +0000 (18:14 +0200)] 
Revert "btrfs: non-functional changes"

This reverts commit fb49a3cbebd4cf6433517f8550528ecf2a8aceb9.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoRevert "btrfs: export btrfs_snapshot_wrapper()"
Christian Brauner [Tue, 15 Aug 2017 16:13:48 +0000 (18:13 +0200)] 
Revert "btrfs: export btrfs_snapshot_wrapper()"

This reverts commit 707f3fff59abe5db1033b4676e0063b35cfedd7b.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoRevert "btrfs: enable unprivileged snapshots"
Christian Brauner [Tue, 15 Aug 2017 16:13:34 +0000 (18:13 +0200)] 
Revert "btrfs: enable unprivileged snapshots"

This reverts commit 2d66f57109b542b7a7a4882db74658374d2b5745.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoRevert "btrfs: non-functional changes"
Christian Brauner [Tue, 15 Aug 2017 16:13:11 +0000 (18:13 +0200)] 
Revert "btrfs: non-functional changes"

This reverts commit 8e295bc1a95441ddcf5290153322b8ca78971d8f.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoRevert "btrfs: only chown_mapped_root() if not btrfs"
Christian Brauner [Tue, 15 Aug 2017 16:12:58 +0000 (18:12 +0200)] 
Revert "btrfs: only chown_mapped_root() if not btrfs"

This reverts commit d848b631492434985ffc5de9bbd7c631101077cb.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoRevert "btrfs: simplify"
Christian Brauner [Tue, 15 Aug 2017 16:12:45 +0000 (18:12 +0200)] 
Revert "btrfs: simplify"

This reverts commit 1aa0201f1446f1387c649467d86e923c9e9ecccf.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoRevert "btrfs: simplify"
Christian Brauner [Tue, 15 Aug 2017 16:12:31 +0000 (18:12 +0200)] 
Revert "btrfs: simplify"

This reverts commit 36c55bf31c67d5048b6dd7f85ac425f3b2e22fd3.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoRevert "storage: add create_{clone,snapshot}()"
Christian Brauner [Tue, 15 Aug 2017 16:12:18 +0000 (18:12 +0200)] 
Revert "storage: add create_{clone,snapshot}()"

This reverts commit 667fa8cef1afc88bbe20c04523521556cb2946ac.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoRevert "btrfs: switch to btrfs_create_{clone,snapshot}()"
Christian Brauner [Tue, 15 Aug 2017 16:12:05 +0000 (18:12 +0200)] 
Revert "btrfs: switch to btrfs_create_{clone,snapshot}()"

This reverts commit 618b655b4ed187b4853841813f9831b85987339a.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoRevert "storage: add arg to create_snapshot()"
Christian Brauner [Tue, 15 Aug 2017 16:11:52 +0000 (18:11 +0200)] 
Revert "storage: add arg to create_snapshot()"

This reverts commit a3e85dae4e02ad9d3b8fcf6bf301907ef55a7c01.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoRevert "storage: rework lvm backend"
Christian Brauner [Tue, 15 Aug 2017 16:11:26 +0000 (18:11 +0200)] 
Revert "storage: rework lvm backend"

This reverts commit 9a534c222664cb3b2705fcf523d67de8522011d1.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoRevert "dir: non-functional changes"
Christian Brauner [Tue, 15 Aug 2017 16:11:11 +0000 (18:11 +0200)] 
Revert "dir: non-functional changes"

This reverts commit 8f2896da31e7822eb7894a5ade9e11652fe75f7f.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoRevert "dir: improvements"
Christian Brauner [Tue, 15 Aug 2017 16:10:53 +0000 (18:10 +0200)] 
Revert "dir: improvements"

This reverts commit 23eb8575d414d8b448398e9ed45d83741296a1ca.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoRevert "bdev: non-functional changes"
Christian Brauner [Tue, 15 Aug 2017 16:10:36 +0000 (18:10 +0200)] 
Revert "bdev: non-functional changes"

This reverts commit 8608cb0bd3b4ecd8bdf57a397b43ee9f344b8870.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoRevert "rsync: add new rsync functions"
Christian Brauner [Tue, 15 Aug 2017 16:10:19 +0000 (18:10 +0200)] 
Revert "rsync: add new rsync functions"

This reverts commit 2ea2f3c8a6509cddbeebab92a0d3c56d4bf48be9.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoRevert "storage: switch to new rsync functions"
Christian Brauner [Tue, 15 Aug 2017 16:07:56 +0000 (18:07 +0200)] 
Revert "storage: switch to new rsync functions"

This reverts commit a493a694166e65edbf412433a605042cc0ac3d0e.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoRevert "btrfs: switch to new rsync helpers"
Christian Brauner [Tue, 15 Aug 2017 16:06:42 +0000 (18:06 +0200)] 
Revert "btrfs: switch to new rsync helpers"

This reverts commit d8bb582ae3ffd1864f20bd0a9548b2a06ded66c0.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoRevert "loop: rework loop storage driver"
Christian Brauner [Tue, 15 Aug 2017 16:06:23 +0000 (18:06 +0200)] 
Revert "loop: rework loop storage driver"

This reverts commit 85914b6775afbf5598ea0cf8e342237f1da7c6d4.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoRevert "rbd: rbd non-functional changes"
Christian Brauner [Tue, 15 Aug 2017 16:06:07 +0000 (18:06 +0200)] 
Revert "rbd: rbd non-functional changes"

This reverts commit 162a857a5811ff343146401cf6dde482158ae665.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoRevert "rbd: rework rbd storage driver"
Christian Brauner [Tue, 15 Aug 2017 16:05:42 +0000 (18:05 +0200)] 
Revert "rbd: rework rbd storage driver"

This reverts commit 93b8f59a889d72b863c9fd225ebe3694feb6a0d1.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agorbd: rework rbd storage driver
Christian Brauner [Mon, 24 Jul 2017 22:13:57 +0000 (00:13 +0200)] 
rbd: rework rbd storage driver

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agorbd: rbd non-functional changes
Christian Brauner [Mon, 24 Jul 2017 21:53:02 +0000 (23:53 +0200)] 
rbd: rbd non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoloop: rework loop storage driver
Christian Brauner [Mon, 24 Jul 2017 20:58:19 +0000 (22:58 +0200)] 
loop: rework loop storage driver

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agobtrfs: switch to new rsync helpers
Christian Brauner [Tue, 25 Jul 2017 18:55:10 +0000 (20:55 +0200)] 
btrfs: switch to new rsync helpers

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agostorage: switch to new rsync functions
Christian Brauner [Mon, 24 Jul 2017 15:49:03 +0000 (17:49 +0200)] 
storage: switch to new rsync functions

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agorsync: add new rsync functions
Christian Brauner [Mon, 24 Jul 2017 15:47:22 +0000 (17:47 +0200)] 
rsync: add new rsync functions

We will fade out the old helpers soon.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agobdev: non-functional changes
Christian Brauner [Mon, 24 Jul 2017 15:03:32 +0000 (17:03 +0200)] 
bdev: non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agodir: improvements
Christian Brauner [Mon, 24 Jul 2017 14:32:10 +0000 (16:32 +0200)] 
dir: improvements

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agodir: non-functional changes
Christian Brauner [Mon, 24 Jul 2017 14:29:18 +0000 (16:29 +0200)] 
dir: non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agostorage: rework lvm backend
Christian Brauner [Wed, 19 Jul 2017 00:24:17 +0000 (02:24 +0200)] 
storage: rework lvm backend

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agostorage: add arg to create_snapshot()
Christian Brauner [Wed, 19 Jul 2017 00:23:55 +0000 (02:23 +0200)] 
storage: add arg to create_snapshot()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agobtrfs: switch to btrfs_create_{clone,snapshot}()
Christian Brauner [Sun, 16 Jul 2017 22:02:14 +0000 (00:02 +0200)] 
btrfs: switch to btrfs_create_{clone,snapshot}()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agostorage: add create_{clone,snapshot}()
Christian Brauner [Sun, 16 Jul 2017 22:01:46 +0000 (00:01 +0200)] 
storage: add create_{clone,snapshot}()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agobtrfs: simplify
Christian Brauner [Sun, 16 Jul 2017 20:58:47 +0000 (22:58 +0200)] 
btrfs: simplify

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agobtrfs: simplify
Christian Brauner [Sun, 16 Jul 2017 20:49:45 +0000 (22:49 +0200)] 
btrfs: simplify

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agobtrfs: only chown_mapped_root() if not btrfs
Christian Brauner [Sun, 16 Jul 2017 20:36:01 +0000 (22:36 +0200)] 
btrfs: only chown_mapped_root() if not btrfs

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agobtrfs: non-functional changes
Christian Brauner [Sun, 16 Jul 2017 20:35:50 +0000 (22:35 +0200)] 
btrfs: non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agobtrfs: enable unprivileged snapshots
Christian Brauner [Sun, 16 Jul 2017 15:57:06 +0000 (17:57 +0200)] 
btrfs: enable unprivileged snapshots

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agobtrfs: export btrfs_snapshot_wrapper()
Christian Brauner [Sun, 16 Jul 2017 15:56:29 +0000 (17:56 +0200)] 
btrfs: export btrfs_snapshot_wrapper()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agobtrfs: non-functional changes
Christian Brauner [Sun, 16 Jul 2017 15:54:39 +0000 (17:54 +0200)] 
btrfs: non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agotools: remove empty snap directory
Christian Brauner [Sat, 15 Jul 2017 20:50:15 +0000 (22:50 +0200)] 
tools: remove empty snap directory

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agooverlay: simplify and adapt to "overlay"
Christian Brauner [Sat, 15 Jul 2017 19:49:44 +0000 (21:49 +0200)] 
overlay: simplify and adapt to "overlay"

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agolvm: non-functional changes
Christian Brauner [Sat, 15 Jul 2017 19:02:15 +0000 (21:02 +0200)] 
lvm: non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agobtrfs: simplify + bugfix
Christian Brauner [Sat, 15 Jul 2017 13:34:39 +0000 (15:34 +0200)] 
btrfs: simplify + bugfix

Closes #1698.
Closes #1703.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agolxccontainer: use snprintf()
Christian Brauner [Sat, 15 Jul 2017 13:34:21 +0000 (15:34 +0200)] 
lxccontainer: use snprintf()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agostorage: default to orig type on identical paths
Christian Brauner [Sat, 15 Jul 2017 13:32:52 +0000 (15:32 +0200)] 
storage: default to orig type on identical paths

otherwise default to "dir"

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoUse "rsync -SHaAX" to copy the cached rootfs into place
Harald Dunkel [Fri, 28 Jul 2017 18:08:02 +0000 (13:08 -0500)] 
Use "rsync -SHaAX" to copy the cached rootfs into place

(updated by Serge to also handle hte new lxc-fedora{-legacy{.in
templates)

Signed-off-by: Harald Dunkel <harri@afaics.de>
Signed-off-by: Serge Hallyn <serge@hallyn.com>
Acked-by: Serge Hallyn <serge@hallyn.com>
7 years agolvm: fix check
Christian Brauner [Fri, 28 Jul 2017 13:33:50 +0000 (15:33 +0200)] 
lvm: fix check

Signed-off-by: Thomas Hipp <thipp@suse.de>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgroups: use tight scoping
Christian Brauner [Fri, 28 Jul 2017 04:17:28 +0000 (06:17 +0200)] 
cgroups: use tight scoping

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agolvm: check whether lxc.bdev.lvm.vg is set
Christian Brauner [Fri, 28 Jul 2017 04:17:01 +0000 (06:17 +0200)] 
lvm: check whether lxc.bdev.lvm.vg is set

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgroups: handle hybrid cgroup layouts
Christian Brauner [Wed, 26 Jul 2017 13:15:27 +0000 (15:15 +0200)] 
cgroups: handle hybrid cgroup layouts

Closes #1669.
Closes #1678.
Relates to https://github.com/systemd/systemd/issues/6408.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoutils: move helpers from cgfsng.c to utils.{c,h}
Christian Brauner [Wed, 26 Jul 2017 12:57:35 +0000 (14:57 +0200)] 
utils: move helpers from cgfsng.c to utils.{c,h}

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agostart: lxc_setup() after unshare(CLONE_NEWCGROUP)
Christian Brauner [Thu, 1 Jun 2017 03:23:12 +0000 (05:23 +0200)] 
start: lxc_setup() after unshare(CLONE_NEWCGROUP)

When the running kernel supports cgroup namespaces and users want to manually
set up cgroups via lxc.hook.mount before the init binary starts the cgroup
namespace needs to be already unshared. Otherwise the view on the cgroup mounts
is wrong. This commit places the call to lxc_setup() after the
LXC_SYNC_POST_CGROUP barrier.

Before this commit, the tty fds we allocate from a fresh devpts instance in the
container's namespaces before the init binary starts were referring to the
host's cgroup namespace since lxc_setup() was called before
unshare(CLONE_NEWCGROUP). Although not a security risk at this point since
setns() restricts its calls to /proc/<self>/ns files it's still better to do it
*after* the cgroup namespace has been unshared.

Adding a Suggested-by line for the lxc.mount.hook fix for Quentin.

Closes #1597.

Suggested-by: Quentin Dufour <quentin@dufour.tk>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years ago Using 'add-required_remount_flags' function to add required flags
Li Feng [Mon, 24 Jul 2017 08:26:52 +0000 (16:26 +0800)] 
 Using 'add-required_remount_flags' function to add required flags

Signed-off-by: Li Feng <lifeng68@huawei.com>
7 years agoAdd test script to test the ro option of lxc.rootfs.options
Li Feng [Tue, 18 Jul 2017 10:31:35 +0000 (18:31 +0800)] 
Add test script to test the ro option of lxc.rootfs.options

Signed-off-by: Li Feng <lifeng68@huawei.com>
7 years agoFix issue #1702, do remount with the MS_REMOUNT flag when mounts with MS_RDONLY
Li Feng [Mon, 17 Jul 2017 09:09:16 +0000 (17:09 +0800)] 
Fix issue #1702, do remount with the MS_REMOUNT flag when mounts with MS_RDONLY

Signed-off-by: Li Feng <lifeng68@huawei.com>
7 years agoFix syntax error in lxc-download
Stéphane Graber [Tue, 11 Jul 2017 06:58:56 +0000 (02:58 -0400)] 
Fix syntax error in lxc-download

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
7 years agoSanitize lxc-download script with shellcheck
William Gathoye [Wed, 3 May 2017 09:59:18 +0000 (11:59 +0200)] 
Sanitize lxc-download script with shellcheck

Fix potential CVE when using spaces in LXC names

Signed-off-by: William Gathoye <william@gathoye.be>
7 years agotests: remove the temp container directory
Long Wang [Wed, 5 Jul 2017 07:17:58 +0000 (15:17 +0800)] 
tests: remove the temp container directory

c->destory() will not remove the temp container directory.
This patch fix that.

Signed-off-by: Long Wang <w@laoqinren.net>
7 years agofix some cppcheck warnings
0x0916 [Sun, 2 Jul 2017 11:12:05 +0000 (19:12 +0800)] 
fix some cppcheck warnings

use cppcheck tools `cppcheck --enable=warning  .` on lxc source directory.

This patch fix the following warnning

```
[src/lxc/cgroups/cgfs.c:794]: (warning) %ld in format string (no. 3) requires 'long' but the argument type is 'unsigned long'.
[src/lxc/confile.c:4441]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
[src/lxc/confile.c:4502]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
[src/lxc/confile_legacy.c:921]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
[src/lxc/confile_legacy.c:938]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
[src/lxc/lxclock.c:63]: (warning) %zd in format string (no. 1) requires 'ssize_t' but the argument type is 'size_t {aka unsigned long}'.
[src/lxc/tools/lxc_info.c:118]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'.
[src/lxc/tools/lxc_info.c:118]: (warning) %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed int'.
[src/lxc/tools/lxc_info.c:123]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'.
[src/lxc/tools/lxc_info.c:127]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'.
[src/lxc/tools/lxc_info.c:130]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'.
[src/lxc/tools/lxc_top.c:212]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'.
[src/lxc/tools/lxc_top.c:212]: (warning) %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed int'.
[src/lxc/tools/lxc_top.c:217]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'.
[src/lxc/tools/lxc_top.c:221]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'.
[src/lxc/tools/lxc_top.c:224]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'.
```

Signed-off-by: Long Wang <w@laoqinren.net>
7 years agostorage: handle prefixed rootfs paths
Christian Brauner [Sat, 1 Jul 2017 23:44:25 +0000 (01:44 +0200)] 
storage: handle prefixed rootfs paths

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agostorage: prefix all zfs paths
Christian Brauner [Sat, 1 Jul 2017 21:41:49 +0000 (23:41 +0200)] 
storage: prefix all zfs paths

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agostorage: prefix all rbd paths
Christian Brauner [Sat, 1 Jul 2017 21:35:58 +0000 (23:35 +0200)] 
storage: prefix all rbd paths

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agostorage: prefix all nbd paths
Christian Brauner [Sat, 1 Jul 2017 21:33:18 +0000 (23:33 +0200)] 
storage: prefix all nbd paths

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agostorage: prefix all lvm paths
Christian Brauner [Sat, 1 Jul 2017 21:31:18 +0000 (23:31 +0200)] 
storage: prefix all lvm paths

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agostorage: prefix all btrfs paths
Christian Brauner [Sat, 1 Jul 2017 21:02:45 +0000 (23:02 +0200)] 
storage: prefix all btrfs paths

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agostorage: prefix all dir paths
Christian Brauner [Sat, 1 Jul 2017 20:36:27 +0000 (22:36 +0200)] 
storage: prefix all dir paths

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agostorage: add lxc_storage_get_path()
Christian Brauner [Sat, 1 Jul 2017 20:36:05 +0000 (22:36 +0200)] 
storage: add lxc_storage_get_path()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agostorage: add storage_utils.{c.h}
Christian Brauner [Sat, 1 Jul 2017 16:15:59 +0000 (18:15 +0200)] 
storage: add storage_utils.{c.h}

non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agotestcase: define a network before checks
0x0916 [Wed, 28 Jun 2017 23:32:54 +0000 (07:32 +0800)] 
testcase: define a network before checks

Signed-off-by: 0x0916 <w@laoqinren.net>
7 years agoconfile: free netdev->downscript
0x0916 [Tue, 27 Jun 2017 14:12:38 +0000 (22:12 +0800)] 
confile: free netdev->downscript

Signed-off-by: 0x0916 <w@laoqinren.net>
7 years agocgroups: workaround gcc-7 bug
Christian Brauner [Thu, 27 Jul 2017 18:49:58 +0000 (20:49 +0200)] 
cgroups: workaround gcc-7 bug

Also: LOL

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agodoc: Untabify Japanese lxc.container.conf(5)
KATOH Yasufumi [Tue, 20 Jun 2017 08:36:30 +0000 (17:36 +0900)] 
doc: Untabify Japanese lxc.container.conf(5)

Tab and white space is mixed in Japanese lxc.container.conf(5), so
unify into the white space.

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
8 years agoMerge pull request #1707 from brauner/2017-07-17/additional_stable_cherry_picks
Stéphane Graber [Mon, 17 Jul 2017 14:15:22 +0000 (16:15 +0200)] 
Merge pull request #1707 from brauner/2017-07-17/additional_stable_cherry_picks

stable-2.0: bugfixes

8 years agoconfile: clear vlan id 1707/head
Christian Brauner [Mon, 17 Jul 2017 11:34:20 +0000 (13:34 +0200)] 
confile: clear vlan id

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agoconfile: clear macvlan mode
Christian Brauner [Mon, 17 Jul 2017 11:33:03 +0000 (13:33 +0200)] 
confile: clear macvlan mode

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agoconfile: clear network flags
Christian Brauner [Mon, 17 Jul 2017 11:30:41 +0000 (13:30 +0200)] 
confile: clear network flags

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agoconfile: clear ipv{4,6} gateway
Christian Brauner [Mon, 17 Jul 2017 11:21:15 +0000 (13:21 +0200)] 
confile: clear ipv{4,6} gateway

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agocgfsng: only output debug info when we set cgroup data
Long Wang [Mon, 10 Jul 2017 03:38:33 +0000 (11:38 +0800)] 
cgfsng: only output debug info when we set cgroup data

Only output debug info `cgroup 'xxxx' set to 'yyyy'` when we set
cgroup data.

Signed-off-by: Long Wang <w@laoqinren.net>
8 years agoutils: set_stdfds()
Christian Brauner [Mon, 10 Jul 2017 09:46:54 +0000 (11:46 +0200)] 
utils: set_stdfds()

non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agostart: dup std{in,out,err} to pty slave
Li Feng [Mon, 10 Jul 2017 09:19:52 +0000 (17:19 +0800)] 
start: dup std{in,out,err} to pty slave

In the case the container has a console with a valid slave pty file descriptor
we duplicate std{in,out,err} to the slave file descriptor so console logging
works correctly. When the container does not have a valid slave pty file
descriptor for its console and is started daemonized we should dup to
/dev/null.

Closes #1646.

Signed-off-by: Li Feng <lifeng68@huawei.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agoutils: use access instead of stat
Long Wang [Sun, 9 Jul 2017 00:34:27 +0000 (08:34 +0800)] 
utils: use access instead of stat

we shoud test whether the file exists and grants
execute permissions.

Signed-off-by: Long Wang <w@laoqinren.net>
8 years agocommonds: fix typo
Long Wang [Sun, 9 Jul 2017 00:10:34 +0000 (08:10 +0800)] 
commonds: fix typo

Signed-off-by: Long Wang <w@laoqinren.net>
8 years agocommands: delete meaningless comments
Long Wang [Sun, 9 Jul 2017 00:08:54 +0000 (08:08 +0800)] 
commands: delete meaningless comments

Signed-off-by: Long Wang <w@laoqinren.net>
8 years agocommands: handle EINTR
Christian Brauner [Tue, 4 Jul 2017 17:16:08 +0000 (19:16 +0200)] 
commands: handle EINTR

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>