Commit Graph

47015 Commits

Author SHA1 Message Date
Peter Krempa
ed03de9e46 util: xml: Remove unused virXPathNumber
'virXPathNumber' is not used currently, remove it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-11-01 13:07:20 +01:00
Peter Krempa
df570882cd storage|test|vbox: Implement support for validating storage volume XMLs
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
2022-11-01 13:07:20 +01:00
Peter Krempa
db5f05dd22 storage: Add VIR_STORAGE_VOL_CREATE_VALIDATE flag
Allow users to request validation of the storage volume XML. Add new
flag and virsh support.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
2022-11-01 13:07:20 +01:00
Peter Krempa
563ef19f9b conf: storage: Add support for validating storage vol XML to virStorageVolDefParse
Introduce the VIR_VOL_XML_PARSE_VALIDATE parser flag and wire it up into
the validator.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
2022-11-01 13:07:20 +01:00
Peter Krempa
295908688d nodedev|test: Implement support for validating node device XMLs
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
2022-11-01 13:07:20 +01:00
Peter Krempa
d8791c3c7c nodedev: Add VIR_NODE_DEVICE_(CREATE|DEFINE)_XML_VALIDATE flags
The node device APIs which get XML from the user don't yet support XML
validation flags. Introduce virNodeDeviceCreateXMLFlags and
virNodeDeviceDefineXMLFlags with the appropriate flags and add virsh
support for the new flags.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
2022-11-01 13:07:20 +01:00
Peter Krempa
0268270b0f conf: node_device: Add 'validate' argument to virNodeDeviceDefParse
Allow callers to request XML validation against the schema. All callers
for now pass 'false'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
2022-11-01 13:07:20 +01:00
Peter Krempa
abfdaf8a94 schema: cpu: include 'arch' subelement in interleave definition of 'hostcpu'
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-11-01 13:07:20 +01:00
Peter Krempa
663b36019b schema: storagepool: Allow interleaving of per-pool custom namespace elements
The custom namespace parameters for 'rbd' and 'netfs' pool types were
not included in the interleave statement.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-11-01 13:07:20 +01:00
Peter Krempa
de8d15a5a5 schema: nwfilterbinding: Allow interleaving of subelements of 'owner' element
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-11-01 13:07:20 +01:00
Peter Krempa
58117f9720 schema: nwfilter: Allow interleaving subelements of the top level 'filter' element
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-11-01 13:07:20 +01:00
Peter Krempa
0d3dc4be0f schema: networkport: Allow interleaving of subelements of 'driver' subelement of hostdev-pci
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-11-01 13:07:20 +01:00
Peter Krempa
03c0632f8b schema: networkport: Allow interleaving of subelements of 'owner'
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-11-01 13:07:20 +01:00
Peter Krempa
15730e7667 schema: domain: Allow interleaving of 'watchdog' subelements
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-11-01 13:07:20 +01:00
Peter Krempa
5fc6ec1fa2 schema: domain: Allow interleaving of <bootloader> and <os>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-11-01 13:07:20 +01:00
Peter Krempa
9b656a95c0 schema: domain: Add the 'type' subelement of the osexe case of 'os' element to interleave
The 'type' element was outside of the 'interleave' definition.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-11-01 13:07:20 +01:00
Peter Krempa
80c2e04a85 schema: domain: Allow interleaving 'ip' and 'route' sub-elements of interface
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-11-01 13:07:20 +01:00
Peter Krempa
cc8b827b44 schema: domain: Allow interleaving of subelements of disk's 'mirror'
While for now the 'mirror' element is output only, the idea was to allow
it to be used for input too to restore the mirror job if that becomes
the necessity. Allowing interleaving of the subelements can be done
regardless.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-11-01 13:07:20 +01:00
Peter Krempa
8b2b71d899 schema: domain: Allow interleaving of subelements of 'memtune'
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-11-01 13:07:20 +01:00
Peter Krempa
123a52fe07 schema: domain: Allow interleaving of 'tpm' config elements
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-11-01 13:07:20 +01:00
Peter Krempa
fde40ee4f4 schema: domain: Allow interleaving of PCI controller config elements
The 'model' and 'target' element can be freely moved around.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-11-01 13:07:20 +01:00
Peter Krempa
1210074d5e schema: domain: Allow interleaving of character device config elements
Allow interleaving in the 'qemucdevSrcDef' definition which is shared
by all places using character device as backend.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-11-01 13:07:20 +01:00
Jiri Denemark
40a8a74be6 Post-release version bump to 8.10.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2022-11-01 12:36:50 +01:00
Jiri Denemark
9589e902f7 Release of libvirt-8.9.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2022-11-01 12:17:01 +01:00
Han Han
cd4fe37f2c NEWS: Mention VIR_DOMAIN_STATS_VM of virConnectGetAllDomainStats
Signed-off-by: Han Han <hhan@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2022-11-01 11:56:05 +01:00
Peter Krempa
c43718ef67 Document caveats of 'VIR_DOMAIN_STATS_VM' group of statistics
The original patches adding the functionality neglected to add any form
of documentation for the stats fields returned for this group.

The stats are directly converted from qemu's 'query-stats(-schema)' QMP
command without any further interpretation. The 'query-stats-schema' has
the following disclaimer:

 Note: runtime-collected statistics and their names fall outside QEMU's usual
       deprecation policies.  QEMU will try to keep the set of available data
       stable, together with their names, but will not guarantee stability
       at all costs; the same is true of providers that source statistics
       externally, e.g. from Linux.  For example, if the same value is being
       tracked with different names on different architectures or by different
       providers, one of them might be renamed.  A statistic might go away if
       an algorithm is changed or some code is removed; changing a default
       might cause previously useful statistics to always report 0.  Such
       changes, however, are expected to be rare.

Since libvirt is not doing any form of conversion of the stats we can't
meaningfully document any of the returned fields. At the same time we
can't even meaningfully provide any form of API stability for the field
names.

Modify the documentation for the 'VIR_DOMAIN_STATS_VM' group both in the
API docs and in the virsh man page to reflect that and disclaim any form
of stability guarantees we provide normally.

Fixes: 8c9e3dae14
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2022-11-01 11:56:00 +01:00
Han Han
06b31a2804 NEWS: Mention the tool virt-qemu-qmp-proxy
Signed-off-by: Han Han <hhan@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2022-11-01 11:37:13 +01:00
Han Han
aa4fe82e80 NEWS: Mention UNDEFINE_TPM and UNDEFINE_KEEP_TPM flags
Signed-off-by: Han Han <hhan@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2022-11-01 10:23:44 +01:00
Han Han
a63d439b63 include: Fix the introduced version of VIR_DOMAIN_STATS_VM
Fixes: 8c9e3dae14

Signed-off-by: Han Han <hhan@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2022-11-01 08:47:29 +01:00
Cole Robinson
72d4709ab9 tests: Fix libxlxml2domconfigtest with latest xen
shadow_memkb is populated from a libxl API call, and the value can
change. For example:
https://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=2c992810854a15b41be920519ce83a4a328d5168

Mock libxl_get_required_shadow_memory to give consistent output

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-10-30 12:34:02 -04:00
Martin Kletzander
de842f37a1 docs: Remind users to remove --timeout option without socket activation
There is part of our man page that describes how to switch to the
traditional (non-socket) activation but it might still happens sometimes that
there is an extra --timeout option specified for the daemon.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-10-27 17:39:19 +02:00
Martin Kletzander
86e27b3506 Remove Before=libvirt-guests.service from other services
libvirt-guests has After= dependency for all the sockets and that is enough.
With the extra Before= in the service file systemd postpones the start of the
socket activated service (when libvirt-guests is trying to connect to the
socket) until after libvirt-guests is stopped effectively making `systemctl stop
libvirt-guests` deadlock.  The reason for that is that all stop jobs are
scheduled before any start job.  Removing the redundant Before= specification
fixes this behaviour.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-10-27 17:39:19 +02:00
Michal Privoznik
92e78dab34 NEWS: Document my contributions for upcoming release
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2022-10-27 16:23:30 +02:00
Yuri Chornoivan
ae13179f28 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (10386 of 10386 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/uk/

Co-authored-by: Yuri Chornoivan <yurchor@ukr.net>
Signed-off-by: Yuri Chornoivan <yurchor@ukr.net>
2022-10-27 01:20:15 +02:00
김인수
c188252987 Translated using Weblate (Korean)
Currently translated at 100.0% (10386 of 10386 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/ko/

Co-authored-by: 김인수 <simmon@nplob.com>
Signed-off-by: 김인수 <simmon@nplob.com>
2022-10-27 01:20:14 +02:00
Michal Privoznik
a6474cfe48 node_device_driver.h: Drop nodeDeviceLock() and nodeDeviceUnlock() fwd declarations
The node_device_driver.h declares nodeDeviceLock() and
nodeDeviceUnlock() functions which used to exist, but after
rework to automatic mutex management they exist no more. Their
last use was removed in v8.1.0-rc1~122.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
2022-10-26 08:49:01 +02:00
Michal Privoznik
6f45d2c181 node_device: Move fwd declaration of udevNodeRegister() into correct header file
Currently, udevNodeRegister() is forward declared in
node_device_driver.h even though the function is implemented in
node_device_udev.c which warrants node_device_udev.h header file.
Move the declaration into the correct file.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
2022-10-26 08:48:23 +02:00
Michal Privoznik
6283e10062 node_device_udev.h: Drop include of libudev.h
Nothing in the header file requires the include of libudev.h, as
the former header file is now empty.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
2022-10-26 08:47:59 +02:00
Michal Privoznik
a9db75ad3a node_device: Move DMI_DEVPATH into node_device_udev.c
The DMI_DEVPATH macro is used exclusively within
node_device_udev.c. There's no need to expose it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
2022-10-26 08:47:32 +02:00
Michal Privoznik
4a00efe9cb node_device_udev.h: Drop unused macro
The SYSFS_DATA_SIZE macro is Unused since its introduction in
v0.7.3~48. Sorry Dave.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
2022-10-26 08:45:35 +02:00
Weblate
454927368f Update translation files
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>
2022-10-25 13:52:16 +02:00
Pavel Hrdina
76c6e91402 Revert "cgroup/LXC: Do not condition availability of v2 by controllers"
This reverts commit e49313b54e.
This reverts commit a0f37232b9.

Revert them together to not break build.

This fix of the issue is incorrect and breaks usage of other controllers
in hybrid mode that systemd creates, specifically usage of devices and
cpuacct controllers as they are now assumed to be part of the cgroup v2
topology which is not true.

We need to find different solution to the issue.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-10-25 13:51:45 +02:00
Jiri Denemark
122064d449 po: Refresh potfile for v8.9.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2022-10-25 13:00:12 +02:00
Erik Skultety
5597ae9609 ci: integration: Bundle only failed Avocado test results
Latest versions of Avocado create 'by-status' symlink shortcuts to test
results, IOW:

 # this is the main test results directory containing all data
 $ ls <path>/avocado/job-results/latest/test-results/
 01-scripts_networks_050-transient-lifecycle.t
 02-scripts_networks_051-transient-autostart.t
 ...
 22-scripts_networks_400-guest-bandwidth.t
 by_status/

 # list only the failed tests
 $ ls -l <path>/avocado/job-results/latest/test-results/by-status/FAIL
 19-scripts_networks_360-guest-network-vepa.t ->
    <path>/avocado/job-results/latest/test-results/19-scripts_networks_360-guest-network-vepa.t

Therefore, let's bundle only the failed ones, it's going to make the
log artifacts more obvious when looking for libvirt errors.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-10-25 09:40:44 +02:00
Erik Skultety
2b26127397 ci: integration: Create the avocado logs artifact dir conditionally
Don't create an avocado directory in the resulting log artifacts
if Avocado didn't even run (e.g. libvirt errored out on service
restart).

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-10-25 09:40:44 +02:00
Erik Skultety
5243dcea65 ci: integration: Use 'set +e' in the log collecting job
All 'script' blocks are defined as 'set -e' and so a single failed
return value means we won't collect some of the logs. Because of
the nature of the original job's failure some of the log sources
might not be available, but that's fine, however, the gitlab
after_script job cannot finish prematurely.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-10-25 09:40:44 +02:00
Erik Skultety
124eb56342 ci: integration: Only create a coredump log when a core exists
It could be quite confusing looking at the job log artifacts and having
an empty coredump log in there, IOW it doesn't really give much
confidence that the reporting mechanism actually works.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-10-25 09:40:44 +02:00
Erik Skultety
1df36ecbd0 ci: integration: Fix the test on avocado directory existence
It's a directory, so -d should be used with 'test'.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-10-25 09:40:43 +02:00
Erik Skultety
ddc4898080 ci: integration: Add an extra level of quoting for augeas set options
Both log filters and log outputs expect string values, however, augeas
apparently requires an extra level of quotes apart from the ones we
pass via shell (see comment [1]) to work properly, otherwise augeas
ignores the value and returns 0.
Without this fix we don't set libvirt's log level to debug, we don't
set logging to a file and hence we don't include the logs in CI
artifacts in case the test suite fails.

[1] https://github.com/hercules-team/augeas/issues/301#issuecomment-143699880

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-10-25 09:40:43 +02:00
Erik Skultety
045e642d29 ci: integration: Add virtnetworkd to the list of restarted services
It was missing from the set. While at it, order the daemon set
alphabetically.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-10-25 09:40:43 +02:00