1. 25 7月, 2017 1 次提交
  2. 19 7月, 2016 1 次提交
  3. 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
  4. 17 2月, 2016 2 次提交
    • P
      util: cgroup: Allow ignoring EACCES in virCgroup(Allow|Deny)DevicePath · cf113e8d
      Peter Krempa 提交于
      When adding disk images to ACL we may call those functions on NFS
      shares. In that case we might get an EACCES, which isn't really relevant
      since NFS would not hold a block device. This patch adds a flag that
      allows to stop reporting an error on EACCES to avoid spaming logs.
      
      Currently there's no functional change.
      cf113e8d
    • P
      util: cgroup: Drop virCgroup(Allow|Deny)DeviceMajor · 9cd5da71
      Peter Krempa 提交于
      Since commit 47e5b5ae virCgroupAllowDevice allows to pass -1 as either
      the minor or major device number and it automatically uses '*' in place
      of that. Reuse the new approach through the code and drop the duplicated
      functions.
      9cd5da71
  5. 05 2月, 2016 1 次提交
    • 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
  6. 15 1月, 2016 2 次提交
  7. 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
  8. 15 12月, 2015 1 次提交
  9. 19 8月, 2015 1 次提交
  10. 04 8月, 2015 1 次提交
    • J
      conf: Allow error reporting in virDomainDiskSourceIsBlockType · 36025c55
      John Ferlan 提交于
      Rather than provide a somewhat generic error message when the API
      returns false, allow the caller to supply a "report = true" option
      in order to cause virReportError's to describe which of the 3 paths
      that can cause failure.
      
      Some callers don't care about what caused the failure, they just want
      to have a true/false - for those, calling with report = false should
      be sufficient.
      36025c55
  11. 20 5月, 2015 1 次提交
  12. 20 4月, 2015 2 次提交
  13. 16 3月, 2015 1 次提交
    • P
      conf: Replace access to def->mem.max_balloon with accessor functions · 4f9907cd
      Peter Krempa 提交于
      As there are two possible approaches to define a domain's memory size -
      one used with legacy, non-NUMA VMs configured in the <memory> element
      and per-node based approach on NUMA machines - the user needs to make
      sure that both are specified correctly in the NUMA case.
      
      To avoid this burden on the user I'd like to replace the NUMA case with
      automatic totaling of the memory size. To achieve this I need to replace
      direct access to the virDomainMemtune's 'max_balloon' field with
      two separate getters depending on the desired size.
      
      The two sizes are needed as:
      1) Startup memory size doesn't include memory modules in some
      hypervisors.
      2) After startup these count as the usable memory size.
      
      Note that the comments for the functions are future aware and document
      state that will be present after a few later patches.
      4f9907cd
  14. 06 3月, 2015 1 次提交
    • P
      memtune: change the way how we store unlimited value · cf521fc8
      Pavel Hrdina 提交于
      There was a mess in the way how we store unlimited value for memory
      limits and how we handled values provided by user.  Internally there
      were two possible ways how to store unlimited value: as 0 value or as
      VIR_DOMAIN_MEMORY_PARAM_UNLIMITED.  Because we chose to store memory
      limits as unsigned long long, we cannot use -1 to represent unlimited.
      It's much easier for us to say that everything greater than
      VIR_DOMAIN_MEMORY_PARAM_UNLIMITED means unlimited and leave 0 as valid
      value despite that it makes no sense to set limit to 0.
      
      Remove unnecessary function virCompareLimitUlong.  The update of test
      is to prevent the 0 to be miss-used as unlimited in future.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1146539Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      cf521fc8
  15. 21 2月, 2015 1 次提交
  16. 27 1月, 2015 2 次提交
    • D
      lxc: report veth device indexes to systemd · a2bdfa52
      Daniel P. Berrange 提交于
      Record the index of each host-side veth device created and report
      them to systemd, so they show up in machinectl status for the VM.
      
      lxc-shell(95449419f969d649d9962566ec42af7d)
           Since: Fri 2015-01-16 16:53:37 GMT; 3s ago
          Leader: 28085 (sh)
         Service: libvirt-lxc; class container
           Iface: vnet0
         Address: fe80::216:3eff:fe00:c317%124
              OS: Fedora 21 (Twenty One)
            Unit: machine-lxc\x2dshell.scope
                  └─28085 /bin/sh
      a2bdfa52
    • D
      lxc: delay setup of cgroup until we have the init pid · 4acb01e4
      Daniel P. Berrange 提交于
      Don't create the cgroups ahead of launching the container since
      there is no need for the limits to apply during initial bootstrap.
      Create the cgroup after the container PID is known and tell
      systemd the initpid is the leader, instead of the controller
      pid.
      4acb01e4
  17. 15 1月, 2015 1 次提交
    • D
      Add support for systemd-machined CreateMachineWithNetwork · 318df5a0
      Daniel P. Berrange 提交于
      systemd-machined introduced a new method CreateMachineWithNetwork
      that obsoletes CreateMachine. It expects to be given a list of
      VETH/TAP device indexes for the host side device(s) associated
      with a container/machine.
      
      This falls back to the old CreateMachine method when the new
      one is not supported.
      318df5a0
  18. 11 11月, 2014 1 次提交
  19. 20 8月, 2014 1 次提交
  20. 24 7月, 2014 1 次提交
  21. 23 7月, 2014 3 次提交
    • J
      Introduce virTristateSwitch enum · 3227e17d
      Ján Tomko 提交于
      For the values "default", "on", "off"
      
      Replaces
      virDeviceAddressPCIMulti
      virDomainFeatureState
      virDomainIoEventFd
      virDomainVirtioEventIdx
      virDomainDiskCopyOnRead
      virDomainMemDump
      virDomainPCIRombarMode
      virDomainGraphicsSpicePlaybackCompression
      3227e17d
    • P
      Fix build after 47e5b5ae · 0e6cacc4
      Peter Krempa 提交于
      The patch described above introduced two problems caught by the compiler
      and thus breaking the build.
      
      One of the problems was comparison of unsigned with < 0 and the second
      one jumped a variable init.
      0e6cacc4
    • C
      lxc: allow to keep or drop capabilities · 47e5b5ae
      Cédric Bosdonnat 提交于
      Added <capabilities> in the <features> section of LXC domains
      configuration. This section can contain elements named after the
      capabilities like:
      
        <mknod state="on"/>, keep CAP_MKNOD capability
        <sys_chroot state="off"/> drop CAP_SYS_CHROOT capability
      
      Users can restrict or give more capabilities than the default using
      this mechanism.
      47e5b5ae
  22. 17 7月, 2014 3 次提交
  23. 08 7月, 2014 1 次提交
  24. 25 6月, 2014 1 次提交
  25. 06 6月, 2014 1 次提交
  26. 30 4月, 2014 1 次提交
  27. 08 4月, 2014 1 次提交
  28. 26 3月, 2014 2 次提交
    • J
      Show the real cpu shares value in live XML · 97814d8a
      Ján Tomko 提交于
      Currently, the Linux kernel treats values of '0' and '1' as
      the minimum of 2. Values larger than the maximum are changed
      to the maximum.
      
      Re-reading the shares value after setting it reflects this in
      the live domain XML.
      97814d8a
    • J
      Treat zero cpu shares as a valid value · bdffab0d
      Ján Tomko 提交于
      Currently, <cputune><shares>0</shares></cputune> is treated
      as if it were not specified.
      
      Treat is as a valid value if it was explicitly specified
      and write it to the cgroups.
      bdffab0d
  29. 25 3月, 2014 2 次提交
  30. 18 3月, 2014 1 次提交