1. 10 6月, 2016 1 次提交
    • D
      nodeinfo: remove sysfs_prefix from all methods · 08ea852c
      Daniel P. Berrange 提交于
      Nearly all the methods in the nodeinfo file are given a
      'const char *sysfs_prefix' parameter to override the
      default sysfs path (/sys/devices/system). Every single
      caller passes in NULL for this, except one use in the
      unit tests. Furthermore this parameter is totally
      Linux-specific, when the APIs are intended to be cross
      platform portable.
      
      This removes the sysfs_prefix parameter and instead gives
      a new method linuxNodeInfoSetSysFSSystemPath for use by
      the test suite.
      
      For two of the methods this hardcodes use of the constant
      SYSFS_SYSTEM_PATH, since the test suite does not need to
      override the path for thos methods.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      08ea852c
  2. 08 6月, 2016 9 次提交
  3. 07 6月, 2016 2 次提交
  4. 06 6月, 2016 2 次提交
    • J
      Do not check for domain liveness in virDomainObjSetDefTransient · 8c40ede4
      Ján Tomko 提交于
      Remove the live attribute and mark the definition as transient
      whether the domain is runing or not.
      
      There were only two callers left calling with live=false:
      * testDomainStartState, where the domain already is active
        because we assigned vm->def->id just a few lines above the call
      * virDomainObjGetPersistentDef, which now only calls
        virDomainObjSetDefTransient for an active domain
      8c40ede4
    • J
      Clean up redundant usage of virDomainObjSetDefTransient · 9b111048
      Ján Tomko 提交于
      Commit 45ec297d from November 2010:
          Make state driver device hotplug/update actually transient
      added virDomainObjSetDefTransient calls to the domain startup
      function in several drivers.
      
      In November 2011, commit 8866eed0:
          Set aliases for LXC/UML console devices
      added a call earlier in the startup function, without removing the
      existing ones.
      
      Also, in the UML driver it seems the function never did anything
      useful - vm->def->id is set asynchronnously in umlNotifyEvent.
      At the time of calling virDomainObjSetDefTransient with live=false,
      vm->def->id was likely still -1, making the call a no-op.
      9b111048
  5. 03 6月, 2016 1 次提交
    • M
      Fix building with -Og · 3470cd86
      Martin Kletzander 提交于
      When building using -Og, gcc sees that some variables can be used
      uninitialized  It can be debatable whether it is possible with our
      codeflow, but functions should be self-contained and initializations are
      always good.  The return instead of goto is due to actualType being used
      in the cleanup.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      3470cd86
  6. 27 5月, 2016 1 次提交
  7. 25 5月, 2016 3 次提交
    • P
      conf: Change virDomainCputune member 'shares' to unsigned long long · e6e14468
      Peter Krempa 提交于
      cgroup functions set and get the longer type so use it everywhere
      e6e14468
    • J
      lxc: Fix lxcDomainDestroyFlags endjob processing · cb0159df
      John Ferlan 提交于
      Commit id '15ccb0db' added job functions for the lxc driver; however,
      for shutdown and nonpersistent path, the vm was removed from the domain
      object list and the vm pointer cleared before the endjob.
      
      Adjust the code to perform the endjob first and then perform the
      ObjListRemove as long as the vm wasn't NULL. This follows more closely
      models from qemu and libxl
      
      Found by Coverity (FORWARD_NULL)
      cb0159df
    • L
      lxc: support <interface type='ethernet'> · 002b7704
      Laine Stump 提交于
      This is identical to type='bridge', but without the "connect to a
      bridge" part, so it can be handled by using the same functions (and
      often even the same cases in switch statements), after renaming
      virLXCProcessSetupInterfaceBridged() to virLXCProcessInterfaceTap()
      and enhancing it to skip bridge-related items when brname == NULL.
      
      To be truly useful, we need to support setting the ip address on the
      host side veth as well as guest side veth (already supported for
      type='bridge'), as well as setting the peer address for both.
      
      The <script> element (supported by type='ethernet' in qemu) isn't
      supported in this patch. An error is logged at domain start time if it
      is encountered. This may be changed in a later patch.
      002b7704
  8. 24 5月, 2016 2 次提交
  9. 20 5月, 2016 9 次提交
  10. 11 5月, 2016 2 次提交
    • E
      headers: Remove unnecessary keyword extern from function declaration · 898c0bbe
      Erik Skultety 提交于
      Usage of this keyword in front of function declaration that is exported via a
      header file is unnecessary, since internally, this has been the default for most
      compilers for quite some time.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      898c0bbe
    • L
      util: set vlan tag for macvtap passthrough mode on SRIOV VFs · 75db9997
      Laine Stump 提交于
      SRIOV VFs used in macvtap passthrough mode can take advantage of the
      SRIOV card's transparent vlan tagging. All the code was there to set
      the vlan tag, and it has been used for SRIOV VFs used for hostdev
      interfaces for several years, but for some reason, the vlan tag for
      macvtap passthrough devices was stubbed out with a -1.
      
      This patch moves a bit of common validation down to a lower level
      (virNetDevReplaceNetConfig()) so it is shared by hostdev and macvtap
      modes, and updates the macvtap caller to actually send the vlan config
      instead of -1.
      75db9997
  11. 09 5月, 2016 2 次提交
    • P
      lxc: Fix wrong error message on disk hotplug · 5e9d56f8
      Peter Krempa 提交于
      Commit 36025c55 tried to improve error reporting for <disk type="lun">
      but reused the code in LXC which doesn't care about the actual disk
      type. The error messages would then contain a bogous hint that the
      config for the 'lun' device is invalid which might not be the case.
      
      Re-do the relevant portion of the commit with the original message.
      5e9d56f8
    • P
      util: Replace virDomainDiskSourceIsBlockType with a new helper · 3ec7bb35
      Peter Krempa 提交于
      For disks sources described by a libvirt volume we don't need to do a
      complicated check since virStorageTranslateDiskSourcePool already
      correctly determines the actual disk type.
      
      Replace the checks using a new accessor that does not open-code the
      whole logic.
      3ec7bb35
  12. 03 5月, 2016 1 次提交
    • E
      rpc: virnetserverclient: Identify clients by an integer ID · 5841d64d
      Erik Skultety 提交于
      Admin API needs a way of addressing specific clients. Unlike servers, which we
      are happy to address by names both because its name reflects its purpose (to
      some extent) and we only have two of them (so far), naming clients doesn't make
      any sense, since a) each client is an anonymous, i.e. not recognized after a
      disconnect followed by a reconnect, b) we can't predict what kind of requests
      it's going to send to daemon, and c) the are loads of them comming and going,
      so the only viable option is to use an ID which is of a reasonably wide data
      type.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      5841d64d
  13. 02 5月, 2016 1 次提交
    • J
      qemu: Introduce qemuDomainHostdevPrivatePtr · 27726d8c
      John Ferlan 提交于
      Modeled after the qemuDomainDiskPrivatePtr logic, create a privateData
      pointer in the _virDomainHostdevDef to allow storage of private data
      for a hypervisor in order to at least temporarily store auth/secrets
      data for usage during qemuBuildCommandLine.
      
      NB: Since the qemu_parse_command (qemuParseCommandLine) code is not
      expecting to restore the auth/secret data, there's no need to add
      code to handle this new structure there.
      
      Updated copyrights for modules touched. Some didn't have updates in a
      couple years even though changes have been made.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      27726d8c
  14. 30 4月, 2016 1 次提交
    • L
      Revert "lxc domain allow to set peer address" · 70aa318b
      Laine Stump 提交于
      This reverts commit afee47d0, which
      added support to lxc for the "peer" attribute in domain interface <ip>
      elements.
      
      It's being removed temporarily for the release of libvirt 1.3.4
      because the feature doesn't work, and there are concerns that it may
      need to be modified in an externally visible manner which could create
      backward compatibility problems.
      70aa318b
  15. 19 4月, 2016 2 次提交
    • C
      lxc: explicitly error on interface type=ethernet · 27f2b747
      Cole Robinson 提交于
      It isn't implemented and does not work:
      
      error: internal error: guest failed to start: /usr/lib/libvirt/libvirt_lxc: option '--veth' requires an argument
      syntax: /usr/lib/libvirt/libvirt_lxc [OPTIONS] ...
      
      We previously threw an explicit error, but this changed in
      22cff52a , which I suspect was
      untested for LXC
      27f2b747
    • M
      Include sysmacros.h where needed · aca4d72b
      Martin Kletzander 提交于
      So in glibc-2.23 sys/sysmacros.h is no longer included from sys/types.h
      and we don't build because of the usage of major/minor/makedev macros.
      Autoconf already has AC_HEADER_MAJOR macro that check where exactly
      these functions/macros are defined, so let's use that.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      aca4d72b
  16. 15 4月, 2016 1 次提交