- 07 Aug, 2020 3 commits
-
-
Han Han authored
Signed-off-by:
Han Han <hhan@redhat.com>
-
Han Han authored
Ceph Nautilus supports separate image namespaces within a pool for tenant isolation and QEMU added it as a rbd blockdev options from 5.0.0. This optional attribute is used to access a image with namespace. Add unit tests for this attribute. https://bugzilla.redhat.com/show_bug.cgi?id=1816909Signed-off-by:
Han Han <hhan@redhat.com>
-
Han Han authored
Signed-off-by:
Han Han <hhan@redhat.com>
-
- 06 Aug, 2020 1 commit
-
-
Han Han authored
Add rbd namespace in aarch64 capability replies. The capability flag will be used for rbd namespace option. The rbd namespace is introduced since ceph Nautilus and qemu v5.0.0. Signed-off-by:
Han Han <hhan@redhat.com>
-
- 05 Aug, 2020 8 commits
-
-
Pavel Hrdina authored
Commit <74416b1d> added check for rl_completion_quote_character to make sure we have correct readline library. Commit <a9443bc9> added inaccurate comment that it's a function. We need to check for generic symbol instead of checking for function. In addition the readline/readline.h file requires stdio.h to by included beforehand which was done in autotools but I dropped it in meson. And lastly the final condition to print error or disable readline was broken as well by replacing the readline_dep every time if readline was not explicitly enabled. Reported-by:
Erik Skultety <eskultet@redhat.com> Signed-off-by:
Pavel Hrdina <phrdina@redhat.com> Reviewed-by:
Andrea Bolognani <abologna@redhat.com>
-
Pavel Hrdina authored
In meson.build we define sanlock_dep only if it is available but in addition we add 'WITH_SANLOCK' into conf. Use the presence of 'WITH_SANLOCK' in conf to figure out if we need to install virt-sanlock-cleanup man page. Reported-by:
Michal Privoznik <mprivozn@redhat.com> Signed-off-by:
Pavel Hrdina <phrdina@redhat.com> Reviewed-by:
Erik Skultety <eskultet@redhat.com>
-
Erik Skultety authored
By default, symlink re-creation fails if the link already exists, more specifically in case of meson-install-symlink.py: Traceback (most recent call last): File "/<path_to_libvirt_repo>/scripts/meson-install-symlink.py", line 15, in <module> os.symlink(target, link) FileExistsError: File exists: '../default.xml' -> 'default.xml' Unfortunately, Python can't mimic "ln -sf", so we have to fix this differently - remove the existing link first and then try re-creating it. Signed-off-by:
Erik Skultety <eskultet@redhat.com> Reviewed-by:
Pavel Hrdina <phrdina@redhat.com>
-
Jiri Denemark authored
When COW is not explicitly requested to be disabled or enabled, the function is supposed to do nothing on non-BTRFS file systems. Fixes commit 7230bc95. https://bugzilla.redhat.com/show_bug.cgi?id=1866157Signed-off-by:
Jiri Denemark <jdenemar@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com>
-
Laine Stump authored
and stop erroneously equating NULL with "". The latter means that the element has empty content, while the former means there was an error during parsing (either internal with the parser, or the content of the XML was bad). Signed-off-by:
Laine Stump <laine@redhat.com> Reviewed-by:
Michal Privoznik <mprivozn@redhat.com>
-
Laine Stump authored
Many of our calls to xmlNodeGetContent() (which are now all via virXMLNodeContentString() are failing to check for a NULL return. We need to remedy that, but in order to make the remedy simpler, let's log an error in virXMLNodeContentString(), so that the callers don't all individually need to (since it would be the same error message for all of them anyway). Signed-off-by:
Laine Stump <laine@redhat.com> Reviewed-by:
Michal Privoznik <mprivozn@redhat.com>
-
Laine Stump authored
No functional change Signed-off-by:
Laine Stump <laine@redhat.com> Reviewed-by:
Michal Privoznik <mprivozn@redhat.com>
-
Laine Stump authored
virDomainBlkioDeviceParseXML() calls xmlNodeGetContent() multiple times in a loop, but can easily be refactored to call it once for all element nodes, and then use the result of that one call in each of the (mutually exclusive) blocks that previously each had their own call to xmlNodeGetContent. This is being done in order to reduce the number of changes needed in an upcoming patch that will eliminate the lack of checking for NULL on return from xmlNodeGetContent(). As part of the simplification, the while() loop has been changed into a for() so that we can use "continue" without bypassing the "node = node->next". Signed-off-by:
Laine Stump <laine@redhat.com> Reviewed-by:
Michal Privoznik <mprivozn@redhat.com>
-
- 04 Aug, 2020 16 commits
-
-
Jano Tomko authored
s/hystorical/historical/ Signed-off-by:
Ján Tomko <jtomko@redhat.com>
-
Daniel P. Berrangé authored
We should prevent inlining of symbols from the driver .so files that are mocked, as well as those in the main libvirt.so This isn't fixing any currently known problem, just trying to prevent future issues. Reviewed-by:
Ján Tomko <jtomko@redhat.com> Signed-off-by:
Daniel P. Berrangé <berrange@redhat.com>
-
Roman Bogorodskiy authored
Commit bcbb0269 converted qemublocktest to use g_autoptr for virQEMUCaps. To prevent it from crashing, don't explicitly call virObjectUnref() on this object. Signed-off-by:
Roman Bogorodskiy <bogorodskiy@gmail.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com>
-
Daniel P. Berrangé authored
The meson conversion lost the <meta> tags providing the go-import, because the "$pagename" variable lost the .html suffix. Rather than fix that, just change to using "$pagesrc" instead, as it is a better fit. The 404 page also needs to use absolute links to work correctly for pages in sub-folders. Reviewed-by:
Pavel Hrdina <phrdina@redhat.com> Signed-off-by:
Daniel P. Berrangé <berrange@redhat.com>
-
Daniel P. Berrangé authored
sc_proper_name_utf8_requires_ICONV looks for Makefile.am files, so is not going to work correctly with meson, nor did we ever use the GNULIB "proper_name_utf8" function. The 'today' variable is not referenced anywhere. The 'writable-files' target is not used anywhere sc_prohibit_reversed_compare_failure only checks 'init.sh' which does not exist in libvirt. Reviewed-by:
Ján Tomko <jtomko@redhat.com> Signed-off-by:
Daniel P. Berrangé <berrange@redhat.com>
-
Peter Krempa authored
We already allow controlling the initiator IQN for iSCSI based disks. Add the same for host devices. Signed-off-by:
Peter Krempa <pkrempa@redhat.com> Reviewed-by:
Ján Tomko <jtomko@redhat.com>
-
Peter Krempa authored
For now just plain conversion to rst. Anchors which existed until now are preserved, but the table of contents now uses the docutils-generated ones. Additionally <code> which was nested in a link (<a>) was removed as rst doesn't support nesting of inline markup. The only anchor which wasn't restored is 'elementsDiskBackingStoreIndex' and its only reference was removed. Signed-off-by:
Peter Krempa <pkrempa@redhat.com> Reviewed-by:
Ján Tomko <jtomko@redhat.com>
-
Andrea Bolognani authored
Whenever libvirt is upgraded on a Debian system, the user will be prompted along the lines of Configuration file '/etc/libvirt/qemu/networks/default.xml' ==> Modified (by you or by a script) since installation. ==> Package distributor has shipped an updated version. What would you like to do about it ? Your options are: Y or I : install the package maintainer's version N or O : keep your currently-installed version D : show the differences between the versions Z : start a shell to examine the situation The default action is to keep your current version. *** default.xml (Y/I/N/O/D/Z) [default=N] ? d --- /etc/libvirt/qemu/networks/default.xml 2020-08-04 12:57:25.450911143 +0200 +++ /etc/libvirt/qemu/networks/default.xml.dpkg-new 2020-08-03 22:47:15.000000000 +0200 @@ -1,19 +1,11 @@ -<!-- -WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE -OVERWRITTEN AND LOST. Changes to this xml configuration should be made using: - virsh net-edit default -or other application using the libvirt API. ---> - <network> <name>default</name> - <uuid>612a2cab-72fb-416d-92bc-4d9e597bfb63</uuid> - <forward mode='nat'/> - <bridge name='virbr0' stp='on' delay='0'/> - <mac address='52:54:00:1f:03:79'/> - <ip address='192.168.122.1' netmask='255.255.255.0'> + <uuid>d020b839-4379-492c-aa74-eab7365076e6</uuid> + <bridge name="virbr0"/> + <forward/> + <ip address="192.168.122.1" netmask="255.255.255.0"> <dhcp> - <range start='192.168.122.2' end='192.168.122.254'/> + <range start="192.168.122.2" end="192.168.122.254"/> </dhcp> </ip> </network> The UUID situation should probably be handled the same way it is in the spec file by stripping it, and in general we could behave much better towards users, but one part of the diff that immediately stands out is that some lines are highlighted not because they are semantically different, but simply because they use different types of quotes around attributes. Since the canonical version of all libvirt XML documents (as returned by the various vir*GetXMLDesc() APIs) as well as the on-disk representations use single quotes, let's use the same for configuration files we install as well. Signed-off-by:
Andrea Bolognani <abologna@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com>
-
Wu Binfeng authored
If there's a list of mdevs to be assigned to a domain, but one of them (NOT the first) is already assigned to a different domain we're going to crash in the qemuProcessStop phase in virMediatedDeviceListFindIndex, because some of the pointers in mgr->activeMediatedHostdevs are dangling. This is due to virMediatedDeviceListMarkDevices using cleanup instead of rollback when we find out that a device is already taken. Reproducer steps: 1. start vm1 with mdev1 2. start vm2 with mdev2, mdev1 (the order is important!) Backtrace: #0 0x0000ffffb8c36250 in strcmp #1 0x0000ffffb9b80754 in virMediatedDeviceListFindIndex #2 0x0000ffffb9b80870 in virMediatedDeviceListFind #3 0x0000ffffb9c9e168 in virHostdevReAttachMediatedDevices #4 0x0000ffff9949f724 in qemuHostdevReAttachMediatedDevices #5 0x0000ffff9949f7f8 in qemuHostdevReAttachDomainDevices #6 0x0000ffff994bcd70 in qemuProcessStop #7 0x0000ffff994bf4e0 in qemuProcessStart Signed-off-by:
Binfeng Wu <wubinfeng@huawei.com> Reviewed-by:
Erik Skultety <eskultet@redhat.com>
-
Andrea Bolognani authored
We've hit issues with GitLab CI jobs reporting a failure despite the corresponding Cirrus CI job finishing successfully: this is apparently caused by the underlying VM being rescheduled. A workaround for this issue has been implemented as of https://github.com/sio/cirrus-run/commit/5299874bbb71a84bec7476d9d0ca4ba49bb7ed97 which will be included in the upcoming 0.3.0 release; however, in order to validate that this workaround is effective it would be useful to have more data. Based on the conversation in https://github.com/sio/cirrus-run/issues/4 enabling verbose mode allows to collect this data while not having any impact on performance, so let's enable it temporarily and then disable it again once cirrus-run 0.3.0 is out. Signed-off-by:
Andrea Bolognani <abologna@redhat.com> Reviewed-by:
Ján Tomko <jtomko@redhat.com>
-
Andrea Bolognani authored
This feature has been implemented as of https://github.com/sio/cirrus-run/commit/b9b2278f1d6c45b22d5f84fca0621e77622a6da4 and will be included in the upcoming 0.3.0 release. Signed-off-by:
Andrea Bolognani <abologna@redhat.com> Reviewed-by:
Ján Tomko <jtomko@redhat.com>
-
Pavel Hrdina authored
The header log_manager.h doesn't use anything from log_protocol.h and the only other place than logging using log_protocol.h is qemu_command.c where we can include log_protocol.h directly to have enum value VIR_LOG_MANAGER_PROTOCOL_DOMAIN_OPEN_LOG_FILE_TRUNCATE available. Fixes race-condition compilation error with meson: In file included from ../tests/qemuhotplugmock.c:21: In file included from ../src/qemu/qemu_hotplug.h:25: In file included from ../src/qemu/qemu_domain.h:42: ../src/logging/log_manager.h:25:10: fatal error: 'logging/log_protocol.h' file not found ^~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. Reported-by:
Ján Tomko <jtomko@redhat.com> Signed-off-by:
Pavel Hrdina <phrdina@redhat.com> Reviewed-by:
Ján Tomko <jtomko@redhat.com>
-
Pavel Hrdina authored
We already include viraccessapicheck.h few lines above. Signed-off-by:
Pavel Hrdina <phrdina@redhat.com> Reviewed-by:
Ján Tomko <jtomko@redhat.com>
-
Pavel Hrdina authored
Reported-by:
Daniel P. Berrangé <berrange@redhat.com> Signed-off-by:
Pavel Hrdina <phrdina@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com>
-
Erik Skultety authored
During the switch to meson, one of the patches mistakenly changed the runtime socket prefix for {libvirtd, virtproxyd} to "libvirtd-" from the original "libvirt-". Not to be mistaken with the systemd unit name which actually follows the daemon name, IOW the systemd unit name remains as e.g. "libvirtd.socket", but the actual unix socket created on the filesystem that the daemon binds to must be named "libvirt-sock" and not "libvirtd-sock". Fixes: dd4f2c73Signed-off-by:
Erik Skultety <eskultet@redhat.com> Reviewed-by:
Pavel Hrdina <phrdina@redhat.com>
-
Erik Skultety authored
Signed-off-by:
Erik Skultety <eskultet@redhat.com>
-
- 03 Aug, 2020 12 commits
-
-
Michal Privoznik authored
We can use qemuDomainSetupInput() to obtain the path that we need to unlink() from within domain's namespace. Signed-off-by:
Michal Privoznik <mprivozn@redhat.com> Reviewed-by:
Ján Tomko <jtomko@redhat.com>
-
Michal Privoznik authored
We can use qemuDomainSetupRNG() to obtain the path that we need to unlink() from within domain's namespace. Signed-off-by:
Michal Privoznik <mprivozn@redhat.com> Reviewed-by:
Ján Tomko <jtomko@redhat.com>
-
Michal Privoznik authored
We can use qemuDomainSetupChardev() to obtain the path that we need to unlink() from within domain's namespace. Note, while previously we unlinked only VIR_DOMAIN_CHR_TYPE_DEV chardevs, with this change we unlink some other types too - exactly those types we created when plugging the device in. Signed-off-by:
Michal Privoznik <mprivozn@redhat.com> Reviewed-by:
Ján Tomko <jtomko@redhat.com>
-
Michal Privoznik authored
We can use qemuDomainSetupMemory() to obtain the path that we need to unlink() from within domain's namespace. Signed-off-by:
Michal Privoznik <mprivozn@redhat.com> Reviewed-by:
Ján Tomko <jtomko@redhat.com>
-
Michal Privoznik authored
In my attempt to deduplicate the code, we can use qemuDomainSetupHostdev() to obtain the list of paths to unlink and then pass it to qemuDomainNamespaceUnlinkPaths() to unlink them in a single fork. Signed-off-by:
Michal Privoznik <mprivozn@redhat.com> Reviewed-by:
Ján Tomko <jtomko@redhat.com>
-
Michal Privoznik authored
So far, the only caller qemuDomainNamespaceUnlinkPath() will always pass a single path to unlink, but similarly to qemuDomainNamespaceMknodPaths() - there are a few callers that would like to pass two or more files to unlink at once (held in a string list). Make the @paths argument a string list then. Signed-off-by:
Michal Privoznik <mprivozn@redhat.com> Reviewed-by:
Ján Tomko <jtomko@redhat.com>
-
Michal Privoznik authored
To match how Mknod counterpart was renamed. Signed-off-by:
Michal Privoznik <mprivozn@redhat.com>
-
Michal Privoznik authored
Simirarly to qemuDomainAttachDeviceMknodHelper() which was modified just a couple of commits ago, modify the unlink helper which is called on device detach so that it can unlink multiple files in one go instead of forking off for every single one of them. Signed-off-by:
Michal Privoznik <mprivozn@redhat.com> Reviewed-by:
Ján Tomko <jtomko@redhat.com>
-
Michal Privoznik authored
After previous cleanup, creating /dev nodes from pre-exec hook is no longer needed and thus can be removed. Signed-off-by:
Michal Privoznik <mprivozn@redhat.com> Reviewed-by:
Ján Tomko <jtomko@redhat.com>
-
Michal Privoznik authored
As mentioned in one of previous commits, populating domain's namespace from pre-exec() hook is dangerous. This commit moves population of the namespace with domain SEV into daemon's namespace. Signed-off-by:
Michal Privoznik <mprivozn@redhat.com> Reviewed-by:
Ján Tomko <jtomko@redhat.com>
-
Michal Privoznik authored
As mentioned in one of previous commits, populating domain's namespace from pre-exec() hook is dangerous. This commit moves population of the namespace with domain loader into daemon's namespace. Signed-off-by:
Michal Privoznik <mprivozn@redhat.com> Reviewed-by:
Ján Tomko <jtomko@redhat.com>
-
Michal Privoznik authored
As mentioned in one of previous commits, populating domain's namespace from pre-exec() hook is dangerous. This commit moves population of the namespace with domain RNGs into daemon's namespace. Signed-off-by:
Michal Privoznik <mprivozn@redhat.com> Reviewed-by:
Ján Tomko <jtomko@redhat.com>
-