1. 01 8月, 2013 1 次提交
    • D
      Add support for systemd cgroup mount · aedd46e7
      Daniel P. Berrange 提交于
      Systemd uses a named cgroup mount for tracking processes. Add
      it as another type of controller, albeit one which we have to
      special case in a number of places. In particular we must
      never create/delete directories there, nor add tasks. Essentially
      the systemd mount is to be considered read-only for libvirt.
      
      With this change both the virCgroupDetectPlacement and
      virCgroupCopyPlacement methods must be invoked. The copy
      placement method will copy setup for resource controllers
      only. The detect placement method will probe for any
      named controllers, or resource controllers not already
      setup.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      aedd46e7
  2. 26 7月, 2013 3 次提交
  3. 25 7月, 2013 1 次提交
  4. 24 7月, 2013 3 次提交
  5. 22 7月, 2013 1 次提交
  6. 16 4月, 2013 6 次提交
  7. 08 4月, 2013 1 次提交
  8. 05 4月, 2013 2 次提交
  9. 21 3月, 2013 1 次提交
  10. 17 1月, 2013 1 次提交
  11. 21 12月, 2012 1 次提交
  12. 30 11月, 2012 1 次提交
  13. 28 11月, 2012 2 次提交
  14. 21 9月, 2012 1 次提交
  15. 07 9月, 2012 1 次提交
  16. 22 8月, 2012 3 次提交
  17. 27 7月, 2012 1 次提交
    • O
      maint: Use consistent copyright. · a4bcefbc
      Osier Yang 提交于
      This is a follow up patch of commit f9ce7dad, it modifies all
      the files which declare the copyright like "See COPYING.LIB for
      the License of this software" to use the detailed/consistent one.
      
      And deserts the outdated comments like:
      
       * libvirt-qemu.h:
       * Summary: qemu specific interfaces
       * Description: Provides the interfaces of the libvirt library to handle
       *              qemu specific methods
       *
       * Copy:  Copyright (C) 2010, 2012 Red Hat, Inc.
      
      Uses the more compact style like:
      
       * libvirt-qemu.h: Interfaces specific for QEMU/KVM driver
       *
       * Copyright (C) 2010, 2012 Red Hat, Inc.
      a4bcefbc
  18. 16 5月, 2012 2 次提交
    • E
      build: fix recent syntax-check breakage · 3337ba6d
      Eric Blake 提交于
      The use of readlink() in lxc_container.c is intentional; we don't
      want an absolute pathname there.
      
      * src/util/cgroup.h (VIR_CGROUP_SYSFS_MOUNT): Indent properly.
      * cfg.mk (exclude_file_name_regexp--sc_prohibit_readlink): Add
      exemption.
      3337ba6d
    • D
      Remount cgroups controllers after setting up new /sys in LXC · a8c0b2fe
      Daniel P. Berrange 提交于
      Normal practice is for cgroups controllers to be mounted at
      /sys/fs/cgroup. When setting up a container, /sys is mounted
      with a new sysfs instance, thus we must re-mount all the
      cgroups controllers. The complexity is that we must mount
      them in the same layout as the host OS. ie if 'cpu' and 'cpuacct'
      were mounted at the same location in the host we must preserve
      this in the container. Also if any controllers are co-located
      we must setup symlinks from the individual controller name to
      the co-located mount-point
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      a8c0b2fe
  19. 12 3月, 2012 1 次提交
    • E
      cpustats: collect VM user and sys times · 0d0b4098
      Eric Blake 提交于
      As documented in linux.git/Documentation/cgroups/cpuacct.txt,
      cpuacct.stat returns user and system time in ticks (the same
      unit used in times(2)).  It would be a bit nicer if it were like
      getrusage(2) and reported timeval contents, or like cpuacct.usage
      and in nanoseconds, but we can't be picky.
      
      * src/util/cgroup.h (virCgroupGetCpuacctStat): New function.
      * src/util/cgroup.c (virCgroupGetCpuacctStat): Implement it.
      (virCgroupGetValueStr): Allow for multi-line files.
      * src/libvirt_private.syms (cgroup.h): Export it.
      0d0b4098
  20. 07 3月, 2012 1 次提交
  21. 21 12月, 2011 1 次提交
  22. 30 11月, 2011 1 次提交
  23. 21 7月, 2011 2 次提交
  24. 18 3月, 2011 1 次提交
  25. 10 3月, 2011 1 次提交
    • E
      cgroup: allow fine-tuning of device ACL permissions · 5564c575
      Eric Blake 提交于
      Adding audit points showed that we were granting too much privilege
      to qemu; it should not need any mknod rights to recreate any
      devices.  On the other hand, lxc should have all device privileges.
      The solution is adding a flag parameter.
      
      This also lets us restrict write access to read-only disks.
      
      * src/util/cgroup.h (virCgroup*Device*): Adjust prototypes.
      * src/util/cgroup.c (virCgroupAllowDevice)
      (virCgroupAllowDeviceMajor, virCgroupAllowDevicePath)
      (virCgroupDenyDevice, virCgroupDenyDeviceMajor)
      (virCgroupDenyDevicePath): Add parameter.
      * src/qemu/qemu_driver.c (qemudDomainSaveFlag): Update clients.
      * src/lxc/lxc_controller.c (lxcSetContainerResources): Likewise.
      * src/qemu/qemu_cgroup.c: Likewise.
      (qemuSetupDiskPathAllow): Also, honor read-only disks.
      5564c575