- 19 3月, 2011 1 次提交
-
-
由 Hu Tao 提交于
This patch enables cgroup controllers as much as possible by skipping the creation of blkio controller when running with old kernels that doesn't support multi-level directory for blkio controller. Signed-off-by: NHu Tao <hutao@cn.fujitsu.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 18 3月, 2011 1 次提交
-
-
由 Nikunj A. Dadhania 提交于
* Correct the documentation for cgroup: the swap_hard_limit indicates mem+swap_hard_limit. * Change cgroup private apis to: virCgroupGet/SetMemSwapHardLimit Signed-off-by: NNikunj A. Dadhania <nikunj@linux.vnet.ibm.com>
-
- 10 3月, 2011 2 次提交
-
-
由 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.
-
由 Eric Blake 提交于
Although the cgroup device ACL controller path can be worked out by researching the code, it is more efficient to include that information directly in the audit message. * src/util/cgroup.h (virCgroupPathOfController): New prototype. * src/util/cgroup.c (virCgroupPathOfController): Export. * src/libvirt_private.syms: Likewise. * src/qemu/qemu_audit.c (qemuAuditCgroup): Use it.
-
- 09 3月, 2011 1 次提交
-
-
由 Eric Blake 提交于
On cygwin: CC libvirt_util_la-cgroup.lo util/cgroup.c: In function 'virCgroupKillRecursiveInternal': util/cgroup.c:1458: warning: implicit declaration of function 'virCgroupNew' [-Wimplicit-function-declaration] * src/util/cgroup.c (virCgroupKill): Don't build on platforms where virCgroupNew is unsupported.
-
- 28 2月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
The kill() function doesn't exist on Win32, so it needs to be checked for at build time & code disabled in cgroups * configure.ac: Check for kill() * src/util/cgroup.c: Stub out virCGroupKill* functions when kill() isn't available
-
- 25 2月, 2011 2 次提交
-
-
由 Daniel P. Berrange 提交于
The virCgroupKill method kills all PIDs found in a cgroup The virCgroupKillRecursively method does this recursively for child cgroups. The virCgroupKillPainfully method does a recursive kill several times in a row until everything has really died
-
由 Eric Blake 提交于
* src/util/cgroup.c (virCgroupAllowDevicePath) (virCgroupDenyDevicePath): Don't fail with EINVAL for non-devices. * src/qemu/qemu_driver.c (qemudDomainSaveFlag): Update caller. * src/qemu/qemu_cgroup.c (qemuSetupDiskPathAllow) (qemuSetupChardevCgroup, qemuSetupHostUsbDeviceCgroup) (qemuSetupCgroup, qemuTeardownDiskPathDeny): Likewise.
-
- 24 2月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
Remove the <stdbool.h> header from all source files / headers and just put it into internal.h * src/internal.h: Add <stdbool.h>
-
- 16 2月, 2011 1 次提交
-
-
由 Eric Blake 提交于
* src/util/cgroup.c (virCgroupSetValueStr, virCgroupGetValueStr) (virCgroupRemoveRecursively): VIR_DEBUG can clobber errno. (virCgroupRemove): Use VIR_DEBUG rather than DEBUG.
-
- 15 2月, 2011 1 次提交
-
-
由 Eric Blake 提交于
clang complained that STREQ(group->controllers[i].mountPoint,...) was a NULL dereference when i==VIR_CGROUP_CONTROLLER_CPUSET, because it assumes the worst about virCgroupPathOfController. Marking the argument const doesn't yet have an effect, per this clang bug: http://llvm.org/bugs/show_bug.cgi?id=7758 So, we use sa_assert, which was designed to shut up false positives from tools like clang. * src/util/cgroup.c (virCgroupMakeGroup): Teach clang that there is no NULL dereference.
-
- 09 2月, 2011 2 次提交
-
-
由 Gui Jianfeng 提交于
Implement blkio.weight tuning API. Acked-by: NDaniel P. Berrange <berrange@redhat.com> Signed-off-by: NGui Jianfeng <guijianfeng@cn.fujitsu.com>
-
由 Gui Jianfeng 提交于
Enable cgroup hierarchy for blkio cgroup Acked-by: NDaniel P. Berrange <berrange@redhat.com> Signed-off-by: NGui Jianfeng <guijianfeng@cn.fujitsu.com>
-
- 15 1月, 2011 1 次提交
-
-
由 Nikunj A. Dadhania 提交于
Display or set unlimited values for memory parameters. Unlimited is represented by INT64_MAX in memory cgroup. Signed-off-by: NNikunj A. Dadhania <nikunj@linux.vnet.ibm.com> Reported-by: NJustin Clift <jclift@redhat.com>
-
- 03 12月, 2010 1 次提交
-
-
由 Jean-Baptiste Rouault 提交于
This patch adds a mode_t parameter to virFileWriteStr(). If mode is different from 0, virFileWriteStr() will try to create the file if it doesn't exist. * src/util/util.h (virFileWriteStr): Alter signature. * src/util/util.c (virFileWriteStr): Allow file creation. * src/network/bridge_driver.c (networkEnableIpForwarding) (networkDisableIPV6): Adjust clients. * src/node_device/node_device_driver.c (nodeDeviceVportCreateDelete): Likewise. * src/util/cgroup.c (virCgroupSetValueStr): Likewise. * src/util/pci.c (pciBindDeviceToStub, pciUnBindDeviceFromStub): Likewise.
-
- 17 11月, 2010 1 次提交
-
-
由 Stefan Berger 提交于
Similarly to deprecating close(), I am now deprecating fclose() and introduce VIR_FORCE_FCLOSE() and VIR_FCLOSE(). Also, fdopen() is replaced with VIR_FDOPEN(). Most of the files are opened in read-only mode, so usage of VIR_FORCE_CLOSE() seemed appropriate. Others that are opened in write mode already had the fclose()< 0 check and I converted those to VIR_FCLOSE()< 0. I did not find occurrences of possible double-closed files on the way.
-
- 29 10月, 2010 1 次提交
-
-
由 Lai Jiangshan 提交于
When we mount any cgroup without "-o devices", we will fail to start vms: error: Failed to start domain vm1 error: Unable to deny all devices for vm1: No such file or directory When we mount any cgroup without "-o cpu", we will fail to get schedinfo: Scheduler : posix error: unable to get cpu shares tunable: No such file or directory We should only use the cgroup controllers which are mounted on host. So I add virCgroupMounted() for qemuCgroupControllerActive() Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
-
- 13 10月, 2010 1 次提交
-
-
由 Nikunj A. Dadhania 提交于
Provides interfaces for setting/getting memory tunables like hard_limit, soft_limit and swap_hard_limit
-
- 30 6月, 2010 2 次提交
-
-
由 Ryota Ozaki 提交于
As pointed out by Eric Blake, using dirent->d_type breaks compilation on MinGW. This patch addresses this by using '#if defined' as same as doing for virCgroupForDriver.
-
由 Ryota Ozaki 提交于
ENOENT happens normally when a subsystem is enabled with any other subsystems and the directory of the target group has already removed in a prior loop. In that case, the function should just return without leaving an error message. NB this is the same behavior as before introducing virCgroupRemoveRecursively.
-
- 25 6月, 2010 1 次提交
-
-
由 Daniel P. Berrange 提交于
When configuring serial, parallel, console or channel devices with a file, dev or pipe backend type, it is necessary to label the file path in the security drivers. For char devices of type file, it is neccessary to pre-create (touch) the file if it does not already exist since QEMU won't be allowed todo so itself. dev/pipe configs already require the admin to pre-create before starting the guest. * src/qemu/qemu_security_dac.c: set file ownership for character devices * src/security/security_selinux.c: Set file labeling for character devices * src/qemu/qemu_driver.c: Add character devices to cgroup ACL
-
- 24 6月, 2010 2 次提交
-
-
由 Ryota Ozaki 提交于
Through conversation with Kumar L Srikanth-B22348, I found that the function of getting memory usage (e.g., virsh dominfo) doesn't work for lxc with ns subsystem of cgroup enabled. This is because of features of ns and memory subsystems. Ns creates child cgroup on every process fork and as a result processes in a container are not assigned in a cgroup for domain (e.g., libvirt/lxc/test1/). For example, libvirt_lxc and init (or somewhat specified in XML) are assigned into libvirt/lxc/test1/8839/ and libvirt/lxc/test1/8839/8849/, respectively. On the other hand, memory subsystem accounts memory usage within a group of processes by default, i.e., it does not take any child (and descendant) groups into account. With the two features, virsh dominfo which just checks memory usage of a cgroup for domain always returns zero because the cgroup has no process. Setting memory.use_hierarchy of a group allows to account (and limit) memory usage of every descendant groups of the group. By setting it of a cgroup for domain, we can get proper memory usage of lxc with ns subsystem enabled. (To be exact, the setting is required only when memory and ns subsystems are enabled at the same time, e.g., mount -t cgroup none /cgroup.)
-
由 Ryota Ozaki 提交于
As same as normal directories, a cgroup cannot be removed if it contains sub groups. This patch changes virCgroupRemove to remove all descendant groups (subdirectories) of a target group before removing the target group. The handling is required when we run lxc with ns subsystem of cgroup. Ns subsystem automatically creates child cgroups on every process forks, but unfortunately the groups are not removed on process exits, so we have to remove them by ourselves. With this patch, such child (and descendant) groups are surely removed at lxc shutdown, i.e., lxcVmCleanup which calls virCgroupRemove.
-
- 21 5月, 2010 2 次提交
-
-
由 Jim Meyering 提交于
Run this: git grep -l 'VIR_ERROR\s*("'|xargs perl -pi -e \ 's/(VIR_ERROR)\s*\((".*?"),/$1(_($2),/'
-
由 Jim Meyering 提交于
Run this: git grep -l 'VIR_ERROR0\s*("'|xargs perl -pi -e \ 's/(VIR_ERROR0)\s*\((".*?")\)/$1(_($2))/'
-
- 04 5月, 2010 1 次提交
-
-
由 Ryota Ozaki 提交于
* src/util/cgroup.c: free temporal path string before breaking loop
-
- 24 4月, 2010 1 次提交
-
-
由 Matthias Bolte 提交于
Cygwin has mntent.h but lacks getmntent_r. Update preprocessor checks to catch this combination.
-
- 01 4月, 2010 1 次提交
-
-
由 Matthias Bolte 提交于
The switch from %lli to %lld in virCgroupGetValueI64 is intended, as virCgroupGetValueU64 uses base 10 too, and virCgroupSetValueI64 uses %lld to format the number to string. Parsing is stricter now and doesn't accept trailing characters after the actual value anymore.
-
- 22 3月, 2010 1 次提交
-
-
由 Jim Fehlig 提交于
Invoking virDomainSetMemory() on lxc driver results in libvirtd segfault when cgroups has not been configured on the host. Ensure driver->cgroup is non-null before invoking virCgroupForDomain(). To prevent similar segfaults in the future, ensure driver parameter to virCgroupForDomain() is non-null before dereferencing.
-
- 10 3月, 2010 1 次提交
-
-
由 Eric Blake 提交于
* global: patch created by running: for f in $(git ls-files '*.[ch]') ; do cppi $f > $f.t && mv $f.t $f done
-
- 05 3月, 2010 1 次提交
-
-
由 Daniel P. Berrange 提交于
When getting the driver/domain cgroup it is possible to specify whether it should be auto created. If auto-creation was turned off, libvirt still mistakenly created its own top level cgroup * src/util/cgroup.c: Honour autocreate flag for top level cgroup
-
- 09 2月, 2010 1 次提交
-
-
由 Matthias Bolte 提交于
It was used for error reporting only.
-
- 05 2月, 2010 2 次提交
-
-
由 Jim Meyering 提交于
* src/util/cgroup.c (virCgroupDetectPlacement): Close the mapping FILE* also upon error.
-
由 Jim Meyering 提交于
* src/util/cgroup.c (virCgroupCpuSetInherit) [HAVE_MNTENT_H]: Don't leak CPU-set inheritance value strings.
-
- 13 11月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
In the scenario where the cgroups were mounted but the particular group did not exist, and the caller had not requested auto-creation, the code would fail to return an error condition. This caused the lxc_controller to think the cgroup existed, and it then later failed when attempting to use it * src/util/cgroup.c: Raise an error if the cgroup path does not exist
-
- 19 10月, 2009 1 次提交
-
-
由 Ryota Ozaki 提交于
A cgroup file returns integer value terminated with '\n' and remaining it has sometimes harmful effects, for example it leads virStrToLong_ull to fail. * src/util/cgroup.c: strip out terminating \n when reading a value
-
- 08 10月, 2009 2 次提交
-
-
由 Cole Robinson 提交于
-
由 Daniel P. Berrange 提交于
* daemon/Makefile.am: Fix missing sasl rule * src/datatypes.c: Add unistd.h to avoid gnulib bug * src/util/cgroup.c: Disable mntent if not available
-
- 07 10月, 2009 1 次提交
-
-
由 Ryota Ozaki 提交于
The patch implements the missing memory control APIs for lxc, i.e., domainGetMaxMemory, domainSetMaxMemory, domainSetMemory, and improves domainGetInfo to return proper amount of used memory via cgroup. * src/libvirt_private.syms: Export virCgroupGetMemoryUsage and add missing virCgroupSetMemory * src/lxc/lxc_driver.c: Implement missing memory functions * src/util/cgroup.c, src/util/cgroup.h: Add the function to get used memory
-
- 22 9月, 2009 1 次提交
-
-
由 Ryota Ozaki 提交于
* src/conf/domain_conf.c: Don't assume all virDomainObjPtr have a non-NULL monitor_chr field in virDomainObjFormat. * src/lxc/lxc_driver.c: Implement suspend/resume driver APis * src/util/cgroup.c, src/util/cgroup.h: Support the 'freezer' cgroup controller * src/libvirt_private.syms: Export virCgroupSetFreezerState and virCgroupGetFreezerState
-