[PATCH 00/28] IP peer address and host-side address config support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This (admittedly very long, but most of the patches are either very
small or just code movement/renaming, really!) series started out to
be just a replacement for a single patch posted by Vasiliy Tolstov
back in April (originally pushed upstream as commit 690969af, which
was reverted in commit 1d14b13f when I noticed an inconsistency in
behavior between lxc and qemu).

But each step forward seemed to require (or strongly suggest) a step
sideways to reorganize existing code, or eliminate annoying problems I
found, and I ended up with 28 patches.

The patches that actually add the new functionality are 24-28 (and
they are quite small), all the rest just setting up for that. In
particular, the three largest patches (03, 13, 14) are purely moving
code and renaming identifiers.

Patches 07, 08, 12, and 18 fix minor bugs I found during all the
changes. (12 is a bit strange, as it removes an undocumented behavior
from the openvz driver that has been there since 2010).

The one possible controversy in this series (other than the
modification to openvz configuration in patch 12) is my placement of
the config info for the host-side network device. I could have either
put the IP info for the host-side interface as a subelement of
<target> where the host-side interface is named, or I could follow the
convention of other device types and make it a subelement of the
<source> element of interface (since there is where you're supposed to
describe how a device connects to the host side resources).  <target>
element is used to give the name of the tap interface itself. I went
back and forth about this, and in the end decided that since the IP
address is configuring how the device connects to the outside world
(just as with the "network" and "bridge" attributes of <source> for
those other network types), that it makes most sense to put it under
<source>

Please don't be put off by the large number of patches - most of them
are fairly straightforward and should be quick reviews. I promise! :-)

Laine Stump (27):
  util: move virNetDevLinkDump to virnetlink.c
  util: move virInterface(State|Link)/virNetDevFeature from conf to util
  global: consistently use IP rather than Ip in identifiers
  conf: clean up virDomainNetIPParseXML()
  tests: mock virNetDevSetIPAddress
  util: allow calling virSocketAddrGetIPPrefix with NULL netmask or
    address
  lxc: eliminate extraneous free of netDef->ifname_guest
  lxc: use correct prefix when setting veth IP address
  conf: new function virDomainNetDefClear
  qemu: don't set/clear NetDef IP addresses in
    qemuConnectDomainXMLToNative()
  qemu: eliminate memory leaks when converting NetDefs to
    type='ethernet'
  conf/openvz: eliminate incorrect/undocumented use of <source
    dev='blah'/>
  util: new files virnetdevip.[ch] for IP-related netdev functions
  util: move IP route & address object-related functions to
    virnetdevip.c
  conf: single object containing list of IP addresses, list of routes
  conf: use virNetDevIPInfo in virDomainHostdevCaps
  conf: use virNetDevIPInfo for guest-side <interface> config
  qemu: forbid setting guest-side IP address/route info of <interface>
  conf: clean up after adding calls to virNetDevIPInfo helpers
  lxc: move debug/error log when adding IP addresses to
    virNetDevIPAddrAdd
  util: new function virNetDevIPInfoAddToDev
  util: provide default destination IP in alternate
    virNetDevIPRouteAdd()
  util: make messages consistent in both versions of
    virNetDevIPRouteAdd()
  conf: support host-side IP/route information in <interface>
  util: support setting peer for virNetDevIPInfo addresses
  lxc: support setting host-side IP addresses/routes
  qemu: support setting host-side IP addresses/routes

Vasiliy Tolstov (1):
  conf: allow setting peer address in <ip> element of <interface>

 docs/formatdomain.html.in                          |  60 +-
 docs/schemas/domaincommon.rng                      |  82 +-
 po/POTFILES.in                                     |   1 +
 src/Makefile.am                                    |   1 +
 src/conf/device_conf.c                             |  31 +-
 src/conf/device_conf.h                             |  44 +-
 src/conf/domain_conf.c                             | 399 +++++----
 src/conf/domain_conf.h                             |  28 +-
 src/conf/interface_conf.c                          |  38 +-
 src/conf/interface_conf.h                          |  10 +-
 src/conf/network_conf.c                            |  96 +-
 src/conf/network_conf.h                            |  24 +-
 src/conf/networkcommon_conf.c                      | 107 +--
 src/conf/networkcommon_conf.h                      |  55 +-
 src/conf/node_device_conf.h                        |   2 +-
 src/esx/esx_driver.c                               |  44 +-
 src/esx/esx_interface_driver.c                     |   4 +-
 src/esx/esx_vi.c                                   |   4 +-
 src/esx/esx_vi.h                                   |   2 +-
 src/libvirt_private.syms                           |  50 +-
 src/libxl/libxl_conf.c                             |  10 +-
 src/libxl/libxl_domain.c                           |   2 +-
 src/lxc/lxc_container.c                            |  92 +-
 src/lxc/lxc_controller.c                           |   2 +-
 src/lxc/lxc_native.c                               |  42 +-
 src/lxc/lxc_process.c                              |   8 +
 src/network/bridge_driver.c                        | 103 +--
 src/network/bridge_driver_linux.c                  |  76 +-
 src/nwfilter/nwfilter_ebiptables_driver.c          |  24 +-
 src/openvz/openvz_conf.c                           |   2 +-
 src/openvz/openvz_driver.c                         |  15 +-
 src/qemu/qemu_domain.c                             |  34 +
 src/qemu/qemu_driver.c                             |  76 +-
 src/qemu/qemu_hotplug.c                            |   6 +-
 src/qemu/qemu_interface.c                          |   6 +-
 src/uml/uml_conf.c                                 |   4 +-
 src/util/virnetdev.c                               | 876 +------------------
 src/util/virnetdev.h                               |  46 +-
 src/util/virnetdevip.c                             | 971 +++++++++++++++++++++
 src/util/virnetdevip.h                             |  93 ++
 src/util/virnetdevvportprofile.c                   |   4 +-
 src/util/virnetlink.c                              | 135 +++
 src/util/virnetlink.h                              |   5 +
 src/util/virsocketaddr.c                           |  12 +-
 src/util/virsocketaddr.h                           |   3 +-
 src/vbox/vbox_common.c                             |   6 +-
 src/vbox/vbox_network.c                            |   8 +-
 src/vz/vz_sdk.c                                    |   2 +-
 src/xenconfig/xen_common.c                         |  14 +-
 src/xenconfig/xen_sxpr.c                           |  16 +-
 tests/lxcxml2xmldata/lxc-ethernet-hostip.xml       |  44 +
 tests/lxcxml2xmltest.c                             |   1 +
 .../qemuxml2argv-net-eth-hostip.args               |  23 +
 .../qemuxml2argv-net-eth-hostip.xml                |  39 +
 tests/qemuxml2argvmock.c                           |  10 +-
 tests/qemuxml2argvtest.c                           |   1 +
 .../qemuxml2xmlout-net-eth-hostip.xml              |  44 +
 tests/qemuxml2xmltest.c                            |   1 +
 tests/virnetdevtest.c                              |  14 +-
 tests/xml2sexprdata/xml2sexpr-net-routed.xml       |   1 -
 60 files changed, 2193 insertions(+), 1760 deletions(-)
 create mode 100644 src/util/virnetdevip.c
 create mode 100644 src/util/virnetdevip.h
 create mode 100644 tests/lxcxml2xmldata/lxc-ethernet-hostip.xml
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-net-eth-hostip.args
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-net-eth-hostip.xml
 create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-net-eth-hostip.xml

-- 
2.5.5

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]