2
0
mirror of git://github.com/lxc/lxc synced 2025-08-31 15:19:26 +00:00
Commit Graph

5460 Commits

Author SHA1 Message Date
Christian Brauner
4c9ab50eb6 travis: fix builds
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-02 18:41:57 +02:00
Serge Hallyn
ebc524334a Merge pull request #1723 from brauner/2017-07-31/remove_utmp_watch
start: remove utmp watch
2017-08-01 14:59:32 -05:00
Serge Hallyn
58f52a1438 Merge pull request #1722 from brauner/2017-07-31/devpts_use_max_mount_option
devpts: use max=<count> option on mount
2017-08-01 14:59:06 -05:00
Christian Brauner
f5cdd5ac3c Merge pull request #1724 from GamerSource/opensuse-template-improvements-v2
Opensuse template improvements
2017-08-01 15:46:13 -04:00
Christian Brauner
9d28c4f980 devpts: use max=<count> option on mount
This will only work with kernels >= 3.4

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-01 19:59:18 +02:00
Christian Brauner
bc8ce58604 start: remove utmp watch
Closes #1616.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-01 18:45:50 +02:00
Thomas Lamprecht
46a892d500 templates/opensuse: support leap 42.3
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-08-01 09:15:30 +02:00
Thomas Lamprecht
d4cf2ad3ec templates/opensuse: getty.target.wants does not always exists
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-08-01 09:15:25 +02:00
Thomas Lamprecht
4615877951 templates/opensuse: fix tumbleweed software selection
tumbleweed needs a newer version for a few packages, namely:
* liblua5_3
* bncurses6
* breadline7

As Leap it also has no dhcpd, but udhcp which gets pulled in already.
Further iproute2 and net-tools need manual instalation.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-08-01 09:15:20 +02:00
Thomas Lamprecht
baf85a0193 templates/opensuse: tumbleweed has no update repo
As tumbleweed is a rolling release it has not update repository.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-08-01 09:15:16 +02:00
Stéphane Graber
d1f811d5de Merge pull request #1721 from brauner/2017-07-30/fix_saved_config_handling
network parser fixes
2017-07-31 15:16:10 -04:00
Christian Brauner
bb461dcca6 test: test for invalid network key
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-07-31 19:57:57 +02:00
Christian Brauner
dd871fa00a Merge pull request #1720 from hallyn/2017-07-29/cg
Fix some bugs in #1719
2017-07-30 16:15:43 -04:00
Christian Brauner
4222a9f44b lxccontainer: clear whole indexed networks
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-07-30 21:45:36 +02:00
Christian Brauner
31ee747baa confile: use deindexed network keys
When we are passed a network key like "lxc.net.[i].ipv4.address" we need to
make sure that we pass the deindexed key "lxc.net.ipv4.address" to the
{get,clr,set} methods otherwise we'll end up in an endless loop.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-07-30 21:42:40 +02:00
Serge Hallyn
2c2d6c49dd Fix some bugs in #1719
In particular, any text (like a #comment) following the mode
would end up in our mode line.

Signed-off-by: Serge Hallyn <serge@hallyn.com>
2017-07-29 17:38:43 -05:00
Christian Brauner
1135b35b6d Merge pull request #1719 from hallyn/2017-07-28/cg
Fix up c8bf519d to fit our coding style
2017-07-29 23:03:55 +02:00
Serge Hallyn
72add15524 Fix up c8bf519d to fit our coding style
Also reduce the number of mallocs.

Signed-off-by: Serge Hallyn <serge@hallyn.com>
2017-07-29 14:45:36 -05:00
Serge Hallyn
da7a897ee2 Merge pull request #1708 from aeris/master
Allow full path in lxc.devices.allow
2017-07-28 22:31:54 -05:00
Christian Brauner
5fddde036c Merge pull request #1717 from hallyn/harri1
Use "rsync -SHaAX" to copy the cached rootfs into place
2017-07-28 22:10:37 +02:00
Harald Dunkel
6273aef16b 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>
2017-07-28 13:09:36 -05:00
Stéphane Graber
f1401c06ae Merge pull request #1716 from brauner/2017-07-28/bugfix
lvm: fix check
2017-07-28 15:59:28 +02:00
Christian Brauner
505dd98779 lvm: fix check
Signed-off-by: Thomas Hipp <thipp@suse.de>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-07-28 15:33:50 +02:00
Stéphane Graber
41609c461b Merge pull request #1715 from brauner/2017-07-27/fix_gcc7_bug
lvm: check whether lxc.bdev.lvm.vg is empty
2017-07-28 07:13:04 +02:00
Christian Brauner
bb30b52a76 cgroups: use tight scoping
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-07-28 06:17:28 +02:00
Christian Brauner
01e5fa0792 lvm: check whether lxc.bdev.lvm.vg is set
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-07-28 06:17:01 +02:00
Stéphane Graber
bef81ce588 Merge pull request #1714 from brauner/2017-07-27/fix_gcc7_bug
cgroups: workaround gcc-7 bug
2017-07-27 21:33:19 +02:00
Christian Brauner
66b66624fc cgroups: workaround gcc-7 bug
Also: LOL

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-07-27 21:04:59 +02:00
Serge Hallyn
d9f78406d0 Merge pull request #1713 from brauner/2017-07-26/hybrid_cgroup_support
cgroups: handle hybrid cgroup layouts
2017-07-26 18:12:46 -05:00
Christian Brauner
6328fd9c05 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>
2017-07-26 15:20:01 +02:00
Christian Brauner
04ad7ffe2a utils: move helpers from cgfsng.c to utils.{c,h}
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-07-26 14:57:35 +02:00
aeris
c8bf519d7e Allow full path in lxc.devices.allow
Some devices like LVM or cryptsetup entries have no stable major/minor, changing between host reboots.
In this case, hardcoded numbers are not usable in config file and there is currently no way to use hook with lxc-device to do the link at guest startup :

    * `pre-start`/`autodev` hook runs in host context but has the guest in stopped state and so lxc-device not usable
    * `start` hook is in running state but runs in guest context and so lxc-device not available

This patch converts fullpath in lxc.devices.allow to current major/minor numbers to address those changing numbers.

Signed-off-by: aeris <aeris@imirhil.fr>
2017-07-26 12:17:33 +02:00
Serge Hallyn
c1cecfdd05 Merge pull request #1606 from brauner/2017-06-01/lxc_setup_after_cgroup_unshare
call lxc_setup() after unshare(CLONE_NEWCGROUP)
2017-07-25 10:18:10 -05:00
Christian Brauner
f4152036dd 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>
2017-07-24 14:21:23 +02:00
Christian Brauner
fa1bafd3f0 Merge pull request #1706 from lifeng68/do_remount
Fix issue #1702, do remount with the MS_REMOUNT flag when mounts with MS_RDONLY
2017-07-24 02:47:33 +02:00
Li Feng
5ae72b98f8 Using 'add-required_remount_flags' function to add required flags
Signed-off-by: Li Feng <lifeng68@huawei.com>
2017-07-24 16:26:52 +08:00
Li Feng
5ee0b2693e Add test script to test the ro option of lxc.rootfs.options
Signed-off-by: Li Feng <lifeng68@huawei.com>
2017-07-18 18:31:35 +08:00
Li Feng
0a693043fb Fix issue #1702, do remount with the MS_REMOUNT flag when mounts with MS_RDONLY
Signed-off-by: Li Feng <lifeng68@huawei.com>
2017-07-17 17:09:16 +08:00
Christian Brauner
82ce69b151 Merge pull request #1696 from 0x0916/2017-07-12/remove-old-workaround-case
cgfsng: remove the old workdaround code
2017-07-12 10:47:53 +02:00
Christian Brauner
cdb4bcc26b Merge pull request #1695 from 0x0916/2017-07-12/update-doc-and-test
update doc and test
2017-07-12 10:45:51 +02:00
Long Wang
a7896f5836 cgfsng: remove the old workdaround code
Signed-off-by: Long Wang <w@laoqinren.net>
2017-07-12 15:34:36 +08:00
Long Wang
f30ab9fe2a tests: fix typo
Signed-off-by: Long Wang <w@laoqinren.net>
2017-07-12 11:08:01 +08:00
Long Wang
08d9d0e5bd doc: s/lxc.net.ipv6/lxc.net.ipv6.address/g
Signed-off-by: Long Wang <w@laoqinren.net>
2017-07-12 10:56:20 +08:00
Long Wang
2c67dc7987 doc: s/lxc.net.ipv4/lxc.net.ipv4.address/g
Signed-off-by: Long Wang <w@laoqinren.net>
2017-07-12 10:54:28 +08:00
Long Wang
48d5fccf10 doc: s/lxc.mount/lxc.mount.fstab/g
Signed-off-by: Long Wang <w@laoqinren.net>
2017-07-12 10:51:16 +08:00
Long Wang
e4075f8385 doc: s/lxc.pts/lxc.pty.max/g
Signed-off-by: Long Wang <w@laoqinren.net>
2017-07-12 10:47:34 +08:00
Long Wang
0873f85ce7 doc: s/lxc.tty/lxc.tty.max/g
Signed-off-by: Long Wang <w@laoqinren.net>
2017-07-12 10:45:17 +08:00
Long Wang
5042d96d12 doc: s/lxc.console/lxc.console.path/g
Signed-off-by: Long Wang <w@laoqinren.net>
2017-07-12 10:35:51 +08:00
Long Wang
a64f3157a1 doc: s/lxc.rootfs/lxc.rootfs.path/g
Signed-off-by: Long Wang <w@laoqinren.net>
2017-07-12 10:23:22 +08:00
Long Wang
501cf9b019 doc: s/seccomp/seccomp.profile/g
Signed-off-by: Long Wang <w@laoqinren.net>
2017-07-12 10:04:58 +08:00