[lxc-devel] [lxc/lxc] 7fa3f2: replace all lxc.network* with lxc.net*

GitHub noreply at github.com
Thu Jun 29 11:18:01 UTC 2017


  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: 7fa3f2e9eb31f574662a98041d1373c9af709bd1
      https://github.com/lxc/lxc/commit/7fa3f2e9eb31f574662a98041d1373c9af709bd1
  Author: 0x0916 <w at laoqinren.net>
  Date:   2017-06-29 (Thu, 29 Jun 2017)

  Changed paths:
    M README.md
    M config/etc/default.conf.libvirt
    M config/etc/default.conf.unknown
    M config/init/common/lxc-containers.in
    M doc/examples/lxc-complex.conf.in
    M doc/examples/lxc-empty-netns.conf.in
    M doc/examples/lxc-macvlan.conf.in
    M doc/examples/lxc-no-netns.conf.in
    M doc/examples/lxc-phys.conf.in
    M doc/examples/lxc-veth.conf.in
    M doc/examples/lxc-vlan.conf.in
    M doc/ja/lxc-info.sgml.in
    M doc/ja/lxc.container.conf.sgml.in
    M doc/ko/lxc-info.sgml.in
    M doc/ko/lxc.container.conf.sgml.in
    M doc/lxc-info.sgml.in
    M doc/lxc.container.conf
    M doc/lxc.container.conf.sgml.in
    M src/lua-lxc/test/apitest.lua
    M src/lxc/commands.c
    M src/lxc/conf.h
    M src/lxc/confile_utils.c
    M src/lxc/lxccontainer.c
    M src/lxc/tools/lxc_info.c
    M src/python-lxc/examples/api_test.py
    M src/python-lxc/lxc/__init__.py
    M src/tests/aa.c
    M src/tests/cgpath.c
    M src/tests/createtest.c
    M src/tests/get_item.c
    M src/tests/lxc-test-apparmor-mount
    M src/tests/lxc-test-cloneconfig
    M src/tests/lxc-test-createconfig
    M src/tests/lxc-test-no-new-privs
    M src/tests/lxc-test-unpriv
    M src/tests/lxc-test-usernic.in
    M src/tests/shutdowntest.c
    M src/tests/snapshot.c
    M templates/lxc-altlinux.in
    M templates/lxc-centos.in
    M templates/lxc-debian.in
    M templates/lxc-download.in
    M templates/lxc-fedora-legacy.in
    M templates/lxc-fedora.in
    M templates/lxc-gentoo.in
    M templates/lxc-openmandriva.in
    M templates/lxc-opensuse.in
    M templates/lxc-oracle.in
    M templates/lxc-sparclinux.in
    M templates/lxc-sshd.in
    M templates/lxc-ubuntu-cloud.in
    M templates/lxc-ubuntu.in

  Log Message:
  -----------
  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 at laoqinren.net>


  Commit: 82c3a0dc5761f37b9985a05dc2febd56415b61a5
      https://github.com/lxc/lxc/commit/82c3a0dc5761f37b9985a05dc2febd56415b61a5
  Author: 0x0916 <w at laoqinren.net>
  Date:   2017-06-29 (Thu, 29 Jun 2017)

  Changed paths:
    M src/lxc/confile.c

  Log Message:
  -----------
  confile: update comment: replace p+12 with p+8

Signed-off-by: 0x0916 <w at laoqinren.net>


  Commit: ce4be612ceeb5ed2f8243e460b80819cda7983f6
      https://github.com/lxc/lxc/commit/ce4be612ceeb5ed2f8243e460b80819cda7983f6
  Author: 0x0916 <w at laoqinren.net>
  Date:   2017-06-29 (Thu, 29 Jun 2017)

  Changed paths:
    M src/lxc/confile_utils.c
    M src/lxc/confile_utils.h

  Log Message:
  -----------
  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 at laoqinren.net>


  Commit: 4a787c27b2a4e42c42e68282a28c9c937765ad8e
      https://github.com/lxc/lxc/commit/4a787c27b2a4e42c42e68282a28c9c937765ad8e
  Author: 0x0916 <w at laoqinren.net>
  Date:   2017-06-29 (Thu, 29 Jun 2017)

  Changed paths:
    M src/lxc/confile.c

  Log Message:
  -----------
  confile: supporting new net hwaddr key in network_new_hwaddrs

Signed-off-by: 0x0916 <w at laoqinren.net>


  Commit: ae1dc8b42ee19454205cf3a98a069185f7935bf6
      https://github.com/lxc/lxc/commit/ae1dc8b42ee19454205cf3a98a069185f7935bf6
  Author: 0x0916 <w at laoqinren.net>
  Date:   2017-06-29 (Thu, 29 Jun 2017)

  Changed paths:
    M src/lxc/confile_utils.c

  Log Message:
  -----------
  confile_utils: supporting new net hwaddr key in update_hwaddr

Signed-off-by: 0x0916 <w at laoqinren.net>


  Commit: 935cfd3e36f0d4dbabd72b58ab63ff4ced294a23
      https://github.com/lxc/lxc/commit/935cfd3e36f0d4dbabd72b58ab63ff4ced294a23
  Author: 0x0916 <w at laoqinren.net>
  Date:   2017-06-29 (Thu, 29 Jun 2017)

  Changed paths:
    M config/etc/default.conf.lxcbr
    M src/tests/get_item.c

  Log Message:
  -----------
  testcase: define a network before checks

Signed-off-by: 0x0916 <w at laoqinren.net>


  Commit: c2dbbbb6122e1ed1814dc076e4300d30ad3759e7
      https://github.com/lxc/lxc/commit/c2dbbbb6122e1ed1814dc076e4300d30ad3759e7
  Author: 0x0916 <w at laoqinren.net>
  Date:   2017-06-29 (Thu, 29 Jun 2017)

  Changed paths:
    M src/lxc/confile_legacy.c

  Log Message:
  -----------
  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 at laoqinren.net>


  Commit: 86ccab2e9b8f8c1f91734c8595d397bf37450684
      https://github.com/lxc/lxc/commit/86ccab2e9b8f8c1f91734c8595d397bf37450684
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-06-29 (Thu, 29 Jun 2017)

  Changed paths:
    M README.md
    M config/etc/default.conf.libvirt
    M config/etc/default.conf.lxcbr
    M config/etc/default.conf.unknown
    M config/init/common/lxc-containers.in
    M doc/examples/lxc-complex.conf.in
    M doc/examples/lxc-empty-netns.conf.in
    M doc/examples/lxc-macvlan.conf.in
    M doc/examples/lxc-no-netns.conf.in
    M doc/examples/lxc-phys.conf.in
    M doc/examples/lxc-veth.conf.in
    M doc/examples/lxc-vlan.conf.in
    M doc/ja/lxc-info.sgml.in
    M doc/ja/lxc.container.conf.sgml.in
    M doc/ko/lxc-info.sgml.in
    M doc/ko/lxc.container.conf.sgml.in
    M doc/lxc-info.sgml.in
    M doc/lxc.container.conf
    M doc/lxc.container.conf.sgml.in
    M src/lua-lxc/test/apitest.lua
    M src/lxc/commands.c
    M src/lxc/conf.h
    M src/lxc/confile.c
    M src/lxc/confile_legacy.c
    M src/lxc/confile_utils.c
    M src/lxc/confile_utils.h
    M src/lxc/lxccontainer.c
    M src/lxc/tools/lxc_info.c
    M src/python-lxc/examples/api_test.py
    M src/python-lxc/lxc/__init__.py
    M src/tests/aa.c
    M src/tests/cgpath.c
    M src/tests/createtest.c
    M src/tests/get_item.c
    M src/tests/lxc-test-apparmor-mount
    M src/tests/lxc-test-cloneconfig
    M src/tests/lxc-test-createconfig
    M src/tests/lxc-test-no-new-privs
    M src/tests/lxc-test-unpriv
    M src/tests/lxc-test-usernic.in
    M src/tests/shutdowntest.c
    M src/tests/snapshot.c
    M templates/lxc-altlinux.in
    M templates/lxc-centos.in
    M templates/lxc-debian.in
    M templates/lxc-download.in
    M templates/lxc-fedora-legacy.in
    M templates/lxc-fedora.in
    M templates/lxc-gentoo.in
    M templates/lxc-openmandriva.in
    M templates/lxc-opensuse.in
    M templates/lxc-oracle.in
    M templates/lxc-sparclinux.in
    M templates/lxc-sshd.in
    M templates/lxc-ubuntu-cloud.in
    M templates/lxc-ubuntu.in

  Log Message:
  -----------
  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].*


Compare: https://github.com/lxc/lxc/compare/18ede4275236...86ccab2e9b8f


More information about the lxc-devel mailing list