]> git.ipfire.org Git - thirdparty/lxc.git/log
thirdparty/lxc.git
8 years agoconfile: lxc.seccomp --> lxc.seccomp.profile 1665/head
Christian Brauner [Sun, 2 Jul 2017 10:56:01 +0000 (12:56 +0200)] 
confile: lxc.seccomp --> lxc.seccomp.profile

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agoconfile: lxc.pts --> lxc.pty.max
Christian Brauner [Sun, 2 Jul 2017 10:49:29 +0000 (12:49 +0200)] 
confile: lxc.pts --> lxc.pty.max

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agoconfile: lxc.tty --> lxc.tty.max
Christian Brauner [Sun, 2 Jul 2017 10:37:33 +0000 (12:37 +0200)] 
confile: lxc.tty --> lxc.tty.max

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agoconfile: lxc.net.ipv6 --> lxc.net.ipv6.address
Christian Brauner [Sun, 2 Jul 2017 09:54:27 +0000 (11:54 +0200)] 
confile: lxc.net.ipv6 --> lxc.net.ipv6.address

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agoconfile: lxc.net.ipv4 --> lxc.net.ipv4.address
Christian Brauner [Sun, 2 Jul 2017 09:53:34 +0000 (11:53 +0200)] 
confile: lxc.net.ipv4 --> lxc.net.ipv4.address

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agoconfile: lxc.mount --> lxc.mount.fstab
Christian Brauner [Sun, 2 Jul 2017 09:37:32 +0000 (11:37 +0200)] 
confile: lxc.mount --> lxc.mount.fstab

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agoconfile: lxc.console --> lxc.console.path
Christian Brauner [Sun, 2 Jul 2017 09:35:00 +0000 (11:35 +0200)] 
confile: lxc.console --> lxc.console.path

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agoconfile: lxc.rootfs --> lxc.rootfs.path
Christian Brauner [Sun, 2 Jul 2017 00:21:08 +0000 (02:21 +0200)] 
confile: lxc.rootfs --> lxc.rootfs.path

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agodoc: remove lxc.rootfs.backend
Christian Brauner [Sun, 2 Jul 2017 00:10:11 +0000 (02:10 +0200)] 
doc: remove lxc.rootfs.backend

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agotest: fix tests
Christian Brauner [Sat, 1 Jul 2017 23:19:55 +0000 (01:19 +0200)] 
test: fix tests

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agostorage: handle prefixed rootfs paths
Christian Brauner [Sat, 1 Jul 2017 23:44:25 +0000 (01:44 +0200)] 
storage: handle prefixed rootfs paths

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agostorage: prefix all zfs paths
Christian Brauner [Sat, 1 Jul 2017 21:41:49 +0000 (23:41 +0200)] 
storage: prefix all zfs paths

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agostorage: prefix all rbd paths
Christian Brauner [Sat, 1 Jul 2017 21:35:58 +0000 (23:35 +0200)] 
storage: prefix all rbd paths

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agostorage: prefix all nbd paths
Christian Brauner [Sat, 1 Jul 2017 21:33:18 +0000 (23:33 +0200)] 
storage: prefix all nbd paths

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agostorage: prefix all lvm paths
Christian Brauner [Sat, 1 Jul 2017 21:31:18 +0000 (23:31 +0200)] 
storage: prefix all lvm paths

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agostorage: prefix all btrfs paths
Christian Brauner [Sat, 1 Jul 2017 21:02:45 +0000 (23:02 +0200)] 
storage: prefix all btrfs paths

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agostorage: prefix all dir paths
Christian Brauner [Sat, 1 Jul 2017 20:36:27 +0000 (22:36 +0200)] 
storage: prefix all dir paths

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agostorage: add lxc_storage_get_path()
Christian Brauner [Sat, 1 Jul 2017 20:36:05 +0000 (22:36 +0200)] 
storage: add lxc_storage_get_path()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agostorage: add storage_utils.{c.h}
Christian Brauner [Sat, 1 Jul 2017 16:15:59 +0000 (18:15 +0200)] 
storage: add storage_utils.{c.h}

non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agostorage: deprecate lxc.rootfs.backend
Christian Brauner [Sat, 1 Jul 2017 15:02:13 +0000 (17:02 +0200)] 
storage: deprecate lxc.rootfs.backend

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agoMerge pull request #1591 from grzgrzgrz3/regres-lxc-ls
Christian Brauner [Sun, 2 Jul 2017 12:31:03 +0000 (14:31 +0200)] 
Merge pull request #1591 from grzgrzgrz3/regres-lxc-ls

lxc-ls: return all containers by default, new filter - list only defi…

8 years agoMerge pull request #1664 from d4s/altlinux-template
Stéphane Graber [Sun, 2 Jul 2017 06:06:35 +0000 (02:06 -0400)] 
Merge pull request #1664 from d4s/altlinux-template

Added '--apt-conf' argument for ALTLinux template.

8 years agoAdded '--apt-conf' argument for ALTLinux template. 1664/head
Denis Pynkin [Sat, 1 Jul 2017 14:30:17 +0000 (17:30 +0300)] 
Added '--apt-conf' argument for ALTLinux template.

Added [-a|--apt-conf] parameter for selection of exact package
providing 'apt-conf'. By default 'apt-conf-sisyphus' is used for
Sisyphus and 'apt-conf-branch' for the rest of branches.

Signed-off-by: Denis Pynkin <denis.pynkin@collabora.com>
8 years agoMerge pull request #1658 from 0x0916/2017-06-30/new-configuration-keys
Christian Brauner [Sat, 1 Jul 2017 11:09:28 +0000 (13:09 +0200)] 
Merge pull request #1658 from 0x0916/2017-06-30/new-configuration-keys

new configuration keys

8 years agoMerge pull request #1661 from 0x0916/2017-07-01/fix-set-state-error
Christian Brauner [Sat, 1 Jul 2017 11:08:35 +0000 (13:08 +0200)] 
Merge pull request #1661 from 0x0916/2017-07-01/fix-set-state-error

start: send state to legacy lxc-monitord state server even if no state clients registered

8 years agostart: send state to legacy lxc-monitord state server even if no state clients registered 1661/head
0x0916 [Sat, 1 Jul 2017 05:44:41 +0000 (13:44 +0800)] 
start: send state to legacy lxc-monitord state server even if no state clients registered

This pr https://github.com/lxc/lxc/pull/1618 kill lxc-monitord, for backwards compatibility,
we also send state to legacy lxc-monitord state server in function `lxc_set_state`.

we should also send state if there is no state clients registered, otherwise `lxc-monitor` client will
not get state change event if container changed state to `STARTING` or `RUNNING`.

Signed-off-by: 0x0916 <w@laoqinren.net>
8 years agoMerge pull request #1662 from 0x0916/2017-07-01/lxc-monitor-quit
Christian Brauner [Sat, 1 Jul 2017 09:43:14 +0000 (11:43 +0200)] 
Merge pull request #1662 from 0x0916/2017-07-01/lxc-monitor-quit

lxc-monitord: exit when got a quit command

8 years agolxc-monitord: exit when got a quit command 1662/head
0x0916 [Sat, 1 Jul 2017 06:04:14 +0000 (14:04 +0800)] 
lxc-monitord: exit when got a quit command

lxc-monitor has an option to tell lxc-monitord to quit.

```
~/lxc (master) # lxc-monitor --help
lxc-monitor monitors the state of the NAME container

Options :
  -n, --name=NAME   NAME of the container
                    NAME may be a regular expression
  -Q, --quit        tell lxc-monitord to quit
```
But it does not work. This patch fix that.

Signed-off-by: 0x0916 <w@laoqinren.net>
8 years agoconfile: rename lxc.utsname to lxc.uts.name 1658/head
0x0916 [Wed, 28 Jun 2017 10:58:16 +0000 (18:58 +0800)] 
confile: rename lxc.utsname to lxc.uts.name

the legacy keys will be kept around until LXC 3.0 and then will be
removed.

Signed-off-by: 0x0916 <w@laoqinren.net>
8 years agoconfile: rename lxc.devttydir to lxc.tty.dir
0x0916 [Wed, 28 Jun 2017 10:44:18 +0000 (18:44 +0800)] 
confile: rename lxc.devttydir to lxc.tty.dir

the legacy keys will be kept around until LXC 3.0 and then will be
removed

Signed-off-by: 0x0916 <w@laoqinren.net>
8 years agoconfile: namespace lxc.signal keys
0x0916 [Wed, 28 Jun 2017 11:26:02 +0000 (19:26 +0800)] 
confile: namespace lxc.signal keys

* rename lxc.haltsignal to lxc.signal.halt
* rename lxc.rebootsignal to lxc.signal.reboot
* rename lxc.stopsignal to lxc.signal.stop

the legacy keys will be kept around until LXC 3.0 and then will be
removed.

Signed-off-by: 0x0916 <w@laoqinren.net>
8 years agoconfile: namespace lxc.log keys
0x0916 [Wed, 28 Jun 2017 09:30:41 +0000 (17:30 +0800)] 
confile: namespace lxc.log keys

* rename lxc.logfile to lxc.log.file
* renaem lxc.loglevel to lxc.log.level
* rename lxc.syslog to lxc.log.syslog

the legacy keys will be kept around until LXC 3.0 and then will be
removed.

Signed-off-by: 0x0916 <w@laoqinren.net>
8 years agoconfile: namespace lxc.init keys
0x0916 [Wed, 28 Jun 2017 08:32:04 +0000 (16:32 +0800)] 
confile: namespace lxc.init keys

* rename lxc.init_cmd to lxc.init.cmd
* rename lxc.init_uid to lxc.init.uid
* rename lxc.init_gid to lxc.init.gid

the legacy keys will be kept around until LXC 3.0 and then will be
removed.

Signed-off-by: 0x0916 <w@laoqinren.net>
8 years agoconfile: rename lxc.limit to lxc.prlimit
0x0916 [Wed, 28 Jun 2017 08:14:14 +0000 (16:14 +0800)] 
confile: rename lxc.limit to lxc.prlimit

Signed-off-by: 0x0916 <w@laoqinren.net>
8 years agoMerge pull request #1649 from 0x0916/2017-06-27/wipe-lxc-network-references
Christian Brauner [Thu, 29 Jun 2017 11:17:59 +0000 (13:17 +0200)] 
Merge pull request #1649 from 0x0916/2017-06-27/wipe-lxc-network-references

wipe all references lxc.network.{[i]}.* and replace with lxc.net.[i].*

8 years agoconfile_legacy: fix lxc_clear_nic error 1649/head
0x0916 [Thu, 29 Jun 2017 03:48:35 +0000 (11:48 +0800)] 
confile_legacy: fix lxc_clear_nic error

`lxc_clear_nic` can not clear the nic, because it will not found
the right `netdev`.

testcase from get_item.c

```
313         if (!c->set_config_item(c, "lxc.network.hwaddr", "00:16:3e:xx:xx:xx")) {
314                 fprintf(stderr, "%d: failed to set network.hwaddr\n", __LINE__);
315                 goto out;
316         }
317         if (!c->set_config_item(c, "lxc.network.ipv4", "10.2.3.4")) {
318                 fprintf(stderr, "%d: failed to set ipv4\n", __LINE__);
319                 goto out;
320         }
321
322         ret = c->get_config_item(c, "lxc.network.0.ipv4", v2, 255);
323         if (ret <= 0) {
324                 fprintf(stderr, "%d: lxc.network.0.ipv4 returned %d\n", __LINE__, ret);
325                 goto out;
326         }
327         if (!c->clear_config_item(c, "lxc.network.0.ipv4")) {
328                 fprintf(stderr, "%d: failed clearing all ipv4 entries\n", __LINE__);
329                 goto out;
330         }
331         ret = c->get_config_item(c, "lxc.network.0.ipv4", v2, 255);
332         if (ret != 0) {
333                 fprintf(stderr, "%d: after clearing ipv4 entries get_item(lxc.network.0.ipv4 returned %d\n", __LINE__, ret);
334                 goto out;
335         }
```

line `327` will failed to clear nic, and line `333` give the error.

Signed-off-by: 0x0916 <w@laoqinren.net>
8 years agotestcase: define a network before checks
0x0916 [Wed, 28 Jun 2017 23:32:54 +0000 (07:32 +0800)] 
testcase: define a network before checks

Signed-off-by: 0x0916 <w@laoqinren.net>
8 years agoconfile_utils: supporting new net hwaddr key in update_hwaddr
0x0916 [Wed, 28 Jun 2017 02:59:39 +0000 (10:59 +0800)] 
confile_utils: supporting new net hwaddr key in update_hwaddr

Signed-off-by: 0x0916 <w@laoqinren.net>
8 years agoconfile: supporting new net hwaddr key in network_new_hwaddrs
0x0916 [Wed, 28 Jun 2017 02:58:29 +0000 (10:58 +0800)] 
confile: supporting new net hwaddr key in network_new_hwaddrs

Signed-off-by: 0x0916 <w@laoqinren.net>
8 years agoconfile_utils: add lxc_config_net_hwaddr
0x0916 [Wed, 28 Jun 2017 02:56:43 +0000 (10:56 +0800)] 
confile_utils: add lxc_config_net_hwaddr

`lxc_config_net_hwaddr` return true if the config entry
is `lxc.network.hwaddr` or `lxc.net.[i].hwaddr`, `lxc.network.[i].hwaddr`

Signed-off-by: 0x0916 <w@laoqinren.net>
8 years agoconfile: update comment: replace p+12 with p+8
0x0916 [Tue, 27 Jun 2017 03:38:23 +0000 (11:38 +0800)] 
confile: update comment: replace p+12 with p+8

Signed-off-by: 0x0916 <w@laoqinren.net>
8 years agoreplace all lxc.network* with lxc.net*
0x0916 [Mon, 26 Jun 2017 13:08:34 +0000 (21:08 +0800)] 
replace all lxc.network* with lxc.net*

This patch wipe all references to lxc.network{[i]}.*
and replace with lxc.net.{[i]}.* in templates, documentation
and configuration files.

Signed-off-by: 0x0916 <w@laoqinren.net>
8 years agoMerge pull request #1652 from 0x0916/2017-06-27/free-downscript
Christian Brauner [Tue, 27 Jun 2017 19:14:45 +0000 (21:14 +0200)] 
Merge pull request #1652 from 0x0916/2017-06-27/free-downscript

confile: free netdev->downscript

8 years agoconfile: free netdev->downscript 1652/head
0x0916 [Tue, 27 Jun 2017 14:12:38 +0000 (22:12 +0800)] 
confile: free netdev->downscript

Signed-off-by: 0x0916 <w@laoqinren.net>
8 years agoMerge pull request #1650 from 0x0916/2017-06-27/refactor-confile-code
Christian Brauner [Tue, 27 Jun 2017 08:43:35 +0000 (10:43 +0200)] 
Merge pull request #1650 from 0x0916/2017-06-27/refactor-confile-code

refactor confile code

8 years agorefactor confile code 1650/head
0x0916 [Tue, 27 Jun 2017 07:54:23 +0000 (15:54 +0800)] 
refactor confile code

Signed-off-by: 0x0916 <w@laoqinren.net>
8 years agoMerge pull request #1639 from brauner/2017-06-23/lxc_2_1_preparations
Serge Hallyn [Mon, 26 Jun 2017 14:13:47 +0000 (09:13 -0500)] 
Merge pull request #1639 from brauner/2017-06-23/lxc_2_1_preparations

confile: prepare for 2.1.

8 years agoMerge pull request #1648 from 0x0916/remove-__func__
Christian Brauner [Mon, 26 Jun 2017 12:29:23 +0000 (14:29 +0200)] 
Merge pull request #1648 from 0x0916/remove-__func__

remove the `__func__` macro

8 years agoMerge pull request #1647 from 0x0916/update-api-doc
Christian Brauner [Mon, 26 Jun 2017 10:03:42 +0000 (12:03 +0200)] 
Merge pull request #1647 from 0x0916/update-api-doc

API doc: update note for get_config_item

8 years agoremove the `__func__` macro 1648/head
0x0916 [Mon, 26 Jun 2017 09:55:12 +0000 (17:55 +0800)] 
remove the `__func__` macro

Our logging function will always spew out the function name.

Signed-off-by: 0x0916 <w@laoqinren.net>
8 years agoAPI doc: update note for get_config_item 1647/head
0x0916 [Mon, 26 Jun 2017 09:28:47 +0000 (17:28 +0800)] 
API doc: update note for get_config_item

Fix issue: https://github.com/lxc/lxc/issues/505

Signed-off-by: 0x0916 <w@laoqinren.net>
8 years agoMerge pull request #1644 from evgeni/centos-7
Christian Brauner [Sun, 25 Jun 2017 08:00:30 +0000 (10:00 +0200)] 
Merge pull request #1644 from evgeni/centos-7

default to CentOS 7

8 years agoMerge pull request #1643 from evgeni/aarch64
Christian Brauner [Sat, 24 Jun 2017 17:37:38 +0000 (19:37 +0200)] 
Merge pull request #1643 from evgeni/aarch64

templates/debian: add aarch64 → arm64 mapping

8 years agoMerge pull request #1645 from evgeni/centos-altarch
Christian Brauner [Sat, 24 Jun 2017 17:37:25 +0000 (19:37 +0200)] 
Merge pull request #1645 from evgeni/centos-altarch

use altarch mirror for CentOS on arches other than i386 and x86_64

8 years agouse altarch mirror for CentOS on arches other than i386 and x86_64 1645/head
Evgeni Golov [Sat, 24 Jun 2017 16:53:05 +0000 (18:53 +0200)] 
use altarch mirror for CentOS on arches other than i386 and x86_64

CentOS only has i386 and x86_64 listed in mirrorlist.centos.org,
use http://mirror.centos.org/altarch/ for all other arches instead

See: https://bugs.centos.org/view.php?id=11250

Signed-off-by: Evgeni Golov <evgeni@debian.org>
8 years agodefault to CentOS 7 1644/head
Evgeni Golov [Sat, 24 Jun 2017 16:56:22 +0000 (18:56 +0200)] 
default to CentOS 7

Signed-off-by: Evgeni Golov <evgeni@debian.org>
8 years agotemplates/debian: add aarch64 → arm64 mapping 1643/head
Evgeni Golov [Sat, 24 Jun 2017 15:24:49 +0000 (17:24 +0200)] 
templates/debian: add aarch64 → arm64 mapping

uname -m reports aarch64, but Debian calls the arch arm64

Signed-off-by: Evgeni Golov <evgeni@debian.org>
8 years agoMerge pull request #1635 from 0x0916/instead-of-strerror
Christian Brauner [Fri, 23 Jun 2017 16:10:46 +0000 (18:10 +0200)] 
Merge pull request #1635 from 0x0916/instead-of-strerror

Use strerror(errno) instead of %m

8 years agoMerge pull request #1640 from 0x0916/update-ignore-file
Christian Brauner [Fri, 23 Jun 2017 16:00:10 +0000 (18:00 +0200)] 
Merge pull request #1640 from 0x0916/update-ignore-file

update .gitignore

8 years agoupdate .gitignore 1640/head
0x0916 [Fri, 23 Jun 2017 15:17:29 +0000 (23:17 +0800)] 
update .gitignore

Signed-off-by: 0x0916 <w@laoqinren.net>
8 years agoUse strerror(errno) instead of %m 1635/head
0x0916 [Fri, 23 Jun 2017 11:41:34 +0000 (19:41 +0800)] 
Use strerror(errno) instead of %m

Signed-off-by: 0x0916 <w@laoqinren.net>
8 years agoconfile: remove lxc.pivotdir 1639/head
Christian Brauner [Fri, 23 Jun 2017 13:39:00 +0000 (15:39 +0200)] 
confile: remove lxc.pivotdir

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agoconfile: remove lxc.kmsg
Christian Brauner [Fri, 23 Jun 2017 13:38:02 +0000 (15:38 +0200)] 
confile: remove lxc.kmsg

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agoconfile: properly namespace security keys
Christian Brauner [Fri, 23 Jun 2017 13:35:17 +0000 (15:35 +0200)] 
confile: properly namespace security keys

- lxc.aa_profile => lxc.apparmor.profile
- lxc.aa_allow_incomplete => lxc.apparmor.allow_incomplete
- lxc.se_context => lxc.selinux.context

The legacy keys will be kept around until LXC 3.0 and then will be removed.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agoMerge pull request #1638 from 0x0916/fix-memory-resource-leak
Christian Brauner [Fri, 23 Jun 2017 13:34:15 +0000 (15:34 +0200)] 
Merge pull request #1638 from 0x0916/fix-memory-resource-leak

fix memory and resource leak

8 years agoMerge pull request #1637 from 0x0916/fix-lxc.pc
Christian Brauner [Fri, 23 Jun 2017 12:44:12 +0000 (14:44 +0200)] 
Merge pull request #1637 from 0x0916/fix-lxc.pc

Revert "Add a prefix to the lxc.pc"

8 years agofix memory and resource leak 1638/head
0x0916 [Fri, 23 Jun 2017 12:36:56 +0000 (20:36 +0800)] 
fix memory and resource leak

Signed-off-by: 0x0916 <w@laoqinren.net>
8 years agoRevert "Add a prefix to the lxc.pc" 1637/head
0x0916 [Fri, 23 Jun 2017 11:46:52 +0000 (19:46 +0800)] 
Revert "Add a prefix to the lxc.pc"

This reverts commit 758243d8af0406e63cc5446c65d415298fa3cef2.

Signed-off-by: 0x0916 <w@laoqinren.net>
8 years agoMerge pull request #1632 from brauner/2017-06-19/new_network_parser_part_deux
Serge Hallyn [Wed, 21 Jun 2017 15:30:58 +0000 (10:30 -0500)] 
Merge pull request #1632 from brauner/2017-06-19/new_network_parser_part_deux

network: new network parser part II

8 years agoMerge pull request #1633 from lifeng68/Fix_memory_leak
Christian Brauner [Wed, 21 Jun 2017 09:54:20 +0000 (11:54 +0200)] 
Merge pull request #1633 from lifeng68/Fix_memory_leak

Fix memory leak of 'lxc_tty_state'

8 years agoconfile: do not check for empty value twice 1632/head
Christian Brauner [Wed, 21 Jun 2017 09:13:57 +0000 (11:13 +0200)] 
confile: do not check for empty value twice

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agoFix memory leak of 'lxc_tty_state' 1633/head
Li Feng [Wed, 21 Jun 2017 05:38:06 +0000 (13:38 +0800)] 
Fix memory leak of 'lxc_tty_state'

Signed-off-by: Li Feng <lifeng68@huawei.com>
8 years agonetwork: test legacy index based networks
Christian Brauner [Tue, 20 Jun 2017 22:44:17 +0000 (00:44 +0200)] 
network: test legacy index based networks

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agonetwork: return negative idx for legacy networks
Christian Brauner [Tue, 20 Jun 2017 22:05:22 +0000 (00:05 +0200)] 
network: return negative idx for legacy networks

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agonetwork: test new network configuration parser
Christian Brauner [Tue, 20 Jun 2017 09:24:43 +0000 (11:24 +0200)] 
network: test new network configuration parser

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agonetwork: new network parser part II
Christian Brauner [Tue, 20 Jun 2017 09:16:13 +0000 (11:16 +0200)] 
network: new network parser part II

Serge and I discussed the new network parser we've merge a couple of days ago.
He pointed out that a bunch of use-cases we're currently supporting in the old
network parser would be broken by the new parser. As we've pointed out many
times before, we're strongly commited to backwards compatibility and not
breaking existing use-cases. That's why we decided to take a new approach.
Instead of trying to mangle the old parser and new parser to come up with
something that allows a smooth transition we will simply deprecate the old
configuration keys with LXC 3.0. In the meantime we will support the full-blown
old legacy parser and the new network parser. Specifically, this means that
we're deprecating:

    lxc.network.*

in favor of

    lxc.net.*

With LXC 2.1. defining networks using lxc.network.* keys will cause a
deprecation warning to be shown/logged. We strongly suggest that users upgrade
their existing configuration files to switch to the new network configuration
parser. Starting with LXC 3.0 we will remove all lxc.network.* keys and will
only support lxc.net.* style network configurations.

Note that the new network configuration parser will only accept index based
configuration keys, i.e. we are only support lxc.net.[i].* keys without an
index such as lxc.net.type are not supported anymore. The advantages of this
approach are vast. Not just internally, but also user-facing since it is much
clearer what configuration key belongs to what network.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agoMerge pull request #1631 from tenforward/japanese
Christian Brauner [Tue, 20 Jun 2017 08:46:42 +0000 (10:46 +0200)] 
Merge pull request #1631 from tenforward/japanese

Update Japanese lxc.container.conf(5)

8 years agodoc: Untabify Japanese lxc.container.conf(5) 1631/head
KATOH Yasufumi [Tue, 20 Jun 2017 08:36:30 +0000 (17:36 +0900)] 
doc: Untabify Japanese lxc.container.conf(5)

Tab and white space is mixed in Japanese lxc.container.conf(5), so
unify into the white space.

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
8 years agodoc: Tweak Japanese lxc.container.conf(5)
KATOH Yasufumi [Tue, 20 Jun 2017 08:28:49 +0000 (17:28 +0900)] 
doc: Tweak Japanese lxc.container.conf(5)

Add description of new network configuration, and tweak.

Update for commit b9986e437ba334a3860472a3e01ed2fa221603ab

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
8 years agoMerge pull request #1630 from brauner/2017-06-20/fix_siblk_detection
Serge Hallyn [Tue, 20 Jun 2017 01:30:16 +0000 (20:30 -0500)] 
Merge pull request #1630 from brauner/2017-06-20/fix_siblk_detection

utils: use 1LU otherwise we overflow

8 years agoutils: use 1LU otherwise we overflow 1630/head
Christian Brauner [Tue, 20 Jun 2017 00:48:47 +0000 (02:48 +0200)] 
utils: use 1LU otherwise we overflow

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agoMerge pull request #1628 from tanyifeng/fix_detect_way_of_bitmask
Christian Brauner [Mon, 19 Jun 2017 06:05:02 +0000 (08:05 +0200)] 
Merge pull request #1628 from tanyifeng/fix_detect_way_of_bitmask

utils: fix the way to detect blocking signal

8 years agoutils: fix the way to detect blocking signal 1628/head
Yifeng Tan [Mon, 19 Jun 2017 10:36:13 +0000 (18:36 +0800)] 
utils: fix the way to detect blocking signal

Signed-off-by: Yifeng Tan <tanyifeng1@huawei.com>
8 years agoMerge pull request #1626 from brauner/2017-06-13/new_networks_parser
Serge Hallyn [Sun, 18 Jun 2017 22:24:27 +0000 (17:24 -0500)] 
Merge pull request #1626 from brauner/2017-06-13/new_networks_parser

new network config parser

8 years agoconfile: adapt warning 1626/head
Christian Brauner [Sun, 18 Jun 2017 21:57:19 +0000 (23:57 +0200)] 
confile: adapt warning

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agonetwork: refuse to create unsupported net types
Christian Brauner [Sun, 18 Jun 2017 10:24:38 +0000 (12:24 +0200)] 
network: refuse to create unsupported net types

Containers setup by unprivileged users are only able to create veth network
types.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agonetwork: non-functional changes
Christian Brauner [Sun, 18 Jun 2017 10:22:46 +0000 (12:22 +0200)] 
network: non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agonetwork: improve network logging
Christian Brauner [Sun, 18 Jun 2017 09:31:39 +0000 (11:31 +0200)] 
network: improve network logging

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agonetwork: preserve backwards compatibility
Christian Brauner [Sat, 17 Jun 2017 06:53:41 +0000 (08:53 +0200)] 
network: preserve backwards compatibility

The new network parser will support specifying multiple networks in the old
format where each new non-indexed "lxc.network.type" line starts a new network
configuration. This way we don't break users. For now, we just print a
deprecation warning. We will KILL this in LXC 3.0.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agonetwork: add test-suite for configuration items
Christian Brauner [Thu, 15 Jun 2017 20:49:09 +0000 (22:49 +0200)] 
network: add test-suite for configuration items

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agonetwork: switch to single find + allocation fun
Christian Brauner [Fri, 16 Jun 2017 19:18:37 +0000 (21:18 +0200)] 
network: switch to single find + allocation fun

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agonetwork: print deprecaton warning for networks
Christian Brauner [Fri, 16 Jun 2017 18:40:31 +0000 (20:40 +0200)] 
network: print deprecaton warning for networks

Specifying networks without an index is deprecated.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agonetwork: remove obsolete logic
Christian Brauner [Fri, 16 Jun 2017 15:53:53 +0000 (17:53 +0200)] 
network: remove obsolete logic

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agonetwork: final cleanup
Christian Brauner [Fri, 16 Jun 2017 15:02:08 +0000 (17:02 +0200)] 
network: final cleanup

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agonetwork: implement network getters
Christian Brauner [Fri, 16 Jun 2017 14:41:32 +0000 (16:41 +0200)] 
network: implement network getters

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agonetwork: allow to unset by passing empty value
Christian Brauner [Fri, 16 Jun 2017 14:39:32 +0000 (16:39 +0200)] 
network: allow to unset by passing empty value

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 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>
8 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>
8 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>
8 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>