1. 19 7月, 2016 1 次提交
  2. 18 7月, 2016 1 次提交
    • J
      Store USB port path as an array of integers · f820d5bf
      Ján Tomko 提交于
      In preparation to tracking which USB addresses are occupied.
      Introduce two helper functions for printing the port path
      as a string and appending it to a virBuffer.
      f820d5bf
  3. 12 7月, 2016 2 次提交
  4. 07 7月, 2016 1 次提交
  5. 04 7月, 2016 3 次提交
  6. 02 7月, 2016 2 次提交
    • L
      util: new function virNetDevIPInfoAddToDev · 95309424
      Laine Stump 提交于
      This patch takes the code out of
      lxcContainerRenameAndEnableInterfaces() that adds all IP addresses and
      IP routes to the interface, and puts it into a utility function
      virNetDevIPInfoAddToDev() in virnetdevip.c so that it can be used by
      anyone.
      
      One small change in functionality -
      lxcContainerRenameAndEnableInterfaces() previously would add all IP
      addresses to the interface while it was still offline, then set the
      interface online, and then add the routes. Because I don't want the
      utility function to set the interface online, I've moved this up so
      the interface is first set online, then IP addresses and routes are
      added. This is the same order that the network service from
      initscripts (in ifup-ether) does it, so it shouldn't pose any problem
      (and hasn't, in the tests that I've run).
      
      (This patch had been pushed earlier in commit
      f1e0d0da, but was reverted in commit
      05eab475 because it had been
      accidentally pushed during the freeze for release 2.0.0)
      95309424
    • L
      util: new function virXMLNodeSanitizeNamespaces() · b874f26b
      Laine Stump 提交于
      This is a generic version of virDomainDefMetadataSanitize() - the same
      functionality is now needed for network metadata.
      b874f26b
  7. 01 7月, 2016 1 次提交
    • J
      Introduce virDomainUSBDeviceDefForeach · 492b3bfd
      Ján Tomko 提交于
      A helper that will execute a callback on every USB device
      in the domain definition.
      
      With an ability to skip USB hubs, since we will want to treat
      them differently in some cases.
      492b3bfd
  8. 27 6月, 2016 9 次提交
    • J
      Revert "util: new function virNetDevIPInfoAddToDev" · 05eab475
      Ján Tomko 提交于
      This reverts commit f1e0d0da.
      
      This feature was accidentally pushed in the feature freeze.
      05eab475
    • L
      util: new function virNetDevIPInfoAddToDev · f1e0d0da
      Laine Stump 提交于
      This patch takes the code out of
      lxcContainerRenameAndEnableInterfaces() that adds all IP addresses and
      IP routes to the interface, and puts it into a utility function
      virNetDevIPInfoAddToDev() in virnetdevip.c so that it can be used by
      anyone.
      
      One small change in functionality -
      lxcContainerRenameAndEnableInterfaces() previously would add all IP
      addresses to the interface while it was still offline, then set the
      interface online, and then add the routes. Because I don't want the
      utility function to set the interface online, I've moved this up so
      the interface is first set online, then IP addresses and routes are
      added. This is the same order that the network service from
      initscripts (in ifup-ether) does it, so it shouldn't pose any problem
      (and hasn't, in the tests that I've run).
      f1e0d0da
    • L
      conf: single object containing list of IP addresses, list of routes · 9911562a
      Laine Stump 提交于
      There are currently two places in the domain where this combination is
      used, and there is about to be another. This patch puts them together
      for brevity and uniformity.
      
      As with the newly-renamed virNetDevIPAddr and virNetDevIPRoute
      objects, the new virNetDevIPInfo object will need to be accessed by a
      utility function that calls low level Netlink functions (so we don't
      want it to be in the conf directory) and will be called from multiple
      hypervisor drivers (so it can't be in any hypervisor directory); the
      most appropriate place is thus once again the util directory.
      
      The parse and format functions are in conf/domain_conf.c because only
      the domain XML (i.e. *not* the network XML) has this exact combination
      of IP addresses plus routes. Note that virDomainNetIPInfoFormat() will
      end up being the only caller to virDomainNetRoutesFormat() and
      virDomainNetIPsFormat(), so it will just subsume those functions in a
      later patch, but we can't do that until they are no longer called.
      
      (It would have been nice to include the interface name within the
      virNetDevIPInfo object (with a slight name change), but that can't
      be done cleanly, because in each case the interface name is provided
      in a different place in the XML relative to the routes and IP
      addresses, so putting it in this object would actually make the code
      more confused rather than simpler).
      9911562a
    • L
      util: move IP route & address object-related functions to virnetdevip.c · fa18e814
      Laine Stump 提交于
      These functions all need to be called from a utility function that
      must be located in the util directory, so we move them all into
      util/virnetdevip.[ch] now that it exists.
      
      Function and struct names were appropriately changed for the new
      location, but all code is unchanged aside from motion and renaming.
      fa18e814
    • L
      util: new files virnetdevip.[ch] for IP-related netdev functions · cf0568b0
      Laine Stump 提交于
      This patch splits virnetdev.[ch] into multiple files, with the new
      virnetdevip.[ch] containing all the functions related to setting and
      retrieving IP-related info for a device (both addresses and routes).
      cf0568b0
    • L
      conf: new function virDomainNetDefClear · 7cfbaad1
      Laine Stump 提交于
      We need to clear these out without freeing the object completely.
      7cfbaad1
    • L
      global: consistently use IP rather than Ip in identifiers · 22a6873a
      Laine Stump 提交于
      I'm tired of mistyping this all the time, so let's do it the same all
      the time (similar to how we changed all "Pci" to "PCI" awhile back).
      
      (NB: I've left alone some things in the esx and vbox drivers because
      I'm unable to compile them and they weren't obviously *not* a part of
      some API. I also didn't change a couple of variables named,
      e.g. "somethingIptables", because they were derived from the name of
      the "iptables" command)
      22a6873a
    • L
      util: move virInterface(State|Link)/virNetDevFeature from conf to util · 638c6e5b
      Laine Stump 提交于
      These had been declared in conf/device_conf.h, but then used in
      util/virnetdev.c, meaning that we had to #include conf/device_conf.h
      in virnetdev.c (which we have for a long time said shouldn't be done.
      
      This caused a bigger problem when I tried to #include util/virnetdev.h
      in a file in src/conf (which is allowed) - for some reason the
      "device_conf.h: File not found" error.
      
      The solution is to move the data types and functions used in util
      sources from conf to util. Some names were adjusted during the move
      ("virInterface" --> "virNetDevIf", and "VIR_INTERFACE" -->
      "VIR_NETDEV_IF")
      638c6e5b
    • L
      util: move virNetDevLinkDump to virnetlink.c · 943a400c
      Laine Stump 提交于
      virNetDevLinkDump should have been in virnetlink.c, but that file
      didn't exist yet when the function was created. It didn't really
      matter until now - I found that having virnetlink.h included by
      virnetdev.h caused build problems when trying to #include virnetdev.h
      in a .c file in src/conf (due to missing directory in -I). Rather than
      fix that to further institutionalize the incorrect placement of this
      one function, this patch moves the function.
      943a400c
  9. 26 6月, 2016 1 次提交
  10. 25 6月, 2016 2 次提交
  11. 24 6月, 2016 7 次提交
  12. 20 6月, 2016 2 次提交
  13. 18 6月, 2016 1 次提交
  14. 17 6月, 2016 3 次提交
    • P
    • P
      conf: Remove pre-calculation of initial memory size · a877a163
      Peter Krempa 提交于
      While we need to know the difference between the total memory stored in
      <memory> and the actual size not included in the possible memory modules
      we can't pre-calculate it reliably. This is due to the fact that
      libvirt's XML is copied via formatting and parsing the XML and the
      initial memory size can be reliably calculated only when certain
      conditions are met due to backwards compatibility.
      
      This patch removes the storage of 'initial_memory' and fixes the helpers
      to recalculate the initial memory size all the time from the total
      memory size. This conversion is possible when we also make sure that
      memory hotplug accounts properly for the update of the total memory size
      and thus the helpers for inserting and removing memory devices need to
      be tweaked too.
      
      This fixes a bug where a cold-plug and cold-remove of a memory device
      would increase the size reported in <memory> in the XML by the size of
      the memory device. This would happen as the persistent definition is
      copied before attaching the device and this would lead to the loss of
      data in 'initial_memory'.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1344892
      a877a163
    • J
      conf: add storage_event handling · dc7b849a
      Jovanka Gulicoska 提交于
      Add storage event handling infrastructure to storage_event.[ch], following
      the network_event.[ch] pattern.
      dc7b849a
  15. 14 6月, 2016 2 次提交
  16. 13 6月, 2016 1 次提交
    • W
      libxl: fix vm lock overwritten bug · 9ac94507
      Wang Yufei 提交于
      In libxl driver we do virObjectRef in libxlDomainObjBeginJob,
      If virCondWaitUntil failed, it goes to error, do virObjectUnref,
      There's a chance that someone undefine the vm at the same time,
      and refs unref to zero, vm is freed in libxlDomainObjBeginJob.
      But the vm outside function is not Null, we do virObjectUnlock(vm).
      That's how we overwrite the vm memory after it's freed. I fix it.
      Signed-off-by: NWang Yufei <james.wangyufei@huawei.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      9ac94507
  17. 10 6月, 2016 1 次提交