]>
git.ipfire.org Git - thirdparty/lxc.git/log
Christian Brauner [Tue, 1 Aug 2017 23:31:16 +0000 (01:31 +0200)]
userns.conf: remove obsolete bind-mounts
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Tue, 1 Aug 2017 23:28:35 +0000 (01:28 +0200)]
conf: NOTICE() on mounts on container's /dev
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sat, 29 Jul 2017 21:10:17 +0000 (23:10 +0200)]
utils: rework lxc_deslashify()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Tue, 1 Aug 2017 21:34:50 +0000 (23:34 +0200)]
conf: lxc_fill_autodev()
non-functional changes
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Tue, 1 Aug 2017 21:33:43 +0000 (23:33 +0200)]
utils: switch to has_fs_type()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Tue, 1 Aug 2017 21:23:24 +0000 (23:23 +0200)]
utils: add has_fs_type() + is_fs_type()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Tue, 1 Aug 2017 20:54:09 +0000 (22:54 +0200)]
conf: mount_autodev()
non-functional changes
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Tue, 1 Aug 2017 20:48:06 +0000 (22:48 +0200)]
conf: lxchook_names
non-functional changes
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Tue, 1 Aug 2017 20:46:14 +0000 (22:46 +0200)]
conf: mount_entry()
non-functional changes
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Tue, 1 Aug 2017 20:38:44 +0000 (22:38 +0200)]
conf: cull_mntent_opt()
non-functional changes
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Tue, 1 Aug 2017 20:35:29 +0000 (22:35 +0200)]
conf: mount_entry_create_dir_file()
bugfixes
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Tue, 1 Aug 2017 20:18:38 +0000 (22:18 +0200)]
conf: mount_entry_on_generic()
non-functional changes
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Tue, 1 Aug 2017 20:15:56 +0000 (22:15 +0200)]
conf: mount_entry_on_systemfs()
non-functional changes
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Tue, 1 Aug 2017 20:14:48 +0000 (22:14 +0200)]
conf: mount_entry_on_absolute_rootfs()
non-functional changes
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Tue, 1 Aug 2017 20:11:32 +0000 (22:11 +0200)]
conf: setup_mount_entries()
non-functional changes
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Tue, 1 Aug 2017 20:07:10 +0000 (22:07 +0200)]
conf: make_anonymous_mount_file()
non-functional changes
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Tue, 1 Aug 2017 20:03:14 +0000 (22:03 +0200)]
conf: setup_mount()
non-functional changes
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Tue, 1 Aug 2017 20:00:44 +0000 (22:00 +0200)]
conf: mount_file_entries()
non-functional changes
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Serge Hallyn [Tue, 1 Aug 2017 19:59:32 +0000 (14:59 -0500)]
Merge pull request #1723 from brauner/2017-07-31/remove_utmp_watch
start: remove utmp watch
Serge Hallyn [Tue, 1 Aug 2017 19:59:06 +0000 (14:59 -0500)]
Merge pull request #1722 from brauner/2017-07-31/devpts_use_max_mount_option
devpts: use max=<count> option on mount
Christian Brauner [Tue, 1 Aug 2017 19:46:13 +0000 (15:46 -0400)]
Merge pull request #1724 from GamerSource/opensuse-template-improvements-v2
Opensuse template improvements
Christian Brauner [Mon, 31 Jul 2017 20:54:38 +0000 (22:54 +0200)]
devpts: use max=<count> option on mount
This will only work with kernels >= 3.4
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Mon, 31 Jul 2017 21:04:54 +0000 (23:04 +0200)]
start: remove utmp watch
Closes #1616.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Thomas Lamprecht [Tue, 1 Aug 2017 06:03:41 +0000 (08:03 +0200)]
templates/opensuse: support leap 42.3
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Tue, 1 Aug 2017 06:03:07 +0000 (08:03 +0200)]
templates/opensuse: getty.target.wants does not always exists
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Tue, 1 Aug 2017 05:48:21 +0000 (07:48 +0200)]
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>
Thomas Lamprecht [Tue, 1 Aug 2017 05:34:43 +0000 (07:34 +0200)]
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>
Stéphane Graber [Mon, 31 Jul 2017 19:16:10 +0000 (15:16 -0400)]
Merge pull request #1721 from brauner/2017-07-30/fix_saved_config_handling
network parser fixes
Christian Brauner [Mon, 31 Jul 2017 17:57:57 +0000 (19:57 +0200)]
test: test for invalid network key
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sun, 30 Jul 2017 20:15:43 +0000 (16:15 -0400)]
Merge pull request #1720 from hallyn/2017-07-29/cg
Fix some bugs in #1719
Christian Brauner [Sun, 30 Jul 2017 19:45:36 +0000 (21:45 +0200)]
lxccontainer: clear whole indexed networks
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sun, 30 Jul 2017 19:42:40 +0000 (21:42 +0200)]
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>
Serge Hallyn [Sat, 29 Jul 2017 22:38:05 +0000 (17:38 -0500)]
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>
Christian Brauner [Sat, 29 Jul 2017 21:03:55 +0000 (23:03 +0200)]
Merge pull request #1719 from hallyn/2017-07-28/cg
Fix up
c8bf519d to fit our coding style
Serge Hallyn [Sat, 29 Jul 2017 04:25:41 +0000 (23:25 -0500)]
Fix up
c8bf519d to fit our coding style
Also reduce the number of mallocs.
Signed-off-by: Serge Hallyn <serge@hallyn.com>
Serge Hallyn [Sat, 29 Jul 2017 03:31:54 +0000 (22:31 -0500)]
Merge pull request #1708 from aeris/master
Allow full path in lxc.devices.allow
Christian Brauner [Fri, 28 Jul 2017 20:10:37 +0000 (22:10 +0200)]
Merge pull request #1717 from hallyn/harri1
Use "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>
Stéphane Graber [Fri, 28 Jul 2017 13:59:28 +0000 (15:59 +0200)]
Merge pull request #1716 from brauner/2017-07-28/bugfix
lvm: 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>
Stéphane Graber [Fri, 28 Jul 2017 05:13:04 +0000 (07:13 +0200)]
Merge pull request #1715 from brauner/2017-07-27/fix_gcc7_bug
lvm: check whether lxc.bdev.lvm.vg is empty
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>
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>
Stéphane Graber [Thu, 27 Jul 2017 19:33:19 +0000 (21:33 +0200)]
Merge pull request #1714 from brauner/2017-07-27/fix_gcc7_bug
cgroups: 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>
Serge Hallyn [Wed, 26 Jul 2017 23:12:46 +0000 (18:12 -0500)]
Merge pull request #1713 from brauner/2017-07-26/hybrid_cgroup_support
cgroups: 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>
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>
aeris [Wed, 19 Jul 2017 15:21:24 +0000 (17:21 +0200)]
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>
Serge Hallyn [Tue, 25 Jul 2017 15:18:10 +0000 (10:18 -0500)]
Merge pull request #1606 from brauner/2017-06-01/lxc_setup_after_cgroup_unshare
call 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>
Christian Brauner [Mon, 24 Jul 2017 00:47:33 +0000 (02:47 +0200)]
Merge pull request #1706 from lifeng68/do_remount
Fix issue #1702, do remount with the MS_REMOUNT flag when mounts with MS_RDONLY
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>
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>
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>
Christian Brauner [Wed, 12 Jul 2017 08:47:53 +0000 (10:47 +0200)]
Merge pull request #1696 from 0x0916/2017-07-12/remove-old-workaround-case
cgfsng: remove the old workdaround code
Christian Brauner [Wed, 12 Jul 2017 08:45:51 +0000 (10:45 +0200)]
Merge pull request #1695 from 0x0916/2017-07-12/update-doc-and-test
update doc and test
Long Wang [Wed, 12 Jul 2017 07:34:36 +0000 (15:34 +0800)]
cgfsng: remove the old workdaround code
Signed-off-by: Long Wang <w@laoqinren.net>
Long Wang [Wed, 12 Jul 2017 03:08:01 +0000 (11:08 +0800)]
tests: fix typo
Signed-off-by: Long Wang <w@laoqinren.net>
Long Wang [Wed, 12 Jul 2017 02:56:20 +0000 (10:56 +0800)]
doc: s/lxc.net.ipv6/lxc.net.ipv6.address/g
Signed-off-by: Long Wang <w@laoqinren.net>
Long Wang [Wed, 12 Jul 2017 02:54:28 +0000 (10:54 +0800)]
doc: s/lxc.net.ipv4/lxc.net.ipv4.address/g
Signed-off-by: Long Wang <w@laoqinren.net>
Long Wang [Wed, 12 Jul 2017 02:51:16 +0000 (10:51 +0800)]
doc: s/lxc.mount/lxc.mount.fstab/g
Signed-off-by: Long Wang <w@laoqinren.net>
Long Wang [Wed, 12 Jul 2017 02:47:34 +0000 (10:47 +0800)]
doc: s/lxc.pts/lxc.pty.max/g
Signed-off-by: Long Wang <w@laoqinren.net>
Long Wang [Wed, 12 Jul 2017 02:45:17 +0000 (10:45 +0800)]
doc: s/lxc.tty/lxc.tty.max/g
Signed-off-by: Long Wang <w@laoqinren.net>
Long Wang [Wed, 12 Jul 2017 02:35:51 +0000 (10:35 +0800)]
doc: s/lxc.console/lxc.console.path/g
Signed-off-by: Long Wang <w@laoqinren.net>
Long Wang [Wed, 12 Jul 2017 02:23:22 +0000 (10:23 +0800)]
doc: s/lxc.rootfs/lxc.rootfs.path/g
Signed-off-by: Long Wang <w@laoqinren.net>
Long Wang [Wed, 12 Jul 2017 02:04:58 +0000 (10:04 +0800)]
doc: s/seccomp/seccomp.profile/g
Signed-off-by: Long Wang <w@laoqinren.net>
Long Wang [Wed, 12 Jul 2017 01:58:35 +0000 (09:58 +0800)]
doc: s/se_context/selinux.context/g
Signed-off-by: Long Wang <w@laoqinren.net>
Long Wang [Wed, 12 Jul 2017 01:53:58 +0000 (09:53 +0800)]
doc: s/aa_profile/apparmor.profile/g
Signed-off-by: Long Wang <w@laoqinren.net>
Long Wang [Wed, 12 Jul 2017 01:43:49 +0000 (09:43 +0800)]
doc: s/aa_allow_incomplete/apparmor.allow_incomplete/g
Signed-off-by: Long Wang <w@laoqinren.net>
Christian Brauner [Tue, 11 Jul 2017 09:48:20 +0000 (11:48 +0200)]
Merge pull request #1692 from 0x0916/2017-07-11/cgfsng
cgfsng: only output debug info when we set cgroup data
Christian Brauner [Tue, 11 Jul 2017 09:09:15 +0000 (11:09 +0200)]
Merge pull request #1693 from tenforward/japanese
Update Japanese man pages
KATOH Yasufumi [Tue, 11 Jul 2017 08:31:20 +0000 (17:31 +0900)]
doc: Update Japanese lxc-ls(1)
add "--defined" option
Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
KATOH Yasufumi [Tue, 11 Jul 2017 08:22:46 +0000 (17:22 +0900)]
doc: Update Japanese lxc.containers.conf(5)
Follow updates of configuration keys:
* Delete lxc.kmsg (commit
26a38fb )
* lxc.console -> lxc.console.path (commit
3aed493 )
* lxc.mount -> lxc.mount.fstab (commit
47148e9 )
* lxc.net.ipv{4,6} -> lxc.net.ipv{4,6}.address (commit
9ff60df ,
2e44ae2 )
* lxc.tty -> lxc.tty.max, lxc.devttydir -> lxc.tty.dir (commit
fe1c588 )
* lxc.pts -> lxc.pty.max (commit 232763)
Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
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>
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>
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>
Christian Brauner [Mon, 10 Jul 2017 10:25:05 +0000 (12:25 +0200)]
Merge pull request #1690 from brauner/2017-07-10/lifeng68-Modify_fds
start: dup std{in,out,err} to pty slave
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>
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>
Christian Brauner [Sun, 9 Jul 2017 09:48:53 +0000 (11:48 +0200)]
Merge pull request #1687 from 0x0916/2017-07-09/delete-comments
delete comments
Serge Hallyn [Sun, 9 Jul 2017 01:08:47 +0000 (01:08 +0000)]
Merge pull request #1688 from 0x0916/2017-07-09/use-access
utils: 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>
Long Wang [Sun, 9 Jul 2017 00:10:34 +0000 (08:10 +0800)]
commonds: fix typo
Signed-off-by: Long Wang <w@laoqinren.net>
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>
Serge Hallyn [Sat, 8 Jul 2017 23:44:06 +0000 (23:44 +0000)]
Merge pull request #1659 from brauner/2017-06-28/do_not_use_cmd_socket_on_daemonized_start
start: use separate socket on daemonized start
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>
Christian Brauner [Mon, 3 Jul 2017 21:43:56 +0000 (23:43 +0200)]
commands: abstract cmd socket handling + logging
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Mon, 3 Jul 2017 21:37:31 +0000 (23:37 +0200)]
commands: add missing translation
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Mon, 3 Jul 2017 21:31:04 +0000 (23:31 +0200)]
commands: mv lxc_make_abstract_socket_name()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sun, 2 Jul 2017 13:42:07 +0000 (15:42 +0200)]
commands: make state server interface flexible
This adds a little more flexibility to the state server. The idea is to have a
command socket function "lxc_cmd_add_state_client()" whose only task is to add
a new state client to the container's in-memory handler. This function returns
either the state of the container if it is already in the requested state or it
will return the newly registered client's fd in one of its arguments to the
caller. We then provide a separate helper function "lxc_cmd_sock_rcv_state()"
which can be passed the returned client fd and listens on the fd for the
requested state.
This is useful when we want to first register a client, then send a signal to
the container and wait for a state. This ensure that the client fd is
registered before the signal can have any effect and can e.g. be used to catch
something like the "STOPPING" state that is very ephemeral.
Additionally we provide a convenience function "lxc_cmd_sock_get_state()" which
combines both tasks and is used in e.g. "lxc_wait()".
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sun, 2 Jul 2017 12:47:02 +0000 (14:47 +0200)]
commands: rename to lxc_cmd_add_state_client()
The new wait commands API is not yet stable so this change is ok.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Fri, 30 Jun 2017 13:30:18 +0000 (15:30 +0200)]
lxc static init: report exec*() failure
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Thu, 29 Jun 2017 13:01:11 +0000 (15:01 +0200)]
test: shortlived daemonized containers
Add a test to see if we can start daemonized containers that have a very
short-lived init process. The point of this is to see whether we can correctly
retrieve the state.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Thu, 29 Jun 2017 18:53:07 +0000 (20:53 +0200)]
lxccontainer: non-functional changes
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Thu, 29 Jun 2017 18:49:56 +0000 (20:49 +0200)]
lxccontainer: make sure memory is free()ed
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Thu, 29 Jun 2017 10:16:00 +0000 (12:16 +0200)]
start: use separate socket on daemonized start
Since we killed lxc-monitord we rely on the container's command socket to wait
for the container. This doesn't work nicely on daemonized startup since a
container's init process might be something that is so short-lived that we
won't even be able to add a state client before the mainloop closes. But the
container might still have been RUNNING and executed the init binary correctly.
In this case we would erroneously report that the container failed to start
when it actually started just fine.
This commit ensures that we really all cases where the container successfully
ran by switching to a short-lived per-container anonymous unix socket pair that
uses credentials to pass container states around. It is immediately closed once
the container has started successfully.
This should also make daemonized container start way more robust since we don't
rely on the command socket handler to be running.
For the experienced developer: Yes, I did think about utilizing the command
socket directly for this. The problem is that when the mainloop starts it may
end up end accept()ing the connection that we want
do_wait_on_daemonized_start() to accept() so this won't work and might cause us
to hang indefinitely. The same problem arises when the container fails to start
before the mainloop is created. In this case we would hang indefinitely as
well.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 28 Jun 2017 11:30:05 +0000 (13:30 +0200)]
start: generalize lxc_check_inherited()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 28 Jun 2017 22:50:19 +0000 (00:50 +0200)]
utils: lxc_make_abstract_socket_name()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Serge Hallyn [Sat, 8 Jul 2017 21:25:17 +0000 (21:25 +0000)]
Merge pull request #1665 from brauner/2017-07-01/deprecate_lxc_rootfs_backend
prepare for LXC 2.1