1. 09 5月, 2016 1 次提交
    • 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
  2. 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
  3. 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
  4. 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
  5. 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
  6. 15 4月, 2016 1 次提交
  7. 08 4月, 2016 2 次提交
  8. 18 3月, 2016 1 次提交
    • M
      Drop paths.h include · 865764de
      Michal Privoznik 提交于
      We include the file in plenty of places. This is mostly due to
      historical reasons. The only place that needs something from the
      header file is storage_backend_fs which opens _PATH_MOUNTED. But
      it gets the file included indirectly via mntent.h. At no other
      place in our code we need _PATH_.*. Drop the include and
      configure check then.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      865764de
  9. 11 3月, 2016 2 次提交
  10. 09 3月, 2016 1 次提交
    • P
      conf: refactor checking for unsupported memory devices · 185d13b1
      Peter Krempa 提交于
      Introduce a helper to check supported device and domain config and move
      the memory hotplug checks to it.
      
      The advantage of this approach is that by default all new features are
      considered unsupported by all hypervisors unless specifically changed
      rather than the previous approach where every hypervisor would need to
      declare that a given feature is unsupported.
      185d13b1
  11. 08 3月, 2016 1 次提交
  12. 04 3月, 2016 2 次提交
  13. 17 2月, 2016 3 次提交
  14. 10 2月, 2016 1 次提交
  15. 08 2月, 2016 1 次提交
  16. 05 2月, 2016 2 次提交
    • M
      systemd: Modernize machine naming · c3bd0019
      Martin Kletzander 提交于
      So, systemd-machined has this philosophy that machine names are like
      hostnames and hence should follow the same rules.  But we always allowed
      international characters in domain names.  Thus we need to modify the
      machine name we are passing to systemd.
      
      In order to change some machine names that we will be passing to systemd,
      we also need to call TerminateMachine at the end of a lifetime of a
      domain.  Even for domains that were started with older libvirt.  That
      can be achieved thanks to virSystemdGetMachineNameByPID().  And because
      we can change machine names, we can get rid of the inconsistent and
      pointless escaping of domain names when creating machine names.
      
      So this patch modifies the naming in the following way.  It creates the
      name as <drivername>-<id>-<name> where invalid hostname characters are
      stripped out of the name and if the resulting name is longer, it
      truncates it to 64 characters.  That way we can start domains we
      couldn't start before.  Well, at least on systemd.
      
      To make it work all together, the machineName (which is needed only with
      systemd) is saved in domain's private data.  That way the generation is
      moved to the driver and we don't need to pass various unnecessary
      arguments to cgroup functions.
      
      The only thing this complicates a bit is the scope generation when
      validating a cgroup where we must check both old and new naming, so a
      slight modification was needed there.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1282846Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      c3bd0019
    • D
      conf: add caps to virDomainObjFormat/SaveStatus · 1036ddad
      Daniel P. Berrange 提交于
      The virDomainObjFormat and virDomainSaveStatus methods
      both call into virDomainDefFormat, so should be providing
      a non-NULL virCapsPtr instance.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      1036ddad
  17. 04 2月, 2016 2 次提交
  18. 27 1月, 2016 1 次提交
    • D
      lxc: don't try to hide parent cgroups inside container · dc576025
      Daniel P. Berrange 提交于
      On the host when we start a container, it will be
      placed in a cgroup path of
      
         /machine.slice/machine-lxc\x2ddemo.scope
      
      under /sys/fs/cgroup/*
      
      Inside the containers' namespace we need to setup
      /sys/fs/cgroup mounts, and currently will bind
      mount /machine.slice/machine-lxc\x2ddemo.scope on
      the host to appear as / in the container.
      
      While this may sound nice, it confuses applications
      dealing with cgroups, because /proc/$PID/cgroup
      now does not match the directory in /sys/fs/cgroup
      
      This particularly causes problems for systems and
      will make it create repeated path components in
      the cgroup for apps run in the container eg
      
        /machine.slice/machine-lxc\x2ddemo.scope/machine.slice/machine-lxc\x2ddemo.scope/user.slice/user-0.slice/session-61.scope
      
      This also causes any systemd service that uses
      sd-notify to fail to start, because when systemd
      receives the notification it won't be able to
      identify the corresponding unit it came from.
      In particular this break rabbitmq-server startup
      
      Future kernels will provide proper cgroup namespacing
      which will handle this problem, but until that time
      we should not try to play games with hiding parent
      cgroups.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      dc576025
  19. 26 1月, 2016 1 次提交
  20. 22 1月, 2016 4 次提交
  21. 15 1月, 2016 2 次提交
  22. 12 1月, 2016 1 次提交
  23. 11 1月, 2016 1 次提交
  24. 18 12月, 2015 1 次提交
    • J
      lxc_cgroup: Add check for NULL cgroup before AddTask call · ae09988e
      John Ferlan 提交于
      Commit id '71ce4759' altered the cgroup processing with respect to the
      call to virCgroupAddTask being moved out from lower layers into the calling
      layers especially for qemu processing of emulator and vcpu threads. The
      movement affected lxc insomuch as it is possible for a code path to
      return a NULL cgroup *and* a 0 return status via virCgroupNewPartition
      failure when virCgroupNewIgnoreError succeeded when virCgroupNewMachineManual
      returns. Coverity pointed out that would cause virCgroupAddTask to core.
      
      This patch will check for a NULL cgroup as well as the negative return
      and just return the NULL cgroup to the caller (as it would have previously)
      ae09988e
  25. 15 12月, 2015 1 次提交
  26. 11 12月, 2015 2 次提交
  27. 09 12月, 2015 1 次提交