- 12 10月, 2018 3 次提交
-
-
由 Eric Blake 提交于
Commit 4f4c3b13 (v3.3) fixed an issue where performing cleanup of libvirt objects could sometimes lose error messages, by adding code to copy the libvirt error into last_error prior to cleanup paths. However, it caused a regression: on other paths, some errors are now printed twice, if libvirt still remembers in its thread-local storage that an error was set even after virsh cleared last_error. For example: $ virsh -c test:///default snapshot-delete test blah error: Domain snapshot not found: no domain snapshot with matching name 'blah' error: Domain snapshot not found: no domain snapshot with matching name 'blah' Fix things by telling libvirt to discard any thread-local errors at the same time virsh prints an error message (whether or not the libvirt error is the same as what is stored in last_error). Update the virsh-undefine testsuite (partially reverting portions of commit b620bdee, by removing -q, to more easily pinpoint which commands are causing which messages), now that there is only one error message instead of two. Signed-off-by: NEric Blake <eblake@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Olaf Hering 提交于
If the same source gets built twice ('build same source on different hosts at different times') the resulting files may differ. Fix this by sorting the hash keys before usage. Signed-off-by: NOlaf Hering <olaf@aepfle.de>
-
由 John Ferlan 提交于
The function was never defined in source, just the protoype. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 11 10月, 2018 1 次提交
-
-
由 Michal Privoznik 提交于
The mock is built on Linux only. Therefore we should load it only on Linux too. This fixes the FreeBSD build. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
- 10 10月, 2018 5 次提交
-
-
由 Michal Privoznik 提交于
There are couple of things wrong with the current implementation. The first one is that in the first loop the code tries to build a list of fuse.glusterfs mount points. Well, since the strings are allocated in a temporary buffer and are not duplicated this results in wrong decision made later in the code. The second problem is that the code does not take into account subtree mounts. For instance, if there's a fuse.gluster mounted at /some/path and another FS mounted at /some/path/subdir the code would not recognize this subdir mount. Reported-by: NHan Han <hhan@redhat.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Michal Privoznik 提交于
If the given path is already a mount point (e.g. a bind mount of a file, or simply a direct mount point of a FS), then our code fails to detect that because the first thing it does is cutting off part after last slash '/'. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Michal Privoznik 提交于
Introduce some basic test cases for virFileIsSharedFS(). More will be added later. In order to achieve desired result, mocks for setmntent() and statfs() need to be invented because the first thing that virFileIsSharedFS() does is calling the latter. If it finds a FUSE mount it'll call the former. The mock might look a bit complicated, but in fact it's quite simple. The test sets LIBVIRT_MTAB env variable to hold the absolute path to a file containing mount table. Then, statfs() returns matching FS it finds, and setmntent() is there just to replace /proc/mounts with the file the test wants to load. Adding this test also exposed a bug we have - because we assume the given path points to a file we cut off what we assume is a file name to obtain directory path and only then we call statfs(). This is buggy because the passed path could be already a mount point. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Michal Privoznik 提交于
Because of lacking virTestCounterReset() call, the old test cases name was preserved. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Marc Hartmayer 提交于
On s390x the struct member f_type of statsfs is hard coded to 'unsigned int'. Change virFileIsSharedFixFUSE() to take a 'long long int' and use a temporary to avoid pointer-casting. This fixes the following error: ../../src/util/virfile.c:3578:38: error: cast increases required alignment of target type [-Werror=cast-align] virFileIsSharedFixFUSE(path, (long *) &sb.f_type); Signed-off-by: NMarc Hartmayer <mhartmay@linux.ibm.com> Signed-off-by: NBjoern Walk <bwalk@linux.ibm.com>
-
- 09 10月, 2018 2 次提交
-
-
由 Ján Tomko 提交于
virFileReadValueUint does not log errors for non-existient files, it merely returns -2. Commit 12093f1f introduced this. Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Ján Tomko 提交于
-net name= will be deprecated in QEMU 3.1: commit 101625a4d4ac7e96227a156bc5f6d21a9cc383cd net: Deprecate the "name" parameter of -net git describe: v3.0.0-791-g101625a4d4 Use the id option instead, supported since QEMU 1.2: commit 6687b79d636cd60ed9adb1177d0d946b58fa7717 convert net_client_init() to OptsVisitor git describe: v1.0-3564-g6687b79d63 contains: v1.2.0-rc0~142^2~8 Thankfully, libvirt only uses -net for non-PCI, non-virtio NICs on ARM. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NLaine Stump <laine@laine.org> Reviewed-by: NThomas Huth <thuth@redhat.com>
-
- 08 10月, 2018 12 次提交
-
-
由 Peter Krempa 提交于
We now explicitly handle media change elsewhere so we can drop the switch statement. This will also make it more intuitive once CDROM device hotplug might be supported. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
Disk hotplug has slightly different semantics from media changing. Move the media change code out and add proper initialization of the new source object and proper cleanups if something fails. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
In cases where we know the device is a disk we can avoid using the full device definition. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
The disk hotplug code also overloads media change which is not ideal. This will allow splitting out of the media change code. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
The disk storage source needs to be prepared if we want to use -blockdev or secrets for the new media image. It does not hurt to do the same for the legacy hotplug code as well. Unfortunately helpers like qemuDomainPrepareDiskSource take virDomainDiskDef as an argument and it would be hard to fix them to take an explicit source, so the function also temporarily replaces disk->src for the new source in this function. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
Some functions require us to replace disk->src with the new source for them to work properly. To avoid confusion all places which allow explicit virStorageSource should get the appropriate definition. The legacy code fortunately does not need anything from the old source so that does not require modifications. Blockdev does require the old definition so we'll pass it explicitly. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
Since the code is also used when changing media we need to allow specifying explicit source for which we are going to prepare. With this change callers don't have to replace disk->src with the new source definition for generating these. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
qemu media changing code tried to assume old media's format for the new one if that was not specified. Since the format will always be present it does not make sense to keep the code around. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
Old media changing code does not bother setting up the secrets for new media or actually removing/adding of the corresponding objects. Additionally it uses secrets setup for the old image to be removed as the secret for the new image which is wrong. Remove the support for secrets while changing media for the legacy approach. The only reasonable way to fix it is when using blockdev. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
While the idea was good the implementation not so much as we need to take into account the old disk data and the new source. The code will be consolidated later in a different way. This reverts commit 663b1d55. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
Preparing the storage source prior to assigning the alias will not work as the names of the certain objects depend on the alias for the legacy hotplug case as we generate the object names for the secrets based on the alias. This reverts commit 192fdaa6. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Michal Privoznik 提交于
For non-Linux platforms we have virHostValidateCGroupControllers() stub which only reports an error. But we are not marking the ignored arguments the way we should. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
- 05 10月, 2018 17 次提交
-
-
由 Pavel Hrdina 提交于
Cgroup freezer support for LXC was added in libvirt-0.7.2. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
This removes code duplication and simplifies cgroup detection. As a drawback we will not have separate messages to enable cgroup controller in kernel or to mount it. On the other side the rewrite adds support for cgroup v2. The kernel config support was wrong because it was parsing '/proc/self/cgroup' instead of '/proc/cgroups/' file. The mount suggestion is removed as well because it will not work with cgroup v2. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
We need to configure multiple env variables for each set of tests so create helper functions to do that. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
We need to create the cgroup v2 sysfs the same way as we do for cgroup v1. This introduces new VIR_CGROUP_MOCK_MODE env variable which will configure which cgroup mode each test requires. There are three different modes: - legacy: only cgroup v1 is available and it's the default mode - hybrid: both cgroup v1 and cgroup v2 are available and have some controllers - unified: only cgroup v2 is available Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Remove the trailing '/' from prefix. This change is required in order to introduce tests for unified cgroups. They are usually mounted in '/sys/fs/cgroup'. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
This enables to use both cgroup v1 and v2 at the same time together with libvirt. It is supported by kernel and there is valid use-case, not all controllers are implemented in cgroup v2 so there might be configurations where administrator would enable these missing controllers in cgroup v1. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
All mandatory callbacks are implemented for cgroup v2 backend so we can register it now. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-