[pull] master from libvirt:master#2443
Closed
pull[bot] wants to merge 348 commits intobergwolf:masterfrom
Closed
Conversation
The current virtStorageBackendZFSCheckPool checks for the existence of a path under /dev/zvol/ to determine if the pool is active. ZFS does not create a path under /dev/zvol/ if no ZFS volumes have been created under a particular dataset, thus, empty ZFS storage pools are deactivated whenever checkPool is called on them (as noted in referenced issue). This commit changes virStorageBackendZFSCheckPool so that the 'zfs list' command is used to explicitly check for the existence a dataset specified by the pool's def->source.name. Resolves: https://gitlab.com/libvirt/libvirt/-/issues/221 Signed-off-by: Matt Low <matt@mlow.ca> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
A test case can be part of a test suite (just like we already have 'syntax-check'). This then allows developers to run only a subset of tests. For instance - when using valgrind test setup (`meson test -C _build/ --setup valgrind`) it makes zero sense to run syntax-check tests or other script based tests (e.g. check-augeas-*, check-remote_protocol, etc.). What does makes sense is to run compiled binaries. Strictly speaking, reaching that goal is as trivial as annotating only those compiled tests (declared in tests/meson.build) and running them selectively: meson test -C _build/ --setup valgrind --suite $TAG But it may be also desirable to run test scripts separately. Therefore, introduce two new tags: 'bin' for compiled tests, and 'script' for script based tests and annotate each test() accordingly. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Since nobody is expected to run valgrind over scripts now, we can drop plenty of suppressions. Also, there are some old ones that no longer exist and new ones, that are not covered. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
All services are ordered after local-fs.target unless they have set DefaultDependencies=no, which we do not do. https://gitlab.com/libvirt/libvirt/-/issues/489 Reviewed-by: Peter Krempa <pkrempa@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
The unit files both have After=network.target, and this in turn implies After=network-pre.target. Both iptables.service & ip6tables.service have Before=network-pre.target since Fedora >= 35 and RHEL >= 8.4. When we first added the deps on ip[6]tables.service in commit 0756415 Author: Laine Stump <laine@redhat.com> Date: Fri May 1 00:05:50 2020 -0400 systemd: start libvirtd after firewalld/iptables services the Before=network-pre.target didn't exist, but we can rely on it now given our supported platforms matrix. The firewalld.service has similarly has a Before=network-pre.target, even when we took that commit above, so this dep was in face never actually needed. This answers the question posed in that above commit message about firewalld ordering. https://gitlab.com/libvirt/libvirt/-/issues/489 Reviewed-by: Peter Krempa <pkrempa@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
These wrappers added no semantic difference over calling the system function directly. Reviewed-by: Peter Krempa <pkrempa@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Historically the max files limit for processes has always been 1024, because going beyond this is incompatible with the select() function. None the less most apps these days will use poll() so should not be limited in this way. Since systemd >= 240, the hard limit will be 500k, while the soft limit remains at 1k. Applications which don't use select() should raise their soft limit to match the hard limit during their startup. This function provides a convenient helper to do this limit raising. Reviewed-by: Peter Krempa <pkrempa@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
None of our daemons use select(), so it is safe to raise the max file limit to its maximum on startup. https://gitlab.com/libvirt/libvirt/-/issues/489 Reviewed-by: Peter Krempa <pkrempa@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Since systemd 240, all services get an open file hard limit of 500k, and a soft limit of 1024. This limit means apps are safe to use select() by default which is limited to 1024 FDs. Apps which don't use select() are expected to simply set their soft limit to match the hard limit during startup. With our current unit file settings we've been effectively reducing the max open files we have on most modern systems. https://gitlab.com/libvirt/libvirt/-/issues/489 Reviewed-by: Peter Krempa <pkrempa@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Historically we wanted to check if logind was actually running, not merely activatable, because on systems where systemd is installed, but the OS is booted into non-systemd init, we want to fallback to pm-utils. Requiring logind to be running, however, forces us to serialize libvirtd startup on startup of logind which is undesirable. We can relax this dependancy if we check whether systemd itself is running, which implies that logind will activated when we need it. https://gitlab.com/libvirt/libvirt/-/issues/489 Reviewed-by: Peter Krempa <pkrempa@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
After the previous commit we no longer require that logind is actually running, it merely has to be activatable. https://gitlab.com/libvirt/libvirt/-/issues/489 Reviewed-by: Peter Krempa <pkrempa@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Rewrap argument definition of qemuDomainSaveInternal and align argument in the invocation of the aforementioned function in qemuDomainManagedSaveHelper. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
All backing chain members which were auto-added by image detection, including the terminating element, should have the 'detected' property set to true. This is needed to properly strip the detected elements in some cases, e.g. for the status XML where we could treat some images as manually terminated even when it was auto-detected. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
We can easily report how many tests failed. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
The domain capabilities data feature a firmware section which is filled by few entries. The entries used until now looked real and it was suspicious that a x86_64 host was listing aarch64 firmware images which should not happen. Fill it by an obviously fake path as it's not actually interpreted in a meaningful way. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
… into cache Expand the default machine type alias of the 'latest' capabilities for an architecture before caching it rather than after copying it, so that we don't duplicate the work all the time. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Introduce testQemuGetRealCapsInternal that loads and caches the capabilities. testQemuGetRealCaps just copies the cache entry and returns it to the user. The new helper will be used in a helper that doesn't modify the capabilities and thus we don't need to copy it before use. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
'testQemuInsertRealCaps' looks up and inserts real capabilities into the capability 'file cache' for testing purposes. Effectively this helper replaces following steps: 1) testQemuGetRealCaps 2) virFileCacheClear 3) qemuTestCapsCacheInsert This helper doesn't copy the capabilities that are borrowed from it's internal cache thus they must not be modified afterwards in contrast to the above steps. The use of this helper is in simple tests which require some form of capabilities to parse a definition but don't care about doctoring them in any way. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Rewrite the capability fetching to use the new helper, thus simplifying the code. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
…n all test data Use the platform which is getting most development for the snapshot XML examples so that it's tested against latest capabilities. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
…tions Some test cases require a real definition and thus parse a XML with the definition to obtain it. Convert the code to use real capabilities and switch to x86_64. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
…l test data Use the platform which is getting most development for the checkpoint XML examples so that it's tested against latest capabilities. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
…izing driver In an effort to use strictly real capability testing all tests were converted to do insertion of their own capabilities when required, thus we don't need to popluate the capabilities. This will also promote using proper capabilities based on what the test is trying to achieve. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
…earch' CVE-2023-3750 'virStoragePoolObjListSearch' explicitly documents that it's returning a pointer to a locked and ref'd pool that maches the lookup function. This was not the case as in commit 0c4b391 (released in libvirt-8.3.0) the code was accidentally converted to use 'VIR_LOCK_GUARD' which auto-unlocked it when leaving the scope, even when the code was originally "leaking" the lock. Revert the corresponding conversion and add a comment that this function is intentionally leaking a locked object. Fixes: 0c4b391 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2221851 Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
Update the test data on x86_64 to v8.0.0-2835-g361d539735
Notable changes:
- added new commands:
- cxl-inject-dram-event
- cxl-inject-general-media-event
- cxl-inject-memory-module-event
- cxl-inject-poison
- switchover-ack
- q35-8.1 machine type now supports 1024 cpus
- new cpu models:
- 'SapphireRapids-v2'
- 'GraniteRapids-v1'
- removed commands:
- x-query-profile
- cpu features which can be emulated now:
- rdseed, rdpid, 3dnowprefetch, xsaveerptr, wbnoinvd
- applicable CPU bug mitigation flags are now exposed to TCG guests to
allow using more named models
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
The support for configuring the 'wwn' of a SCSI disk was added in qemu commit 27395add759ff4caeb0 (v1.0-3326-g27395add75) and can't be compiled out. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
The support for configuring the 'wwn' of a IDE disk was added in qemu commit 95ebda85e09 (v1.0-1869-g95ebda85e0) and can't be compiled out. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
…ed|Active nodeDeviceUpdateMediatedDevices invokes virMdevctlListDefined and virMdevctlListActive both of which were passed the same 'errmsg' buffer. Since virCommandSetErrorBuffer() always allocates the error buffer one of them was leaked. Fix it by populating the 'errmsg' buffer only on failure of virMdevctlListActive|Defined which invoke the command. Add a comment to nodeDeviceGetMdevctlListCommand reminding how virCommandSetErrorBuffer() works. Fixes: 44a0f2f Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Normally I wouldn't bother with a change like this, but I was touching the function anyway, and wanted to leave it looking nice and tidy. Signed-off-by: Laine Stump <laine@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Our XML schema requires absolute paths for the <kernel> and disk source values. Fix the 'ch' test to have absolute paths. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
…ectories The test files for the 'ch' driver were not validated against the schema and thus also didn't conform to the schema. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
Pass the state-based suffix directly as string. Document the logic how the filename is chosen. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
Use the new macro instead of open coding it. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
…s' member Rather than having a separate argument to DO_TEST pass the state via newly added flags 'FLAG_SKIP_CONFIG_ACTIVE'. The '_INACTIVE' equivalent was not added as there's no test which'd use it. Remove the old 'WHEN_' flags and move the decision logic out of the DO_TEST macro as any addition to the logic makes the compiler take much longer to compile qemuxml2xmltest. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
Use real capabilities for these last few tests that were not modernized due to use of 'WHEN_INACTIVE'. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
Now all tests invoke a real-capability version. Remove DO_TEST. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This patch adds new elements <title> and <description> to the Network XML. - The <title> attribute holds a short title defined by the user and cannot contain newlines. - The <description> attribute holds any documentation that the user wants to store. - Schema definitions of <title> and <description> have been moved from domaincommon.rng to basictypes.rng for use by network and future objects. - Added Network XML parser logic for the above. Signed-off-by: K Shiva Kiran <shiva_kr@riseup.net> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This patch introduces public Get and Set APIs for modifying <title>, <description> and <metadata> elements of the Network object. - Added enum virNetworkMetadataType to select one of the above elements to operate on. - Added error code and messages for missing metadata. - Added public API implementation. - Added driver support. Signed-off-by: K Shiva Kiran <shiva_kr@riseup.net> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
- Defines wire protocol format. - Implements remote driver. Signed-off-by: K Shiva Kiran <shiva_kr@riseup.net> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Adds two new commands and a new option: - 'net-desc' to show/modify network title and description. - 'net-metadata' to show/modify network metadata. - Option '--title' for 'net-list' to print corresponding network titles in an additional column. - Documentation for all the above. - XML Fallback function `virshNetworkGetXMLFromNet` for title and description for compatibility with hosts running older versions of libvirtd. Signed-off-by: K Shiva Kiran <shiva_kr@riseup.net> Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
- Introduces virNetworkObjGetMetadata() and virNetworkObjSetMetadata(). - These functions implement common behaviour that can be reused by network drivers. - Introduces virNetworkObjUpdateModificationImpact() among other helper functions that resolve the live/persistent state of the network before setting metadata. - Eliminates redundant call of virNetworkObjSetDefTransient() in virNetworkConfigChangeSetup() among others. - Substituted redundant logic in networkUpdate() with a call to virNetworkObjUpdateModificationImpact(). Signed-off-by: K Shiva Kiran <shiva_kr@riseup.net> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit implements the newly defined Network Metadata Get and Set APIs into the test driver. It also adds a new testcase "networkmetadatatest" to test the APIs. Signed-off-by: K Shiva Kiran <shiva_kr@riseup.net> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: K Shiva Kiran <shiva_kr@riseup.net> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
….1.0 release Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Note the implications and caveats of <disk type='dir'>. Closes: https://gitlab.com/libvirt/libvirt/-/issues/519 Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This introduces the ability to set the discard granularity option for a disk. It defines the smallest amount of data that can be discarded in a single operation (useful for managing and optimizing storage). However, most hypervisors automatically set the proper discard granularity and users usually do not need to change the default setting. Signed-off-by: Kristina Hanicova <khanicov@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit adds building of `discard_granularity` disk option for qemu commandline. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1849570 Signed-off-by: Kristina Hanicova <khanicov@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
--driver can now be used to specify a specific driver to bind to the device being detached from the host driver (e.g. vfio-pci-igbvf), not just the *type* of driver (e.g. "vfio" or "xen", which are unnecessary anyway, since they are implicit in which hypervisor driver is in use) Signed-off-by: Laine Stump <laine@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Laine Stump <laine@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: libvirt/libvirt Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/ Co-authored-by: Weblate <noreply@weblate.org> Signed-off-by: Fedora Weblate Translation <i18n@lists.fedoraproject.org>
Commit 9c9848f merged $MESON_OPTS into $MESON_ARGS, and while doing so changed their behavior: while until then the contents of $MESON_ARGS had precedence over those of $MESON_OPTS, now the opposite is true. Restore the original behavior and document it. The argument for merging the two variables in the first place was that having both present on the meson command line could be confusing; however, that should no longer be the case now that we have reasonably extensive comments explaining the role of each of the variables and how they interact with each other, so return the meson command line to its original form. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
Multiple values passed to --meson-args need to be quoted so that the shell will interpret them correctly. The option's name was also reported incorrectly, so fix that as well. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
Thank you for your interest in the libvirt project. Since this repository is a read-only mirror of the project's master We kindly request that contributors fork the project at https://gitlab.com/libvirt/libvirt/ push changes to the fork, and then open a new merge request at https://gitlab.com/libvirt/libvirt/-/merge_requests/new Thank you for your time and understanding. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )