- 28 6月, 2019 2 次提交
-
-
由 Pavel Hrdina 提交于
Because of a systemd delegation policy [1] we should not write to any cgroups files owned by systemd which in case of cgroups v2 includes 'cgroups.subtree_control'. systemd will enable controllers automatically for us to have them available for VM cgroups. [1] <https://github.com/systemd/systemd/blob/master/docs/CGROUP_DELEGATION.md> Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Pavel Hrdina 提交于
This reverts commit 7bca1c9b. As it turns out it's not a good idea on systemd hosts. The root cgroup can have all controllers enabled but they don't have to be enabled for sub-cgroups. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 27 6月, 2019 3 次提交
-
-
由 Daniel P. Berrangé 提交于
This reverts commit 226094fb. A deprecation is a warning to something that use of a feature is being discouraged. By definition it is not an error condition to continue to use a deprecated feature. A VIR_ERR_DEPRECATED constant thus makes no conceptual sense. For features which are entirely absent we already document that the VIR_ERR_NO_SUPPORT code will be used. There is no need to distinguish between a feature which never existed and a feature which previously existed and was since removed. Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
The public API entry points will report VIR_ERR_NO_SUPPORT to the caller when a driver does not provide an implementation of a particular method. When deleting methods, leaving the driver API entry point explicitly set to NULL with an version range comment, allows the hvsupport.html page to document when the AP was removed. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Peter Krempa 提交于
Since c2573527 a reference of 'cfg' would be leaked if the function does not need to process anything. Fix it by using VIR_AUTOUNREF. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 26 6月, 2019 28 次提交
-
-
由 Jie Wang 提交于
when a disk without PR perform attach or detach operation, need not call qemuHotplugRemoveManagedPR, otherwise, it will print err log about PR, let us fix it. Signed-off-by: NJie Wang <wangjie88@huawei.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Daniel P. Berrangé 提交于
The sys/sysctl.h header is only needed on BSD platforms to get the sysctlbyname() function declaration. On Linux we talk to procfs instead to change sysctls. Unfortunately a legacy sys/sysctl.h header does exist on Linux and including it has recently started triggering a deprecation warning from glibc. Protect its inclusion with a HAVE_SYSCTLBYNAME check instead so that it only gets used on platforms where we need that function declaration. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Pavel Hrdina 提交于
When detecting available controllers on host we can be limited by list of controllers from qemu.conf file. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Pavel Hrdina 提交于
Currently CPU controller cannot be enabled if there is any real-time task running and is assigned to non-root cgroup which is the case on several distributions with graphical environment. Instead of erroring out treat it as the controller is not available. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Pavel Hrdina 提交于
In order to skip controllers that we are not able to activate we need to return different return value so the caller can decide what to do. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Pavel Hrdina 提交于
It might happen that we are not able to enable CPU controller so we can enable it for thread sub-cgroups only if it's available in parent cgroup. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Pavel Hrdina 提交于
The assumption that CPU controller would be always enabled is wrong, we should use any available controller to create a new sub-cgroup. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Pavel Hrdina 提交于
This affects only cgroups v2 where enabled controllers are not based on available mount points but on the list provided in cgroup.controllers file. However, moving it will fill in placement as well, so it needs to be freed together with mount point if we don't need that controller. Before this patch we were assuming that all controllers available in root cgroup where available in all other sub-cgroups which was wrong. In order to fix it we need to move the cgroup controllers detection after cgroup placement was prepared in order to build correct path for cgroup.controllers file. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Pavel Hrdina 提交于
In cgroups v2 we don't have to detect available controllers every single time if we are creating a new cgroup based on parent cgroup. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Our code would skip adding the default type in this cases, but since we know that the only reasonable option here is 'fat' we can add it while starting the VM. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
The storage volume may in fact convert into a directory when starting the VM so that it may be actually possible to use it. This is a regression caused by c9b27af3 as moving the check to validation time without adjustment causes problems as the volumes are not translated yet. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
qemuBuildDriveSourceStr omits the disk format string when we are emulating a 'fat' filesystem from a directory. The logic should decide based on the 'actualType' as a disk type=pool may be converted to a directory. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
virStorageSourceGetActualType would return VIR_STORAGE_TYPE_NONE in case when a virStorageSource of (top level) type VIR_STORAGE_TYPE_VOLUME was not prepared to use by the vm by calling virDomainDiskTranslateSourcePool. Fix this issue by returning VIR_STORAGE_TYPE_VOLUME in case when the volume was not translated yet. Additionally also add documentation for the function describing the quirk. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Marc-André Lureau 提交于
The field is set just before returning on success. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Marc-André Lureau 提交于
Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Marc-André Lureau 提交于
Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
When changing media using blockdev-add we need to remove the leftovers if we didn't succeed plugging in the full chain or closing the tray. Otherwise the data structures will be freed and thus the backing chain members will never be unplugged. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
As this conversion removes the last use of qemuHotplugDiskSource* functions we can remove all of them now. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Use the new helpers for removing the backing chain in case when -blockdev is used. For -drive this function has a local implementation. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Replace the use of qemuHotplugDiskSourceAttach* helpers with qemuBuildStorageSourceChainAttachPrepare(Blockdev|Drive). Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Replace the open-coded local implementation with qemuBuildStorageSourceChainAttachPrepare(Drive|Blockdev). Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
These are meant to replace the ad-hoc helpers qemuHotplugDiskSourceAttach... and the open-coded version in qemu_command.c for use in command line generation. The functions for preparing for attach of chains unfortunately need to be in qemu_command.c as they use function defined by that file and inclusion hierarchy. In this patch new functions are introduced and subsequent patches then refactor individual parts to use them. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
We use only one copy-on-read filter per disk, so we should handle it separately from the chain. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Move it to qemu_block.c and call it qemuBlockStorageSourceDetachPrepare. It will be reused in other parts as well. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
We've deprecated qemuConnectDomainXMLFromNative qemuDomainQemuAttach. Switch the error code from VIR_ERR_OPERATION_UNSUPPORTED to the new VIR_ERR_DEPRECATED. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Allow a simple programatic check that a given feature is no longer supported by introducing a separate error code for this scenario. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 25 6月, 2019 6 次提交
-
-
由 Ján Tomko 提交于
Commit a7fb2258 added sanitization of storage pool target paths, however source dir paths were left unsanitized. A netfs pool with: <source> <host name='10.20.30.40'/> <dir path='/nfs/'/> </source> will not be correctly detected as mounted by virStorageBackendFileSystemIsMounted, because it shows up in the mount list without the trailing slash. Sanitize the source dir as well. https://bugzilla.redhat.com/show_bug.cgi?id=1723247Signed-off-by: NJán Tomko <jtomko@redhat.com> Acked-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
The function modifies the context but did not care to restore it back. If a <seclabel> was used on a disk, the <privateData> would not be parsed. Use VIR_XPATH_NODE_AUTORESTORE and add a test case to validate that everything works. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Yi Li 提交于
Add omitted comma for multiple hosts. Fixes: cdd362e0Signed-off-by: NYi Li <yili@winhong.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 John Ferlan 提交于
Commit 9c9620af called x86DataAdd without checking for an error, so add the error checking. Found by Coverity Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
Commit 56b254dc called virCPUx86DataAdd, but returned -1 directly without calling the virCPUx86DataFree. Found by Coverity. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Daniel Henrique Barboza 提交于
Trivial change. Adding the name of the device that has an unknown PCI header type in that function helps when debugging PCI code. Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
- 22 6月, 2019 1 次提交
-
-
由 John Ferlan 提交于
Commit 7bf679ae removed the @json argument from the qemuMonitorOpen prototype; however, it did not update the ATTRIBUTE_NONNULL value which causes a build failure for when checking is enabled such as when lv_cv_static_analysis is enabled. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-