]> git.proxmox.com Git - mirror_lxc.git/log
mirror_lxc.git
7 years agorepo: add new README
Christian Brauner [Sat, 27 May 2017 01:53:59 +0000 (03:53 +0200)]
repo: add new README

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoMerge pull request #1585 from tenforward/japanese
Christian Brauner [Tue, 23 May 2017 14:49:03 +0000 (00:49 +1000)]
Merge pull request #1585 from tenforward/japanese

doc: Add console behavior to Japanese lxc.container.conf(5)

7 years agodoc: Add console behavior to Japanese lxc.container.conf(5)
KATOH Yasufumi [Tue, 23 May 2017 06:48:34 +0000 (15:48 +0900)]
doc: Add console behavior to Japanese lxc.container.conf(5)

Update for commit 6e3bb2890c26ff0ca8a400eb3c0777f07ff76d83

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
7 years agoMerge pull request #1580 from brauner/2017-05-20/tty_fixes
Stéphane Graber [Mon, 22 May 2017 19:52:13 +0000 (15:52 -0400)]
Merge pull request #1580 from brauner/2017-05-20/tty_fixes

conf: non-functional changes

7 years agoMerge pull request #1573 from brauner/2017-05-18/fix_ppc64le_build
Stéphane Graber [Mon, 22 May 2017 19:49:54 +0000 (15:49 -0400)]
Merge pull request #1573 from brauner/2017-05-18/fix_ppc64le_build

utils: fix ppc64le builds

7 years agoconf: non-functional changes
Christian Brauner [Sat, 20 May 2017 12:58:20 +0000 (14:58 +0200)]
conf: non-functional changes

Improve setting up /dev/tty<N> devices.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoMerge pull request #1577 from lifeng68/Bugfix
Christian Brauner [Fri, 19 May 2017 11:26:54 +0000 (13:26 +0200)]
Merge pull request #1577 from lifeng68/Bugfix

Fix the bug of 'ts->stdoutfd' did not fill with parameters 'stdoutfd'

7 years agoFix the bug of 'ts->stdoutfd' did not fill with parameters 'stdoutfd'
Li Feng [Fri, 19 May 2017 14:40:07 +0000 (22:40 +0800)]
Fix the bug of 'ts->stdoutfd' did not fill with parameters 'stdoutfd'

Signed-off-by: Li Feng <lifeng68@huawei.com>
7 years agoMerge pull request #1575 from brauner/2017-05-18/fix_tmp_mount_proc
Serge Hallyn [Thu, 18 May 2017 17:45:13 +0000 (12:45 -0500)]
Merge pull request #1575 from brauner/2017-05-18/fix_tmp_mount_proc

utils: fix lxc_mount_proc_if_needed()

7 years agoutils: fix lxc_mount_proc_if_needed()
Christian Brauner [Thu, 18 May 2017 14:31:42 +0000 (16:31 +0200)]
utils: fix lxc_mount_proc_if_needed()

- check for buffer overflow
- only call INFO() after we ensured that readlink() was successful
- simplify logic

Reported-by: Benedikt Rosenkranz beluro@web.de
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoutils: fix ppc64le builds
Christian Brauner [Thu, 18 May 2017 11:18:29 +0000 (13:18 +0200)]
utils: fix ppc64le builds

I suspect that there's a glibc bug on ppc64le. Both clang and gcc a very
unhappy when you return -errno from these functions. Instead, let's return
concrete errno numbers, e.g. -EINVAL.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoMerge pull request #1570 from mgariepy/patch-2
Stéphane Graber [Wed, 17 May 2017 19:29:21 +0000 (15:29 -0400)]
Merge pull request #1570 from mgariepy/patch-2

Add cronie to the pkg list

7 years agoAdd cronie to the pkg list
mgariepy [Wed, 17 May 2017 19:03:20 +0000 (15:03 -0400)]
Add cronie to the pkg list

Add cronie to have crond running in the containers.

Signed-off-by: Marc Gariepy <gariepy.marc@gmail.com>
7 years agoMerge pull request #1569 from anevenchanniy/lxc-top/fix_memsw
Serge Hallyn [Wed, 17 May 2017 19:01:56 +0000 (14:01 -0500)]
Merge pull request #1569 from anevenchanniy/lxc-top/fix_memsw

[lxc-top] Fix memory+swap output in batch mode

7 years agoMerge pull request #1568 from hallyn/2017-05-17/cgfsng.log
Christian Brauner [Wed, 17 May 2017 17:25:13 +0000 (19:25 +0200)]
Merge pull request #1568 from hallyn/2017-05-17/cgfsng.log

cgfsng: log when we defer to cgfsng

7 years ago[lxc-top] Fix memory+swap output in batch mode
Nevenchanniy Aleksandr [Wed, 17 May 2017 14:50:03 +0000 (17:50 +0300)]
[lxc-top] Fix memory+swap output in batch mode

This is patch fix output of memory+swap in batch mode, that
was forgotten in 6b6e702ac83a2bc92959c0dcae5149762826ef30

Signed-off-by: Alexandr Nevenchanniy <a.nevenchannyy@gmail.com
7 years agocgfsng: log when we defer to cgfsng
Serge Hallyn [Wed, 17 May 2017 14:20:59 +0000 (09:20 -0500)]
cgfsng: log when we defer to cgfsng

Signed-off-by: Serge Hallyn <serge@hallyn.com>
7 years agoMerge pull request #1567 from anevenchanniy/lxc-top/memory
Christian Brauner [Tue, 16 May 2017 18:23:51 +0000 (20:23 +0200)]
Merge pull request #1567 from anevenchanniy/lxc-top/memory

[lxc-top] Add memory+swap monitoring

7 years ago[lxc-top] Add memory+swap monitoring
Nevenchanniy Aleksandr [Mon, 15 May 2017 22:46:09 +0000 (01:46 +0300)]
[lxc-top] Add memory+swap monitoring

This is patch add memory + swap monitoring from lxc-top tool

Signed-off-by: Alexandr Nevenchanniy <a.nevenchannyy@gmail.com>
7 years agoMerge pull request #1565 from brauner/2017-05-15/clear_all_config_items
Serge Hallyn [Tue, 16 May 2017 14:45:30 +0000 (09:45 -0500)]
Merge pull request #1565 from brauner/2017-05-15/clear_all_config_items

conf{,ile}: allow to clear all config items

7 years agoMerge pull request #1566 from brauner/2017-05-16/pin_rootfs_when_privileged
Serge Hallyn [Tue, 16 May 2017 14:39:14 +0000 (09:39 -0500)]
Merge pull request #1566 from brauner/2017-05-16/pin_rootfs_when_privileged

start: pin rootfs when privileged

7 years agostart: pin rootfs when privileged
Christian Brauner [Mon, 15 May 2017 22:42:30 +0000 (00:42 +0200)]
start: pin rootfs when privileged

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoMerge pull request #1563 from 0x0916/seccomp
Christian Brauner [Mon, 15 May 2017 15:55:55 +0000 (17:55 +0200)]
Merge pull request #1563 from 0x0916/seccomp

Seccomp: update comment, print action name etc

7 years agoconf{,ile}: allow to clear all config items
Christian Brauner [Mon, 15 May 2017 12:53:06 +0000 (14:53 +0200)]
conf{,ile}: allow to clear all config items

Closes #1561.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoseccomp: print action name in log
0x0916 [Mon, 15 May 2017 10:05:09 +0000 (18:05 +0800)]
seccomp: print action name in log

This patch add function `get_action_name`, so we can print action name
in the log file. for example:

```
lxc-start ubuntu 20170515095416.561 INFO     lxc_seccomp - seccomp.c:parse_config_v2:613 - Adding compat rule for reject_force_umount action 0(kill).
lxc-start ubuntu 20170515095416.562 INFO     lxc_seccomp - seccomp.c:parse_config_v2:613 - Adding compat rule for kexec_load action 327681(errno).
```

Signed-off-by: 0x0916 <w@laoqinren.net>
7 years agoseccomp: update comment for function `parse_config`
0x0916 [Mon, 15 May 2017 10:04:27 +0000 (18:04 +0800)]
seccomp: update comment for function `parse_config`

Signed-off-by: 0x0916 <w@laoqinren.net>
7 years agoseccomp: s/n-new-privs/no-new-privs/g
0x0916 [Mon, 15 May 2017 10:03:41 +0000 (18:03 +0800)]
seccomp: s/n-new-privs/no-new-privs/g

Signed-off-by: 0x0916 <w@laoqinren.net>
7 years agoMerge pull request #1558 from 0x0916/lxc-top
Christian Brauner [Mon, 15 May 2017 09:06:56 +0000 (11:06 +0200)]
Merge pull request #1558 from 0x0916/lxc-top

add more detail for blkio

7 years agoMerge pull request #1562 from 0x0916/delete-unneccessory-include
Christian Brauner [Mon, 15 May 2017 09:06:24 +0000 (11:06 +0200)]
Merge pull request #1562 from 0x0916/delete-unneccessory-include

monitor: delete unnecessary include file

7 years agomonitor: delete unneccessory include file
0x0916 [Mon, 15 May 2017 07:31:33 +0000 (15:31 +0800)]
monitor: delete unneccessory include file

we want to export `monitor.h`, `#include "conf.h"` will cause error
and it is unneccessory so just delete it.

Signed-off-by: 0x0916 <w@laoqinren.net>
7 years agoadd more detail for blkio
0x0916 [Tue, 9 May 2017 11:07:24 +0000 (19:07 +0800)]
add more detail for blkio

This patch add Read and Write information for blkio bytes.

Signed-off-by: 0x0916 <w@laoqinren.net>
7 years agoMerge pull request #1560 from dimkr/master
Christian Brauner [Sun, 14 May 2017 09:59:52 +0000 (11:59 +0200)]
Merge pull request #1560 from dimkr/master

conf: fix build without libcap

7 years agoconf: fix build without libcap
Dima Krasner [Sun, 14 May 2017 09:24:59 +0000 (12:24 +0300)]
conf: fix build without libcap

Signed-off-by: Dima Krasner <samdima@securingsam.com>
7 years agoMerge pull request #1553 from brauner/2017-05-12/allow_no_controlling_terminal
Stéphane Graber [Sat, 13 May 2017 20:18:30 +0000 (16:18 -0400)]
Merge pull request #1553 from brauner/2017-05-12/allow_no_controlling_terminal

lxc-attach: allow for situations without /dev/tty

7 years agoMerge pull request #1551 from brauner/2017-05-11/fix_num_parsing
Serge Hallyn [Sat, 13 May 2017 19:46:45 +0000 (14:46 -0500)]
Merge pull request #1551 from brauner/2017-05-11/fix_num_parsing

utils: fix num parsing functions

7 years agoMerge pull request #1556 from brauner/2017-05-13/fix_newuidmap_regression
Serge Hallyn [Sat, 13 May 2017 19:39:07 +0000 (14:39 -0500)]
Merge pull request #1556 from brauner/2017-05-13/fix_newuidmap_regression

start: don't call lxc_map_ids() without id map

7 years agostart: don't call lxc_map_ids() without id map
Christian Brauner [Sat, 13 May 2017 15:16:25 +0000 (17:16 +0200)]
start: don't call lxc_map_ids() without id map

So far, we somehow always called lxc_map_ids(), even when no id map was
configured. Let's not do this.

Closes #1555.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agolxc-attach: allow for situations without /dev/tty
Christian Brauner [Fri, 12 May 2017 14:33:23 +0000 (16:33 +0200)]
lxc-attach: allow for situations without /dev/tty

Closes #1552.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agotests: lxc_safe_{u}int() add corner-case tests
Christian Brauner [Thu, 11 May 2017 23:16:18 +0000 (01:16 +0200)]
tests: lxc_safe_{u}int() add corner-case tests

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoutils: fix num parsing functions
Christian Brauner [Thu, 11 May 2017 18:08:32 +0000 (20:08 +0200)]
utils: fix num parsing functions

Suggested-by: Benedikt Rosenkranz beluro@web.de
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoMerge pull request #1550 from brauner/2017-05-11/add_comment_to_lxc_spawn
Stéphane Graber [Thu, 11 May 2017 15:10:19 +0000 (11:10 -0400)]
Merge pull request #1550 from brauner/2017-05-11/add_comment_to_lxc_spawn

start: add crucial details about lxc_spawn()

7 years agostart: add crucial details about lxc_spawn()
Christian Brauner [Thu, 11 May 2017 12:41:47 +0000 (14:41 +0200)]
start: add crucial details about lxc_spawn()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoMerge pull request #1549 from 0x0916/install-systemd-unit-for-centos
Christian Brauner [Thu, 11 May 2017 10:14:08 +0000 (12:14 +0200)]
Merge pull request #1549 from 0x0916/install-systemd-unit-for-centos

Install systemd units for CentOS

7 years agoMerge `ubuntu` and `debian`case
0x0916 [Thu, 11 May 2017 07:16:14 +0000 (15:16 +0800)]
Merge `ubuntu` and `debian`case

Signed-off-by: 0x0916 <w@laoqinren.net>
7 years agoInstall systemd units for CentOS
0x0916 [Thu, 11 May 2017 07:07:07 +0000 (15:07 +0800)]
Install systemd units for CentOS

Signed-off-by: 0x0916 <w@laoqinren.net>
7 years agoMerge pull request #1548 from brauner/2017-05-10/prevent_umount_propagation
Stéphane Graber [Wed, 10 May 2017 21:04:57 +0000 (17:04 -0400)]
Merge pull request #1548 from brauner/2017-05-10/prevent_umount_propagation

utils: handle > 2^31 in lxc_unstack_mountpoint()

7 years agoutils: handle > 2^31 in lxc_unstack_mountpoint()
Christian Brauner [Wed, 10 May 2017 14:56:37 +0000 (16:56 +0200)]
utils: handle > 2^31 in lxc_unstack_mountpoint()

I mean.. really? But better safe than sorry.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoMerge pull request #1547 from brauner/2017-05-10/prevent_umount_propagation
Serge Hallyn [Wed, 10 May 2017 15:43:53 +0000 (10:43 -0500)]
Merge pull request #1547 from brauner/2017-05-10/prevent_umount_propagation

start: remove umount2()

7 years agoconf: non-functional changes
Christian Brauner [Wed, 10 May 2017 11:32:23 +0000 (13:32 +0200)]
conf: non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agostart: remove umount2()
Christian Brauner [Wed, 10 May 2017 11:27:38 +0000 (13:27 +0200)]
start: remove umount2()

I really fail to see the point of this and git {blame, log -S} don't really
enlighten me on the reason for this as well. But I might be dense. The way I
see it the only thing this line achieves is causing trouble when the container
is started as root because the umount2() call will umount e.g.
/usr/lib/x86_64-linux-gnu/lxc in case it is a mountpoint on the host. Note,
this is because lxc_spawn() is still called in the hosts namespaces.

Closes https://github.com/lxc/lxd/#3255.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoMerge pull request #1544 from brauner/2017-05-08/harden_console_handling
Serge Hallyn [Wed, 10 May 2017 05:31:03 +0000 (00:31 -0500)]
Merge pull request #1544 from brauner/2017-05-08/harden_console_handling

harden console handling

7 years agoconsole: fail when we cannot allocate peer tty
Christian Brauner [Wed, 10 May 2017 00:52:17 +0000 (02:52 +0200)]
console: fail when we cannot allocate peer tty

There's really no reason not to if it's requested.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconf: unstack all mounts atop /dev/console
Christian Brauner [Tue, 9 May 2017 20:21:07 +0000 (22:21 +0200)]
conf: unstack all mounts atop /dev/console

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoutils: add lxc_unstack_mountpoint()
Christian Brauner [Tue, 9 May 2017 20:04:21 +0000 (22:04 +0200)]
utils: add lxc_unstack_mountpoint()

lxc_unstack_mountpoint() tries to clear all mountpoints from a given path.
It return the number of successful umounts on success and -errno on error.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agodoc: document console behavior
Christian Brauner [Tue, 9 May 2017 00:15:24 +0000 (02:15 +0200)]
doc: document console behavior

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfig: remove /dev/console bind mount
Christian Brauner [Mon, 8 May 2017 22:39:28 +0000 (00:39 +0200)]
config: remove /dev/console bind mount

The code in conf will bind-mount a /dev/pts/<n> device over a dummy regular
/dev/console file. If users really want /dev/console bind-mount from the host
they can request it explicitly in the containers config file. This change will
have no effect on current LX{C,D} behavior since we (as said above) overmount
the /dev/console bind-mount anyway.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconf: lxc_setup_ttydir_console()
Christian Brauner [Mon, 8 May 2017 19:13:37 +0000 (21:13 +0200)]
conf: lxc_setup_ttydir_console()

In case the user specified

lxc.console = none
lxc.devttydir = bla
lxc.mount.entry = /dev/console dev/console none bind,create=file 0 0

move the mount under /dev/bla/console

If he requested a mknod()ed /dev/console rename it to /dev/bla/console.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconf: improve lxc_setup_dev_console()
Christian Brauner [Mon, 8 May 2017 19:11:58 +0000 (21:11 +0200)]
conf: improve lxc_setup_dev_console()

In case the user did request a console to be set up unmount any prior
bind-mount for it.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconf: non-functional changes to console functions
Christian Brauner [Mon, 8 May 2017 18:01:22 +0000 (20:01 +0200)]
conf: non-functional changes to console functions

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconf: non-functional changes lxc_setup()
Christian Brauner [Mon, 8 May 2017 17:43:58 +0000 (19:43 +0200)]
conf: non-functional changes lxc_setup()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agofix the wrong exit status
0x0916 [Mon, 8 May 2017 13:06:21 +0000 (21:06 +0800)]
fix the wrong exit status

Signed-off-by: 0x0916 <w@laoqinren.net>
7 years agoconf: remove /dev/console from lxc_fill_autodev()
Christian Brauner [Mon, 8 May 2017 17:39:41 +0000 (19:39 +0200)]
conf: remove /dev/console from lxc_fill_autodev()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconf: non-functional changes lxc_fill_autodev()
Christian Brauner [Mon, 8 May 2017 17:38:59 +0000 (19:38 +0200)]
conf: non-functional changes lxc_fill_autodev()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoMerge pull request #1539 from brauner/2017-05-06/fix_abstract_unix_sockets
Stéphane Graber [Mon, 8 May 2017 22:08:22 +0000 (18:08 -0400)]
Merge pull request #1539 from brauner/2017-05-06/fix_abstract_unix_sockets

bugfixes: {segfaults, hashes, abstract unix sockets}

7 years agoMerge pull request #1543 from evgeni/patch-1
Christian Brauner [Mon, 8 May 2017 19:04:36 +0000 (21:04 +0200)]
Merge pull request #1543 from evgeni/patch-1

precise is not the latest LTS, let's use xenial instead

7 years agoprecise is not the latest LTS, let's use xenial instead
Evgeni Golov [Mon, 8 May 2017 18:56:04 +0000 (14:56 -0400)]
precise is not the latest LTS, let's use xenial instead

7 years agomonitor: simplify abstract socket logic
Christian Brauner [Sat, 6 May 2017 21:40:04 +0000 (23:40 +0200)]
monitor: simplify abstract socket logic

Older version of liblxc only allowed for 105 bytes to be used for the abstract
unix domain socket name because the code for our abstract unix socket handling
performed invalid checks. Since we \0-terminate we could now have a maximum of
106 chars. But do not break backwards compatibility we keep the limit at 105.

Reported-by: 0x0916 w@laoqinren.net
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agolxccontainer: avoid NULL pointer dereference
Christian Brauner [Sat, 6 May 2017 21:38:22 +0000 (23:38 +0200)]
lxccontainer: avoid NULL pointer dereference

In case the lxc command socket is hashed and the socket was created for a
different path than the one we're currently querying
lxc_cmd_get_{lxcpath,name}() can return NULL. The command socket path is hashed
when len(lxcpath) > sizeof(sun_path) - 2.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocommands: non-functional changes
Christian Brauner [Sat, 6 May 2017 21:37:53 +0000 (23:37 +0200)]
commands: non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocommands: avoid NULL pointer dereference
Christian Brauner [Sat, 6 May 2017 21:35:57 +0000 (23:35 +0200)]
commands: avoid NULL pointer dereference

lxc_cmd_get_lxcpath() and lxc_cmd_get_name() both pass a nil pointer to
fill_sock_name(). Make sure that they are not dereferenced.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoaf unix: allow for maximum socket name
Christian Brauner [Sat, 6 May 2017 16:33:28 +0000 (18:33 +0200)]
af unix: allow for maximum socket name

Abstract unix sockets need not be \0-terminated. So you can effectively have
107 chars available. If you \0-terminate you'll have a 106. Don't enforce
\0-termination in these low-level functions. Enforce it higher up which we
already do.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoMerge pull request #1537 from brauner/2017-05-05/report_errno_on_monitor_startup_failure
Serge Hallyn [Sat, 6 May 2017 03:33:51 +0000 (22:33 -0500)]
Merge pull request #1537 from brauner/2017-05-05/report_errno_on_monitor_startup_failure

monitor: report errno on exec() error

7 years agomonitor: report errno on exec() error
Christian Brauner [Fri, 5 May 2017 12:37:27 +0000 (14:37 +0200)]
monitor: report errno on exec() error

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoMerge pull request #1533 from brauner/2017-05-02/mount_opts
Stéphane Graber [Wed, 3 May 2017 22:35:46 +0000 (18:35 -0400)]
Merge pull request #1533 from brauner/2017-05-02/mount_opts

conf: pedantry

7 years agoMerge pull request #1535 from brauner/2017-05-03/api_extension_lxc_is_supported_confi...
Stéphane Graber [Wed, 3 May 2017 22:35:27 +0000 (18:35 -0400)]
Merge pull request #1535 from brauner/2017-05-03/api_extension_lxc_is_supported_config_item

api extension: lxc_config_item_is_supported()

7 years agotest: add lxc_config_item_is_supported() tests
Christian Brauner [Wed, 3 May 2017 10:24:39 +0000 (12:24 +0200)]
test: add lxc_config_item_is_supported() tests

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agolxccontainer: add lxc_config_item_is_supported()
Christian Brauner [Wed, 3 May 2017 10:12:22 +0000 (12:12 +0200)]
lxccontainer: add lxc_config_item_is_supported()

This adds lxc_config_item_is_supported() as API extension. It allows to check
whether a given config item (e.g. lxc.autodev) is supported by this LXC
instance. The function is useful in the following scenarios:
1. Users have compiled liblxc from source and have removed a config items from
   the corresponding struct in confile.c. (For example, embedded users might
   decide to gut a bunch of options that they cannot use.)
2. Callers that want to check for a specific configuration item independent of
   the version numbers exposed in our version.h header.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconf: add MS_LAZYTIME to mount options
Christian Brauner [Tue, 2 May 2017 21:38:14 +0000 (23:38 +0200)]
conf: add MS_LAZYTIME to mount options

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconf: order mount options
Christian Brauner [Tue, 2 May 2017 21:37:16 +0000 (23:37 +0200)]
conf: order mount options

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoMerge pull request #1531 from mar-kolya/master
Stéphane Graber [Tue, 2 May 2017 04:07:37 +0000 (00:07 -0400)]
Merge pull request #1531 from mar-kolya/master

Change sshd template to work with Ubuntu 17.04

7 years agoChange sshd template to work with Ubuntu 17.04
Nikolay Martynov [Tue, 2 May 2017 01:45:10 +0000 (21:45 -0400)]
Change sshd template to work with Ubuntu 17.04

A few things have changed and this patch makes container generated for sshd work in Ubuntu

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
7 years agoMerge pull request #1529 from brauner/2017-04-28/create_proc_if_missing
Serge Hallyn [Sat, 29 Apr 2017 01:06:07 +0000 (20:06 -0500)]
Merge pull request #1529 from brauner/2017-04-28/create_proc_if_missing

utils: tweak lxc_mount_proc_if_needed()

7 years agoutils: tweak lxc_mount_proc_if_needed()
Christian Brauner [Fri, 28 Apr 2017 22:03:06 +0000 (00:03 +0200)]
utils: tweak lxc_mount_proc_if_needed()

Create /proc directory if it doesn't exist.

Closes #1475.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconf: non-functional changes
Christian Brauner [Fri, 28 Apr 2017 21:54:24 +0000 (23:54 +0200)]
conf: non-functional changes

Closes #1475.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoMerge pull request #1528 from brauner/2017-04-28/close_fd_in_lxc_setup_devpts
Serge Hallyn [Fri, 28 Apr 2017 14:44:08 +0000 (09:44 -0500)]
Merge pull request #1528 from brauner/2017-04-28/close_fd_in_lxc_setup_devpts

conf: close fd in lxc_setup_devpts()

7 years agoconf: close fd in lxc_setup_devpts()
Christian Brauner [Fri, 28 Apr 2017 11:52:43 +0000 (13:52 +0200)]
conf: close fd in lxc_setup_devpts()

This left the file descriptor to the underlying /dev/ptmx file open which
confused the hell out of criu. Let's close it.

Closes https://github.com/lxc/lxd/issues/3243.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoMerge pull request #1527 from tenforward/japanese
Christian Brauner [Tue, 25 Apr 2017 09:09:03 +0000 (11:09 +0200)]
Merge pull request #1527 from tenforward/japanese

doc: add lxc.limit to lxc.container.conf(5)

7 years agodoc: add lxc.limit to lxc.container.conf(5)
KATOH Yasufumi [Tue, 25 Apr 2017 08:33:36 +0000 (17:33 +0900)]
doc: add lxc.limit to lxc.container.conf(5)

Update for commit 93f9e90

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
7 years agoMerge pull request #1526 from brauner/2017-04-24/build_lxc_with_musl
Stéphane Graber [Mon, 24 Apr 2017 01:55:44 +0000 (21:55 -0400)]
Merge pull request #1526 from brauner/2017-04-24/build_lxc_with_musl

confile: fix musl build

7 years agoconfile: fix musl build
Christian Brauner [Sun, 23 Apr 2017 22:34:48 +0000 (00:34 +0200)]
confile: fix musl build

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoMerge pull request #1523 from brauner/2017-04-23/improve_cgfsng_debug
Stéphane Graber [Sun, 23 Apr 2017 20:50:56 +0000 (16:50 -0400)]
Merge pull request #1523 from brauner/2017-04-23/improve_cgfsng_debug

cgroups: improve cgfsng debugging

7 years agoissue template: fix typo
Christian Brauner [Sun, 23 Apr 2017 20:04:54 +0000 (22:04 +0200)]
issue template: fix typo

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgroups: improve cgfsng debugging
Christian Brauner [Sun, 23 Apr 2017 13:06:10 +0000 (15:06 +0200)]
cgroups: improve cgfsng debugging

In a lot of cases we need a list of the writeable cgroup controllers detected
by the cgfsng driver.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoMerge pull request #1520 from brauner/2017-04-22/improve_loop
Stéphane Graber [Sun, 23 Apr 2017 01:10:10 +0000 (21:10 -0400)]
Merge pull request #1520 from brauner/2017-04-22/improve_loop

utils: use loop device helpers from LXD

7 years agoMerge pull request #1522 from brauner/2017-04-22/lxc_issue_template
Stéphane Graber [Sun, 23 Apr 2017 01:09:44 +0000 (21:09 -0400)]
Merge pull request #1522 from brauner/2017-04-22/lxc_issue_template

create ISSUE_TEMPLATE.md

7 years agocreate ISSUE_TEMPLATE.md
Christian Brauner [Sat, 22 Apr 2017 16:38:44 +0000 (18:38 +0200)]
create ISSUE_TEMPLATE.md

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoutils: use loop device helpers from LXD
Christian Brauner [Sat, 22 Apr 2017 12:01:59 +0000 (14:01 +0200)]
utils: use loop device helpers from LXD

Use the loop device helpers I wrote for LXD in LXC as well. They should be more
efficient.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconf: non-functional changes
Christian Brauner [Sat, 22 Apr 2017 11:22:16 +0000 (13:22 +0200)]
conf: non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoMerge pull request #1519 from brauner/2017-04-21/setup_pts
Stéphane Graber [Sat, 22 Apr 2017 01:12:43 +0000 (21:12 -0400)]
Merge pull request #1519 from brauner/2017-04-21/setup_pts

conf: use bind-mount for /dev/ptmx

7 years agoconf: use bind-mount for /dev/ptmx
Christian Brauner [Fri, 21 Apr 2017 22:14:15 +0000 (00:14 +0200)]
conf: use bind-mount for /dev/ptmx

AppArmor will refuse on /dev/ptmx being a symlink.

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