]> git.proxmox.com Git - mirror_lxc.git/log
mirror_lxc.git
7 years agonetwork: give getters a void pointer arg
Christian Brauner [Fri, 16 Jun 2017 14:28:03 +0000 (16:28 +0200)]
network: give getters a void pointer arg

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agonetwork: clear whole networks
Christian Brauner [Thu, 15 Jun 2017 20:05:53 +0000 (22:05 +0200)]
network: clear whole networks

When users specify

lxc.network.<n>

we remove the whole network from the networks list.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agonetwork: implement network clearing
Christian Brauner [Thu, 15 Jun 2017 17:14:00 +0000 (19:14 +0200)]
network: implement network clearing

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agonetwork: abstract network handling
Christian Brauner [Thu, 15 Jun 2017 15:22:17 +0000 (17:22 +0200)]
network: abstract network handling

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agonetwork: add arg to config clear method
Christian Brauner [Thu, 15 Jun 2017 17:08:22 +0000 (19:08 +0200)]
network: add arg to config clear method

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agonetwork: add lxc_log_configured_netdevs()
Christian Brauner [Wed, 14 Jun 2017 14:32:27 +0000 (16:32 +0200)]
network: add lxc_log_configured_netdevs()

This logs the configured networks on the trace level to support debugging.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agonetwork: use new network configuration parser
Christian Brauner [Wed, 14 Jun 2017 13:53:41 +0000 (15:53 +0200)]
network: use new network configuration parser

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agonetwork: perform network validation at creation time
Christian Brauner [Wed, 14 Jun 2017 11:53:23 +0000 (13:53 +0200)]
network: perform network validation at creation time

Some of the checks were previously performed when parsing the network config.
But since we allow for a little more flexibility now it doesn't work anymore.
Instead, let's validate the network at creation time.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agonetwork: implement lxc_get_netdev_by_idx()
Christian Brauner [Wed, 14 Jun 2017 11:42:27 +0000 (13:42 +0200)]
network: implement lxc_get_netdev_by_idx()

lxc_get_netdev_by_idx() takes care of checking whether a given netdev struct
for a given index is already allocated. If so it returns a pointer to it to the
caller.
If it doesn't find it it will allocate a new netdev struct and insert it into
the network list at the right position. For example, let's say you have the
following networks defined in your config file:

lxc.network.0.type=veth
lxc.network.0.link=lxcbr0
lxc.network.0.name=eth0
lxc.network.0.flags=up

lxc.network.3.type=veth
lxc.network.3.link=lxcbr0
lxc.network.3.name=eth1
lxc.network.3.flags=up
lxc.network.3.hwaddr = 00:16:3e:5d:7d:65

lxc.network.1.type=veth
lxc.network.1.link=lxcbr0
lxc.network.1.name=eth0
lxc.network.1.flags=up

lxc_get_netdev_by_idx() will take care that the internal network list appears
in the order:

0
1
3

The ordering of the keys themselves can also be random, meaning you could do:

lxc.network.3.type=veth
lxc.network.0.link=lxcbr0
lxc.network.0.name=eth0
lxc.network.3.hwaddr = 00:16:3e:5d:7d:65
lxc.network.0.flags=up
lxc.network.3.flags=up
lxc.network.0.type=veth
lxc.network.3.link=lxcbr0
lxc.network.3.name=eth1

and lxc_get_netdev_by_idx() would still figure out the correct ordering since
it keeps track of the index.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agonetwork: add network counter
Christian Brauner [Tue, 13 Jun 2017 22:42:06 +0000 (00:42 +0200)]
network: add network counter

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agonetwork: add data arg to set callback
Christian Brauner [Tue, 13 Jun 2017 22:39:35 +0000 (00:39 +0200)]
network: add data arg to set callback

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agonetwork: mv config_value_empty() to confile_utils
Christian Brauner [Tue, 13 Jun 2017 11:48:04 +0000 (13:48 +0200)]
network: mv config_value_empty() to confile_utils

and rename it to lxc_config_value_empty()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoMerge pull request #1627 from brauner/2017-06-15/fix_new_logging_api
Serge Hallyn [Fri, 16 Jun 2017 04:50:36 +0000 (23:50 -0500)]
Merge pull request #1627 from brauner/2017-06-15/fix_new_logging_api

tree-wide: priority -> level

7 years agotree-wide: priority -> level
Christian Brauner [Thu, 15 Jun 2017 10:13:04 +0000 (12:13 +0200)]
tree-wide: priority -> level

When we merged the new logging function for the api we exposed the log level
argument in the struct as "priority" which we actually requested to be changed
to "level" which somehow didn't happen and we missed it. Given the fact there
has been no new liblxc release let's fix it right now before it hits users.
Also, take the chance to change the terminology in the log from "priority" to
"level" globally. This is to prevent confusion with syslog's "priority"
argument which we also support.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoMerge pull request #1618 from brauner/2017-06-06/kill_lxc_monitord
Serge Hallyn [Tue, 13 Jun 2017 05:34:47 +0000 (00:34 -0500)]
Merge pull request #1618 from brauner/2017-06-06/kill_lxc_monitord

start: kill lxc-monitord

7 years agotests: don't fail when no processes for user exist
Christian Brauner [Mon, 12 Jun 2017 14:06:17 +0000 (16:06 +0200)]
tests: don't fail when no processes for user exist

Since we kicked lxc-monitord there will very likely be no user processes around
anymore after all container's have been stopped. Which is a very very very good
thing. So let's not error out when pkill doesn't find any processes.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconf: fix wrong path on overlayfs
Christian Brauner [Mon, 12 Jun 2017 09:18:05 +0000 (11:18 +0200)]
conf: fix wrong path on overlayfs

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agolxccontainer: cleanup + bugfixes
Christian Brauner [Sun, 11 Jun 2017 04:33:06 +0000 (06:33 +0200)]
lxccontainer: cleanup + bugfixes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years ago{start,lxccontainer}: add lxc_free_handler()
Christian Brauner [Sun, 11 Jun 2017 03:44:52 +0000 (05:44 +0200)]
{start,lxccontainer}: add lxc_free_handler()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocommands: add lxc_cmd_state_server()
Christian Brauner [Sat, 10 Jun 2017 23:29:45 +0000 (01:29 +0200)]
commands: add lxc_cmd_state_server()

A LXC container's lifecycle is regulated by the states STARTING, RUNNING,
STOPPING, STOPPED, ABORTING. These states are tracked in the LXC handler and
can be checked via approriate functions in the command socket callback system.
(The freezer stages are not part of a container's lifecycle since they are not
recorded in the LXC handler. This might change in the future but given that the
freezer controller will be removed from future cgroup implementations it is
unlikely.) So far, LXC was using an external helper to track the states of a
container (lxc-monitord). This solution was error prone. For example, the
external state server would hang in various scenarios that seemed to be caused
by either very subtle internal races or irritation of the external state server
by signals.

LXC will switch from an external state monitor (lxc-monitord) which serves as a
state server for state clients to a native implementation using the indiviual
container's command socket. This solution was discussed and outlined by Stéphane
Graber and Christian Brauner during a LX{C,D} sprint.

The LXC handler will gain an additional field to track state clients. In order
for a state client to receive state notifications from the command server he
will need to register himself via the lxc_cmd_state_server() function in the
state client list. The state client list will be served by lxc_set_state()
during the container's lifecycle. lxc_set_state() will also take care of
removing any clients from the state list in the LXC handler once the requested
state has been reached and sent to the client.
In order to prevent races between adding and serving new state clients the state
client list and the state field in the LXC handler will be protected by a lock.

This commit effectively deprecates lxc-monitord. Instead of serving states to
state clients via the lxc-monitord fifo and socket we will now send the state
of the container via the container's command socket.
lxc-monitord is still useable and will - for the sake of the lxc-monitor
command - be kept around so that non-API state clients can still monitor the
container during it's lifecycle.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoMerge pull request #1621 from leitao/master
Stéphane Graber [Tue, 13 Jun 2017 03:24:34 +0000 (23:24 -0400)]
Merge pull request #1621 from leitao/master

lxc-alpine: Add support for ppc64le

7 years agocommands: add TRACE()ers
Christian Brauner [Fri, 9 Jun 2017 15:20:20 +0000 (17:20 +0200)]
commands: add TRACE()ers

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agolxccontainer: only spawn monitord on demand
Christian Brauner [Thu, 8 Jun 2017 22:12:32 +0000 (00:12 +0200)]
lxccontainer: only spawn monitord on demand

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agostart: add lxc_init_handler()
Christian Brauner [Wed, 7 Jun 2017 20:23:56 +0000 (22:23 +0200)]
start: add lxc_init_handler()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoMerge pull request #1615 from 0x0916/expose-lxc_log_init
Christian Brauner [Mon, 12 Jun 2017 22:51:41 +0000 (00:51 +0200)]
Merge pull request #1615 from 0x0916/expose-lxc_log_init

API: expose function lxc_log_init

7 years agolxc-alpine: Add support for ppc64le
Breno Leitao [Mon, 12 Jun 2017 18:45:52 +0000 (13:45 -0500)]
lxc-alpine: Add support for ppc64le

Starting at version 3.6, Alpine Linux has support for ppc64le
architecture. Adding the new keys also.

Signed-off-by: Breno Leitao <breno.leitao@gmail.com>
7 years agoMerge pull request #1588 from brauner/2017-05-26/update_opensuse_template
Stéphane Graber [Tue, 6 Jun 2017 22:47:29 +0000 (16:47 -0600)]
Merge pull request #1588 from brauner/2017-05-26/update_opensuse_template

lxc-opensuse: add Tumbleweed as supported release

7 years agoMerge pull request #1578 from 0x0916/export-seccomp-filter-to-log
Christian Brauner [Tue, 6 Jun 2017 05:09:26 +0000 (23:09 -0600)]
Merge pull request #1578 from 0x0916/export-seccomp-filter-to-log

seccomp: export the seccomp filter after load it into kernel successful

7 years agoAPI: expose function lxc_log_init
0x0916 [Mon, 5 Jun 2017 06:31:03 +0000 (14:31 +0800)]
API: expose function lxc_log_init

Signed-off-by: 0x0916 <w@laoqinren.net>
7 years agoseccomp: export the seccomp filter after load it into kernel successful
0x0916 [Sat, 20 May 2017 02:49:06 +0000 (10:49 +0800)]
seccomp: export the seccomp filter after load it into kernel successful

when the log level is TRACE, this patch export the seccomp
filter to log file.

the ouput of `seccomp_export_pfc()` is human readable and this feature
is useful for user to make sure their `seccomp configuration file` is
right.

Output for he default ubuntu container's seccomp filter is the
following:

```
      lxc-start ubuntu 20170520024159.412 INFO     lxc_apparmor - lsm/apparmor.c:apparmor_process_label_set:238 - changed apparmor profile to lxc-container-default-cgns
if ($arch == 3221225534)
  # filter for syscall "finit_module" (313) [priority: 65535]
  if ($syscall == 313)
    action ERRNO(1);
  # filter for syscall "open_by_handle_at" (304) [priority: 65535]
  if ($syscall == 304)
    action ERRNO(1);
  # filter for syscall "kexec_load" (246) [priority: 65535]
  if ($syscall == 246)
    action ERRNO(1);
  # filter for syscall "delete_module" (176) [priority: 65535]
  if ($syscall == 176)
    action ERRNO(1);
  # filter for syscall "init_module" (175) [priority: 65535]
  if ($syscall == 175)
    action ERRNO(1);
  # filter for syscall "umount2" (166) [priority: 65533]
  if ($syscall == 166)
    if ($a1.hi32 & 0x00000000 == 0)
      if ($a1.lo32 & 0x00000001 == 1)
        action ERRNO(13);
  # default action
  action ALLOW;
if ($arch == 1073741827)
  # filter for syscall "finit_module" (350) [priority: 65535]
  if ($syscall == 350)
    action ERRNO(1);
  # filter for syscall "open_by_handle_at" (342) [priority: 65535]
  if ($syscall == 342)
    action ERRNO(1);
  # filter for syscall "kexec_load" (283) [priority: 65535]
  if ($syscall == 283)
    action ERRNO(1);
  # filter for syscall "delete_module" (129) [priority: 65535]
  if ($syscall == 129)
    action ERRNO(1);
  # filter for syscall "init_module" (128) [priority: 65535]
  if ($syscall == 128)
    action ERRNO(1);
  # filter for syscall "umount2" (52) [priority: 65534]
  if ($syscall == 52)
    if ($a1 & 0x00000001 == 1)
      action ERRNO(13);
  # default action
  action ALLOW;
if ($arch == 3221225534)
  # filter for syscall "kexec_load" (1073742352) [priority: 65535]
  if ($syscall == 1073742352)
    action ERRNO(1);
  # filter for syscall "finit_module" (1073742137) [priority: 65535]
  if ($syscall == 1073742137)
    action ERRNO(1);
  # filter for syscall "open_by_handle_at" (1073742128) [priority: 65535]
  if ($syscall == 1073742128)
    action ERRNO(1);
  # filter for syscall "delete_module" (1073742000) [priority: 65535]
  if ($syscall == 1073742000)
    action ERRNO(1);
  # filter for syscall "init_module" (1073741999) [priority: 65535]
  if ($syscall == 1073741999)
    action ERRNO(1);
  # filter for syscall "umount2" (1073741990) [priority: 65534]
  if ($syscall == 1073741990)
    if ($a1 & 0x00000001 == 1)
      action ERRNO(13);
  # default action
  action ALLOW;
action KILL;
      lxc-start ubuntu 20170520024159.412 NOTICE   lxc_start - start.c:start:1470 - Exec'ing "/sbin/init".
```

Signed-off-by: 0x0916 <w@laoqinren.net>
7 years agoMerge pull request #1613 from brauner/2017-06-03/af_unix
Stéphane Graber [Mon, 5 Jun 2017 23:52:46 +0000 (19:52 -0400)]
Merge pull request #1613 from brauner/2017-06-03/af_unix

abstract lxc_abstract_unix_{send,recv}_fd, bugfixes, and improvements

7 years agolxc-opensuse: add Tumbleweed as supported release
Christian Brauner [Sat, 27 May 2017 00:52:35 +0000 (02:52 +0200)]
lxc-opensuse: add Tumbleweed as supported release

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoMerge pull request #1611 from brauner/2017-06-02/enforce_config_item_method_implement...
Stéphane Graber [Mon, 5 Jun 2017 23:30:00 +0000 (19:30 -0400)]
Merge pull request #1611 from brauner/2017-06-02/enforce_config_item_method_implementation

tests: enforce all methods for config items being implemented

7 years agoconf: fix bionic builds
Christian Brauner [Mon, 5 Jun 2017 21:41:59 +0000 (23:41 +0200)]
conf: fix bionic builds

bionic seems to lack a definition of __S_ISTYPE().

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconf: improve lxc_map_ids()
Christian Brauner [Mon, 5 Jun 2017 21:37:25 +0000 (23:37 +0200)]
conf: improve lxc_map_ids()

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

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconf: improve tty shifting function
Christian Brauner [Sun, 4 Jun 2017 20:33:48 +0000 (22:33 +0200)]
conf: improve tty shifting function

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agobdev: record output from mkfs.*
Christian Brauner [Sun, 4 Jun 2017 16:01:41 +0000 (18:01 +0200)]
bdev: record output from mkfs.*

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agobdev: non-functional changes
Christian Brauner [Sun, 4 Jun 2017 14:45:12 +0000 (16:45 +0200)]
bdev: non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agodoc: tweak lxc.container.conf a little
Christian Brauner [Sun, 4 Jun 2017 13:22:20 +0000 (15:22 +0200)]
doc: tweak lxc.container.conf a little

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agobdev: "detect" loop file
Christian Brauner [Sun, 4 Jun 2017 11:59:34 +0000 (13:59 +0200)]
bdev: "detect" loop file

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconf: remove dead mount code
Christian Brauner [Sun, 4 Jun 2017 11:25:23 +0000 (13:25 +0200)]
conf: remove dead mount code

The removed codepath was non-functional for a long time now. All mounting is
handled through bdev.{c,h} and if that fails the other codepath would
necessarily fail as well. So let's remove them. This makes it way clearer what
is going on and simplifies things massively.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoaf_unix: abstract lxc_abstract_unix_{send,recv}_fd
Christian Brauner [Sun, 4 Jun 2017 05:04:27 +0000 (07:04 +0200)]
af_unix: abstract lxc_abstract_unix_{send,recv}_fd

- Enable lxc_abstract_unix_{send,recv}_fd() to send and receive multiple fds at
  once.
- lxc_abstract_unix_{send,recv}_fd() -> lxc_abstract_unix_{send,recv}_fds()
- Send tty fds from child to parent all at once.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoMerge pull request #1612 from brauner/2017-06-03/bugfixes
Stéphane Graber [Sat, 3 Jun 2017 23:13:11 +0000 (19:13 -0400)]
Merge pull request #1612 from brauner/2017-06-03/bugfixes

idmapping bugfixes

7 years agotree-wide: log function called in userns_exec_1()
Christian Brauner [Sat, 3 Jun 2017 21:35:07 +0000 (23:35 +0200)]
tree-wide: log function called in userns_exec_1()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconf: avoid double-frees in userns_exec_1()
Christian Brauner [Sat, 3 Jun 2017 18:28:13 +0000 (20:28 +0200)]
conf: avoid double-frees in userns_exec_1()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconf: non-functional changes
Christian Brauner [Sat, 3 Jun 2017 17:14:45 +0000 (19:14 +0200)]
conf: non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agostart: log sending and receiving of tty fds
Christian Brauner [Thu, 1 Jun 2017 03:40:59 +0000 (05:40 +0200)]
start: log sending and receiving of tty fds

This is a potentially security sensitive operation and I really want to keep an
eye on *when exactly* this is send. So add more logging on the TRACE() level.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoMerge pull request #1609 from brauner/2017-06-01/unit_test_idmap_parser
Stéphane Graber [Sat, 3 Jun 2017 00:43:38 +0000 (20:43 -0400)]
Merge pull request #1609 from brauner/2017-06-01/unit_test_idmap_parser

unit test idmap parser + userns_exec_1() rework

7 years agoMerge pull request #1608 from ss1h2a3tw/checkconfig
Christian Brauner [Fri, 2 Jun 2017 23:21:16 +0000 (17:21 -0600)]
Merge pull request #1608 from ss1h2a3tw/checkconfig

add probe status checking

7 years agoconf: rework userns_exec_1()
Christian Brauner [Fri, 2 Jun 2017 22:39:50 +0000 (00:39 +0200)]
conf: rework userns_exec_1()

This also fixes a bug where we caused a double mapping, when the {u,g}id for
the user was mapped to container root {g,u}id.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconf: non-functional changes
Christian Brauner [Fri, 2 Jun 2017 22:39:28 +0000 (00:39 +0200)]
conf: non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agotests: add unit tests for idmap parser
Christian Brauner [Thu, 1 Jun 2017 21:43:34 +0000 (23:43 +0200)]
tests: add unit tests for idmap parser

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile_utils: add new file
Christian Brauner [Thu, 1 Jun 2017 21:43:16 +0000 (23:43 +0200)]
confile_utils: add new file

This adds confile_utils.{c,h} which will contain a helpers to parse lxc
configuration files.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoadd probe status checking
Shane Chen [Thu, 1 Jun 2017 16:14:01 +0000 (00:14 +0800)]
add probe status checking

Signed-off-by: Shane Chen <ss1ha3tw@gmail.com>
7 years agotests: enforce all methods for config items
Christian Brauner [Fri, 2 Jun 2017 00:42:42 +0000 (02:42 +0200)]
tests: enforce all methods for config items

This adds a test that checks LXC's configuration jump table whether all methods
for a given configuration item are implemented. If it is not, we'll error out.
This should provide additional safety since a) the API can now be sure that
dereferencing the pointer for a given method in the config struct is safe and
b) when users implement new configuration keys and forget to implement a
required method we'll see it right away.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: add dummy getter for lxc.include
Christian Brauner [Fri, 2 Jun 2017 00:42:19 +0000 (02:42 +0200)]
confile: add dummy getter for lxc.include

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoMerge pull request #1592 from brauner/2017-05-28/idmap_handling
Serge Hallyn [Thu, 1 Jun 2017 22:29:55 +0000 (17:29 -0500)]
Merge pull request #1592 from brauner/2017-05-28/idmap_handling

idmap improvements

7 years agoMerge pull request #1599 from brauner/2017-05-30/use_minimal_idmap_set
Serge Hallyn [Thu, 1 Jun 2017 22:12:58 +0000 (17:12 -0500)]
Merge pull request #1599 from brauner/2017-05-30/use_minimal_idmap_set

conf: use minimal {g,u}id map

7 years agoconf: use minimal {g,u}id map
Christian Brauner [Mon, 29 May 2017 09:21:29 +0000 (11:21 +0200)]
conf: use minimal {g,u}id map

Afaict, userns_exec_1() is only used to operate based on privileges for the
user's own {g,u}id on the host and for the container root's unmapped {g,u}id.
This means we require only to establish a mapping from:
- the container root {g,u}id as seen from the host -> user's host {g,u}id
- the container root -> some sub{g,u}id

The former we add, if the user did not specifiy a mapping. The latter we
retrieve from the ontainer's configured {g,u}id mappings.

Closes #1598.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoMerge pull request #1596 from brauner/2017-05-29/fix_parsing
Serge Hallyn [Thu, 1 Jun 2017 21:17:11 +0000 (16:17 -0500)]
Merge pull request #1596 from brauner/2017-05-29/fix_parsing

confile: fix parsing

7 years agoMerge pull request #1607 from ss1h2a3tw/master
Christian Brauner [Thu, 1 Jun 2017 10:25:09 +0000 (20:25 +1000)]
Merge pull request #1607 from ss1h2a3tw/master

adding warning for mtu ignoring

7 years agoadding warning for mtu ignoring
Shane Chen [Thu, 1 Jun 2017 05:36:41 +0000 (13:36 +0800)]
adding warning for mtu ignoring

Signed-off-by: Shane Chen <ss1ha3tw@gmail.com>
7 years agotests: comp retval to exp val whenever we can
Christian Brauner [Thu, 1 Jun 2017 02:10:00 +0000 (04:10 +0200)]
tests: comp retval to exp val whenever we can

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: performance tweaks
Christian Brauner [Thu, 1 Jun 2017 02:09:43 +0000 (04:09 +0200)]
confile: performance tweaks

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoMerge pull request #1605 from decomposite/systemd_unit_stop
Christian Brauner [Wed, 31 May 2017 22:40:40 +0000 (08:40 +1000)]
Merge pull request #1605 from decomposite/systemd_unit_stop

Use lxc-stop to stop systemd service

7 years agoUse lxc-stop to stop systemd service
JD Friedrikson [Wed, 31 May 2017 16:41:41 +0000 (12:41 -0400)]
Use lxc-stop to stop systemd service

Ever since 8eb62c2, systemd has not been able to cleanly stop lxc
containers (via lxc@) because it's still using SIGPWR for systemd-based
containers.

We should now use the nice logic in 330ae3d to stop the containers
instead.

Signed-off-by: JD Friedrikson <yours@decompo.site>
7 years agoMerge pull request #1601 from brauner/2017-05-30/veth_fixes
Stéphane Graber [Wed, 31 May 2017 17:17:36 +0000 (13:17 -0400)]
Merge pull request #1601 from brauner/2017-05-30/veth_fixes

network: don't delete net devs we didn't create

7 years agolxccontainer: switch api to new clearer callbacks
Christian Brauner [Wed, 31 May 2017 16:59:29 +0000 (18:59 +0200)]
lxccontainer: switch api to new clearer callbacks

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: add clearer for lxc.include
Christian Brauner [Wed, 31 May 2017 16:45:51 +0000 (18:45 +0200)]
confile: add clearer for lxc.include

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: add clearer for lxc.include
Christian Brauner [Wed, 31 May 2017 16:36:03 +0000 (18:36 +0200)]
confile: add clearer for lxc.include

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: add clearer for lxc.limit{.*}
Christian Brauner [Wed, 31 May 2017 16:33:08 +0000 (18:33 +0200)]
confile: add clearer for lxc.limit{.*}

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: add clearer for lxc.no_new_privs
Christian Brauner [Wed, 31 May 2017 16:31:20 +0000 (18:31 +0200)]
confile: add clearer for lxc.no_new_privs

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: add clearer for lxc.ephemeral
Christian Brauner [Wed, 31 May 2017 16:30:10 +0000 (18:30 +0200)]
confile: add clearer for lxc.ephemeral

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: add clearer for lxc.init_gid
Christian Brauner [Wed, 31 May 2017 16:28:57 +0000 (18:28 +0200)]
confile: add clearer for lxc.init_gid

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: add clearer for lxc.init_uid
Christian Brauner [Wed, 31 May 2017 16:28:01 +0000 (18:28 +0200)]
confile: add clearer for lxc.init_uid

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: add clearer for lxc.init_cmd
Christian Brauner [Wed, 31 May 2017 16:26:55 +0000 (18:26 +0200)]
confile: add clearer for lxc.init_cmd

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: add clearer for lxc.environment
Christian Brauner [Wed, 31 May 2017 16:25:51 +0000 (18:25 +0200)]
confile: add clearer for lxc.environment

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: add clearer for lxc.group
Christian Brauner [Wed, 31 May 2017 16:23:36 +0000 (18:23 +0200)]
confile: add clearer for lxc.group

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: add clearer for lxc.monitor.unshare
Christian Brauner [Wed, 31 May 2017 16:22:27 +0000 (18:22 +0200)]
confile: add clearer for lxc.monitor.unshare

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: add clearer for lxc.syslog
Christian Brauner [Wed, 31 May 2017 16:21:20 +0000 (18:21 +0200)]
confile: add clearer for lxc.syslog

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: add clearer for lxc.start.*
Christian Brauner [Wed, 31 May 2017 16:19:23 +0000 (18:19 +0200)]
confile: add clearer for lxc.start.*

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: add clearer for lxc.stopsignal
Christian Brauner [Wed, 31 May 2017 16:14:50 +0000 (18:14 +0200)]
confile: add clearer for lxc.stopsignal

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: add clearer for lxc.rebootsignal
Christian Brauner [Wed, 31 May 2017 16:13:50 +0000 (18:13 +0200)]
confile: add clearer for lxc.rebootsignal

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: add clearer for lxc.haltsignal
Christian Brauner [Wed, 31 May 2017 16:12:45 +0000 (18:12 +0200)]
confile: add clearer for lxc.haltsignal

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: add clearer for lxc.autodev
Christian Brauner [Wed, 31 May 2017 16:11:08 +0000 (18:11 +0200)]
confile: add clearer for lxc.autodev

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: add clearer for lxc.seccomp
Christian Brauner [Wed, 31 May 2017 16:09:24 +0000 (18:09 +0200)]
confile: add clearer for lxc.seccomp

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: add clearer for lxc.console.logfile
Christian Brauner [Wed, 31 May 2017 16:08:13 +0000 (18:08 +0200)]
confile: add clearer for lxc.console.logfile

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: add clearer for lxc.console
Christian Brauner [Wed, 31 May 2017 16:06:54 +0000 (18:06 +0200)]
confile: add clearer for lxc.console

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: add clearer for lxc.cap.keep
Christian Brauner [Wed, 31 May 2017 16:05:13 +0000 (18:05 +0200)]
confile: add clearer for lxc.cap.keep

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: add clearer for lxc.cap.drop
Christian Brauner [Wed, 31 May 2017 16:03:38 +0000 (18:03 +0200)]
confile: add clearer for lxc.cap.drop

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: add clearer for lxc.network
Christian Brauner [Wed, 31 May 2017 16:02:08 +0000 (18:02 +0200)]
confile: add clearer for lxc.network

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: add clearer for lxc.network.*
Christian Brauner [Wed, 31 May 2017 16:00:40 +0000 (18:00 +0200)]
confile: add clearer for lxc.network.*

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: add clearer for lxc.hook{.*}
Christian Brauner [Wed, 31 May 2017 15:57:57 +0000 (17:57 +0200)]
confile: add clearer for lxc.hook{.*}

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: add clearer for lxc.utsname
Christian Brauner [Wed, 31 May 2017 15:54:53 +0000 (17:54 +0200)]
confile: add clearer for lxc.utsname

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: add dummy clearer for lxc.pivotdir
Christian Brauner [Wed, 31 May 2017 15:52:17 +0000 (17:52 +0200)]
confile: add dummy clearer for lxc.pivotdir

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: add clearer for lxc.rootfs.backend
Christian Brauner [Wed, 31 May 2017 15:50:59 +0000 (17:50 +0200)]
confile: add clearer for lxc.rootfs.backend

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: add clearer for lxc.rootfs.options
Christian Brauner [Wed, 31 May 2017 15:49:39 +0000 (17:49 +0200)]
confile: add clearer for lxc.rootfs.options

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: add clearer for lxc.rootfs.mount
Christian Brauner [Wed, 31 May 2017 15:48:14 +0000 (17:48 +0200)]
confile: add clearer for lxc.rootfs.mount

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: add clearer for lxc.rootfs
Christian Brauner [Wed, 31 May 2017 15:46:06 +0000 (17:46 +0200)]
confile: add clearer for lxc.rootfs

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: add clearer for lxc.mount
Christian Brauner [Wed, 31 May 2017 13:20:55 +0000 (15:20 +0200)]
confile: add clearer for lxc.mount

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