- 17 2月, 2016 3 次提交
-
-
由 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.
-
由 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.
-
由 Peter Krempa 提交于
Similarly to commit 47e5b5ae virCgroupDenyDevice will handle -1 as *.
-
- 08 2月, 2016 2 次提交
-
-
由 Michal Privoznik 提交于
In the commit 7938b533 we've changed the function signature, however forgot to update stump that's used on systems without CGroups causing a build failure. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Pass a bitmap of enabled guest vCPUs to virCgroupGetPercpuStats so that non-continuous vCPU topologies can be used.
-
- 05 2月, 2016 1 次提交
-
-
由 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>
-
- 03 2月, 2016 1 次提交
-
-
由 Peter Krempa 提交于
Use 'ret' for return variable name, clarify use of 'param_idx' and avoid unnecessary 'success' label. No functional changes. Also document the function.
-
- 27 1月, 2016 2 次提交
-
-
由 Michal Privoznik 提交于
In dc576025 we renamed virCgroupIsolateMount function to virCgroupBindMount. However, we forgot about one occurrence in section of the code which provides stubs for platforms without support for CGroups like *BSD for instance. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 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>
-
- 15 1月, 2016 1 次提交
-
-
由 John Ferlan 提交于
This reverts commit 71ce4759. Since commit id 'a41c00b4' has been reverted, this no longer is necessary
-
- 12 1月, 2016 1 次提交
-
-
As cgroup implementation only works on Linux, it does not make much sense to include sys/mount.h if other requirements are not met, such as HAVE_MNTENT_H and HAVE_GETMNTENT_R. Also, it fixes build on OpenBSD that requires to include sys/param.h along with sys/mount.h. Signed-off-by: NRoman Bogorodskiy <bogorodskiy@gmail.com>
-
- 25 12月, 2015 1 次提交
-
-
由 Michal Privoznik 提交于
The manpage for sysconf() suggest including unistd.h as the function is declared there. Even though we are not hitting any compile issues currently, let's include the correct header file instead of relying on some hidden include chain. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 15 12月, 2015 1 次提交
-
-
由 Henning Schild 提交于
virCgroupNewMachine used to add the pidleader to the newly created machine cgroup. Do not do this implicit anymore. Signed-off-by: NHenning Schild <henning.schild@siemens.com>
-
- 20 8月, 2015 1 次提交
-
-
由 Roman Bogorodskiy 提交于
Commit 89c509a0 added getters for cgroup block device I/O throttling, however stub versions of these functions have not matching function prototypes that result in compilation fail on platforms not supporting cgroup. Fix build by correcting prototypes of the stubbed functions. Pushing under build-breaker rule.
-
- 19 8月, 2015 2 次提交
-
-
由 Martin Kletzander 提交于
Since now they were not needed, but I sense they will be in a short while. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
This function translates device paths to "major:minor " string, and all virCgroupSetBlkioDevice* functions are modified to use it. It's a cleanup with no functional change. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 22 7月, 2015 1 次提交
-
-
由 Peter Krempa 提交于
The scope name, even according to our docs is "machine-$DRIVER\x2d$VMNAME.scope" virSystemdMakeScopeName would use the resource partition name instead of "machine-" if it was specified thus creating invalid scope paths. This makes libvirt drop cgroups for a VM that uses custom resource partition upon reconnecting since the detected scope name would not match the expected name generated by virSystemdMakeScopeName. The error is exposed by the following log entry: debug : virCgroupValidateMachineGroup:302 : Name 'machine-qemu\x2dtestvm.scope' for controller 'cpu' does not match 'testvm', 'testvm.libvirt-qemu' or 'machine-test-qemu\x2dtestvm.scope' for a "/machine/test" resource and "testvm" vm. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1238570
-
- 14 7月, 2015 1 次提交
-
-
由 John Ferlan 提交于
Add the sysfs_prefix argument to the call to allow for setting the path for tests to something other than SYSFS_SYSTEM_PATH.
-
- 10 4月, 2015 2 次提交
-
-
由 John Ferlan 提交于
Replace the virCgroupNew{Vcpu|Emulator|IOThread} calls with the common virCgroupNewThread API Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Create a new common API to replace the virCgroupNew{Vcpu|Emulator|IOThread} API's using an emum to generate the cgroup name Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 08 4月, 2015 1 次提交
-
-
由 Michal Privoznik 提交于
This new internal API checks if given CGroup controller is available. It is going to be needed later when we need to make a decision whether pin domain memory onto NUMA nodes using cpuset CGroup controller or using numa_set_membind(). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 30 3月, 2015 2 次提交
-
-
由 Michal Privoznik 提交于
When creating new internal representation of cgroups, all passed arguments are logged. Well, except for two: pid and pointer for return value. Lets log them too. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
The function has no argument named @name rather than @path instead. The comment is, however, referring to @name while it should have been referring to @path really. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 28 3月, 2015 2 次提交
-
-
由 John Ferlan 提交于
Commit id '2dbfa716' exposed virCgroupDetectMountsFromFile, but did not add the corresponding entry in the "#else /* !VIR_CGROUP_SUPPORTED */" section of the module.
-
由 John Ferlan 提交于
Commit id 'ba1dfc5b' added virCgroupSetCpusetMemoryMigrate and virCgroupGetCpusetMemoryMigrate, but did not add the corresponding entry points into the "#else /* !VIR_CGROUP_SUPPORTED */" section
-
- 20 3月, 2015 1 次提交
-
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 18 3月, 2015 1 次提交
-
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 13 3月, 2015 1 次提交
-
-
由 Ján Tomko 提交于
A helper that never returns an error and treats bits out of bitmap range as false. Use it everywhere we use ignore_value on virBitmapGetBit, or loop over the bitmap size.
-
- 26 1月, 2015 1 次提交
-
- 23 1月, 2015 1 次提交
-
-
由 Ján Tomko 提交于
Per-cpu stats are only shown for present CPUs in the cgroups, but we were only parsing the largest CPU number from /sys/devices/system/cpu/present and looking for stats even for non-present CPUs. This resulted in: internal error: cpuacct parse error
-
- 20 1月, 2015 1 次提交
-
- 15 1月, 2015 1 次提交
-
-
由 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.
-
- 21 12月, 2014 1 次提交
-
-
由 Martin Kletzander 提交于
Commit 1a80b97d, which added the virCgroupHasEmptyTasks() function forgot that the parameter @cgroup may be NULL and did not check that. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 16 12月, 2014 1 次提交
-
-
由 Martin Kletzander 提交于
That function helps checking whether there's a task in that cgroup. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 13 12月, 2014 1 次提交
-
-
由 Cédric Bosdonnat 提交于
When calling virCgroupAllowAllDevices we get these invalid entries in the device cgroup config. b -1:-1 rw c -1:-1 rw Check for positive values before outputting the major and minor to avoid that.
-
- 19 11月, 2014 1 次提交
-
-
由 Eric Blake 提交于
I noticed this while working on qemuDomainGetBlockInfo. Assigning a bool value to an int variable compiles fine, but raises red flags on the maintenance front as it becomes too easy to assign -1 or 2 or any other non-bool value to the same variable. * cfg.mk (sc_prohibit_int_assign_bool): New rule. * src/conf/snapshot_conf.c (virDomainSnapshotRedefinePrep): Fix offenders. * src/qemu/qemu_driver.c (qemuDomainGetBlockInfo) (qemuDomainSnapshotCreateXML): Likewise. * src/test/test_driver.c (testDomainSnapshotAlignDisks): Likewise. * src/util/vircgroup.c (virCgroupSupportsCpuBW): Likewise. * src/util/virpci.c (virPCIDeviceBindToStub): Likewise. * src/util/virutil.c (virIsCapableVport): Likewise. * tools/virsh-domain-monitor.c (cmdDomMemStat): Likewise. * tools/virsh-domain.c (cmdBlockResize, cmdScreenshot) (cmdInjectNMI, cmdSendKey, cmdSendProcessSignal) (cmdDetachInterface): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 02 10月, 2014 2 次提交
-
-
由 Ján Tomko 提交于
Fix the build on FreeBSD, broken by commit 4882618e. Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Guido Günther 提交于
If we don't properly clean up all processes in the machine-<vmname>.scope systemd won't remove the cgroup and subsequent vm starts fail with 'CreateMachine: File exists' Additional processes can e.g. be added via echo $PID > /sys/fs/cgroup/systemd/machine.slice/machine-${VMNAME}.scope/tasks but there are other cases like http://bugs.debian.org/761521 Invoke TerminateMachine to be on the safe side since systemd tracks the cgroup anyway. This is a noop if all processes have terminated already.
-
- 16 9月, 2014 2 次提交
-
-
由 John Ferlan 提交于
I missed adding virCgroupNewIOThread to the !VIR_CGROUP_SUPPORTED Pushing as build breaker
-
由 John Ferlan 提交于
Add virCgroupNewIOThread() to mimic virCgroupNewVcpu() except the naming scheme with use "iothread" rather than "vcpu".
-