[lxc-devel] [lxc/lxc] f9373e: network: new network parser part II

GitHub noreply at github.com
Wed Jun 21 15:31:01 UTC 2017


  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: f9373e40b33f03d242d866486e3b3b85a1257524
      https://github.com/lxc/lxc/commit/f9373e40b33f03d242d866486e3b3b85a1257524
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-06-20 (Tue, 20 Jun 2017)

  Changed paths:
    M src/lxc/Makefile.am
    M src/lxc/conf.c
    M src/lxc/confile.c
    A src/lxc/confile_network_legacy.c
    A src/lxc/confile_network_legacy.h
    M src/lxc/confile_utils.c
    M src/lxc/confile_utils.h
    M src/lxc/lxccontainer.c

  Log Message:
  -----------
  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 at ubuntu.com>


  Commit: 01aebbc37539a8d25d7c1b7ba4e05c1fb351d9ac
      https://github.com/lxc/lxc/commit/01aebbc37539a8d25d7c1b7ba4e05c1fb351d9ac
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-06-20 (Tue, 20 Jun 2017)

  Changed paths:
    M src/tests/parse_config_file.c

  Log Message:
  -----------
  network: test new network configuration parser

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


  Commit: 872e772da6b55526aa953f0c5cb978e1c02a7734
      https://github.com/lxc/lxc/commit/872e772da6b55526aa953f0c5cb978e1c02a7734
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-06-21 (Wed, 21 Jun 2017)

  Changed paths:
    M src/lxc/confile_network_legacy.c

  Log Message:
  -----------
  network: return negative idx for legacy networks

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


  Commit: b61bb540423af86fa700475198a7ef139eed745c
      https://github.com/lxc/lxc/commit/b61bb540423af86fa700475198a7ef139eed745c
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-06-21 (Wed, 21 Jun 2017)

  Changed paths:
    M src/tests/get_item.c

  Log Message:
  -----------
  network: test legacy index based networks

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


  Commit: ab6faf2ed354ccb798aeafe37de0c6372b59f3ff
      https://github.com/lxc/lxc/commit/ab6faf2ed354ccb798aeafe37de0c6372b59f3ff
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-06-21 (Wed, 21 Jun 2017)

  Changed paths:
    M src/lxc/confile.c

  Log Message:
  -----------
  confile: do not check for empty value twice

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


  Commit: 72cc48f99077028058d979c47d9e4291f31838b9
      https://github.com/lxc/lxc/commit/72cc48f99077028058d979c47d9e4291f31838b9
  Author: Serge Hallyn <serge at hallyn.com>
  Date:   2017-06-21 (Wed, 21 Jun 2017)

  Changed paths:
    M src/lxc/Makefile.am
    M src/lxc/conf.c
    M src/lxc/confile.c
    A src/lxc/confile_network_legacy.c
    A src/lxc/confile_network_legacy.h
    M src/lxc/confile_utils.c
    M src/lxc/confile_utils.h
    M src/lxc/lxccontainer.c
    M src/tests/get_item.c
    M src/tests/parse_config_file.c

  Log Message:
  -----------
  Merge pull request #1632 from brauner/2017-06-19/new_network_parser_part_deux

network: new network parser part II


Compare: https://github.com/lxc/lxc/compare/1ecd12ca1e72...72cc48f99077


More information about the lxc-devel mailing list