* 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>
* 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>
* 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>
`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>
`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>
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>
- 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>
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>