Commit Graph

5283 Commits

Author SHA1 Message Date
Stéphane Graber
823765e50b change version to 2.0.0 in configure.ac
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2016-04-06 13:41:56 -04:00
Stéphane Graber
39c9dc029c Merge pull request #950 from brauner/2016-04-06/fix_memory_leak
lxc_mount_auto_mounts(): free memory on failure
2016-04-06 09:38:35 -04:00
Stéphane Graber
e3df7a88eb Merge pull request #948 from brauner/bugfix_branch
lxc-create: bugfixes and small improvements
2016-04-06 09:38:12 -04:00
Christian Brauner
b2f44b4d9a lxc_mount_auto_mounts(): free memory on failure
Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
2016-04-06 13:08:06 +02:00
Christian Brauner
66c26578bc Merge pull request #949 from Blub/netlink_open_error
netlink_open: close socket on error
2016-04-06 11:26:46 +02:00
Wolfgang Bumiller
b73e5969ae netlink_open: close socket on error
All uses of netlink_open() assume that on error the
nl_handler doesn't need to be closed, but some error cases
happen after the socket was opened successfully and used to
simply return -errno.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2016-04-06 11:06:28 +02:00
Christian Brauner
a7c36c83ee lxc-create: bugfixes and small improvements
- call lxc_container_put() before we exit()
- reorder includes
- use EXIT_FAILURE and EXIT_SUCCESS macros

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
2016-04-06 10:25:34 +02:00
Stéphane Graber
5c218031b6 Merge pull request #947 from brauner/bugfix_branch
add more error handling + cleanup copy_storage()
2016-04-05 18:39:44 -04:00
Christian Brauner
763429b6bf add more error handling + cleanup copy_storage()
Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
2016-04-05 23:53:49 +02:00
Serge Hallyn
bd08898fe5 Merge pull request #945 from brauner/bugfix_branch
set lxc.rootfs.backend on container creation
2016-04-05 14:09:51 -05:00
Christian Brauner
8869eb5f83 set lxc.rootfs.backend on copy/snapshot as well
Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
2016-04-05 20:43:02 +02:00
Christian Brauner
39460be89e set lxc.rootfs.backend on container creation
Since specifying lxc.rootfs.backend can lead to performance improvements we
always set it during container creation.

This also fixes a bug. do_bdev_create() tried to be smart and retrieve the lower
directory when bdev->type == overlayfs or aufs thereby cutting the path.
However, this operation is done in ovl_mount() and aufs_mount() and both
functions need the full src path for this. The bug didn't show before because
when creating a overlayfs container with e.g.:

	lxc-create -n c -t busybox -B overlayfs

still left bdev->type set to dir and so the code for retrieving the lower dir in
do_bdev_create() was skipped. But by setting lxc.rootfs.backend on container
creation we force bdev->type to be set to e.g. overlayfs and the code gets
executed thereby exposing the bug.

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
2016-04-05 19:23:12 +02:00
Serge Hallyn
a3ff5b5639 Merge pull request #944 from brauner/bugfix_branch
use correct "overlayfs" instead of "ovl"
2016-04-05 09:24:36 -05:00
Christian Brauner
a5b84c6d1a use correct "overlayfs" instead of "ovl"
Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
2016-04-05 16:05:29 +02:00
Stéphane Graber
486c5f03f5 Merge pull request #943 from tenforward/japanese
doc: Add lxc.rootfs.backend in Japanese lxc.container.conf(5)
2016-04-04 22:44:50 -04:00
KATOH Yasufumi
933acbed73 doc: Add lxc.rootfs.backend in Japanese lxc.container.conf(5)
Update for commit f903986

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
2016-04-05 11:04:59 +09:00
Stéphane Graber
6f72255b08 Merge pull request #942 from ysbnim/master
Add a document of lxc.rootfs.backend in Korean manpage
2016-04-03 23:04:53 -04:00
Sungbae Yoo
780821f8f6 Add a document of lxc.rootfs.backend in Korean manpage
Update for commit f903986

Signed-off-by: Sungbae Yoo <sungbae.yoo@samsung.com>
2016-04-04 11:26:19 +09:00
Stéphane Graber
b34944b2ec Merge pull request #941 from evgeni/spelling
fix spelling mistakes spotted by Debian's lintian
2016-04-03 12:57:22 -04:00
Evgeni Golov
e9555a6bc7 fix spelling mistakes spotted by Debian's lintian
Signed-off-by: Evgeni Golov <evgeni@debian.org>
2016-04-03 18:50:16 +02:00
Christian Brauner
7b193c81ac Merge pull request #936 from overlayfs/btrfs_recursive_destroy
fix btrfs_recursive_destroy
2016-04-03 18:35:11 +02:00
Oleg Freedholm
58232f8c30 store errno immediately after ioctl
Signed-off-by: Oleg Freedholm <overlayfs@gmail.com>
2016-04-04 01:15:58 +10:00
Stéphane Graber
89f6299a64 Merge pull request #940 from hallyn/2016-04-02/bdev.4
switch user facing name to lxc.rootfs.backend
2016-04-02 23:52:04 -04:00
Serge Hallyn
f9039861c0 document lxc.rootfs.backend
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2016-04-02 22:05:09 -05:00
Serge Hallyn
327a1e78e7 switch user facing name to lxc.rootfs.backend
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2016-04-02 21:32:34 -05:00
Christian Brauner
e82104d3f8 Merge pull request #939 from hallyn/2016-04-02/bdev.3
rootfs.bdev_type: implement get and clear
2016-04-03 04:03:26 +02:00
Serge Hallyn
6a21d4aeac rootfs.bdev_type: implement get and clear
clear is just set(x, ""), but before this patch that didn't work bc
"" is nota valid bdev type.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2016-04-02 20:43:35 -05:00
Christian Brauner
c78de02c27 Merge pull request #938 from hallyn/2016-04-02/bdev.2
use more accurate bdev_type name for rootfs.bdev
2016-04-02 23:29:07 +02:00
Serge Hallyn
b3b8c97f08 use more accurate bdev_type name for rootfs.bdev
It'll make future code reading easier.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2016-04-02 16:08:39 -05:00
Christian Brauner
f0a71c4a5d Merge pull request #937 from hallyn/2016-04-02/bdev
2016 04 02/bdev
2016-04-02 23:06:58 +02:00
Serge Hallyn
984bd6203a honor lxc.rootfs.bdev
If that is specified, then we only use the specified backing store type.

This can be useful if you know that lxc.rootfs is a directory type and
you do not want lxc to waste time searching for zfs, btrfs, etc.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2016-04-02 15:47:43 -05:00
Serge Hallyn
bfd77214f6 add a lxc.rootfs.bdev option (not yet honored)
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2016-04-02 15:41:24 -05:00
Oleg Freedhom
8ba6dc5e53 fix btrfs_recursive_destroy
A change in kernel 4.2 caused btrfs_recursive_destroy to
fail to delete unprivileged containers.  This patch restores
the pre-kernel-4.2 behaviour.  Ref: Issue 935.

Signed-off-by: Oleg Freedhom <overlayfs@gmail.com>
2016-04-02 16:18:54 +00:00
Stéphane Graber
55c91e8367 change version to 2.0.0.rc15 in configure.ac
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2016-03-31 18:10:51 -04:00
Stéphane Graber
442ad5c61c Merge pull request #931 from n-eiling/pageserver-support
c/r: support for the criu pageserver
2016-03-31 14:50:04 -04:00
Niklas Eiling
74eb576cef fixed indentation and comments
Signed-off-by: Niklas Eiling <niklas.eiling@rwth-aachen.de>
2016-03-31 20:09:42 +02:00
Christian Brauner
5f1728f1f9 Merge pull request #934 from GreatFruitOmsk/master
Fix buffer overflow in do_start()
2016-03-31 12:56:11 +02:00
Aleksandr Mezin
a91cde2199 Fix buffer overflow in do_start()
Signed-off-by: Aleksandr Mezin <mezin.alexander@gmail.com>
2016-03-31 16:46:03 +06:00
Niklas Eiling
4c0c0319a5 c/r: support for the criu pageserver
this enables lxc to perform "disk-less migrations" where memory pages are sent directly to the destination machine instead of being written to the sources filesystem first.
For this, the migrate_opts struct has been added the strings "pageserver_address" and "pageserver_port" so that criu can be told where to look for a pageserver.

Signed-off-by: Niklas Eiling <niklas.eiling@rwth-aachen.de>
2016-03-31 12:14:50 +02:00
Serge Hallyn
a495e1fd3f Merge pull request #932 from n-eiling/criu-log-fix
fix possible buffer overflow
2016-03-30 18:44:36 -05:00
Niklas Eiling
72a30576da use snprintf instead of strncat
Signed-off-by: Niklas Eiling <niklas.eiling@rwth-aachen.de>
2016-03-30 23:34:37 +02:00
Stéphane Graber
24d6495f0d Merge pull request #933 from evgeni/update-debian-releases
update Debian release names
2016-03-30 16:53:28 -04:00
Evgeni Golov
808652d147 update Debian release names
Squeeze is EOL now, Stretch is the upcoming stable

Signed-off-by: Evgeni Golov <evgeni@golov.de>
2016-03-30 22:51:13 +02:00
Niklas Eiling
a17fa3c081 fix possible buffer overflow
strncat only returns its first argument and not the end of the written string.
Thus "buf-pos" is always 0 and consquently no range check is performed.

Signed-off-by: Niklas Eiling <niklas.eiling@rwth-aachen.de>
2016-03-30 20:10:21 +02:00
Serge Hallyn
cb82ed3928 Merge pull request #929 from brauner/2016-03-27/mmap_file_to_str
use smarter error handling for lxc_strmmap()
2016-03-30 11:19:44 -05:00
Christian Brauner
981f6029c3 use common lxc ordering for included headers
Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
2016-03-30 18:07:38 +02:00
Serge Hallyn
42071d376b Merge pull request #930 from brauner/2016-03-30/ignore_all_so
also ingore *.so.*
2016-03-30 11:06:02 -05:00
Christian Brauner
a1e5280d9e use smarter error handling for lxc_strmmap()
Additionally, fix the comment for lxc_strmmap() and cleanup #includes in
utils.{c,h}.

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
2016-03-30 10:20:43 +02:00
Christian Brauner
1000e4cb5b also ingore *.so.*
Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
2016-03-30 10:19:17 +02:00
Christian Brauner
98139b9f50 Merge pull request #928 from stgraber/master
lxc-ubuntu: Fix building on secondary architectures
2016-03-30 07:49:55 +02:00