]> git.ipfire.org Git - thirdparty/libvirt.git/log
thirdparty/libvirt.git
3 years agoTranslated using Weblate (Korean)
simmon [Wed, 29 Sep 2021 08:05:10 +0000 (10:05 +0200)] 
Translated using Weblate (Korean)

Currently translated at 99.7% (10345 of 10374 strings)

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

Co-authored-by: simmon <simmon@nplob.com>
Signed-off-by: simmon <simmon@nplob.com>
3 years agoUpdate translation files
Weblate [Wed, 29 Sep 2021 08:05:07 +0000 (10:05 +0200)] 
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>
3 years agopo: Refresh potfile for v7.8.0 v7.8.0-rc1
Jiri Denemark [Mon, 27 Sep 2021 09:38:35 +0000 (11:38 +0200)] 
po: Refresh potfile for v7.8.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
3 years agoTranslated using Weblate (Korean)
simmon [Mon, 27 Sep 2021 07:55:01 +0000 (09:55 +0200)] 
Translated using Weblate (Korean)

Currently translated at 100.0% (10353 of 10353 strings)

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

Co-authored-by: simmon <simmon@nplob.com>
Signed-off-by: simmon <simmon@nplob.com>
3 years agoTranslated using Weblate (Korean)
jason lee [Mon, 27 Sep 2021 07:55:00 +0000 (09:55 +0200)] 
Translated using Weblate (Korean)

Currently translated at 100.0% (10353 of 10353 strings)

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

Co-authored-by: jason lee <ppark5237@gmail.com>
Signed-off-by: jason lee <ppark5237@gmail.com>
3 years agoTranslated using Weblate (Korean)
simmon [Mon, 27 Sep 2021 07:54:59 +0000 (09:54 +0200)] 
Translated using Weblate (Korean)

Currently translated at 100.0% (10353 of 10353 strings)

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

Translated using Weblate (Korean)

Currently translated at 92.4% (9576 of 10353 strings)

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

Co-authored-by: simmon <simmon@nplob.com>
Signed-off-by: simmon <simmon@nplob.com>
3 years agoTranslated using Weblate (Korean)
jason lee [Mon, 27 Sep 2021 07:54:58 +0000 (09:54 +0200)] 
Translated using Weblate (Korean)

Currently translated at 92.4% (9576 of 10353 strings)

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

Translated using Weblate (Korean)

Currently translated at 91.6% (9484 of 10353 strings)

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

Co-authored-by: jason lee <ppark5237@gmail.com>
Signed-off-by: jason lee <ppark5237@gmail.com>
3 years agoqemu: deprecate QEMU_CAPS_FSDEV_CREATEMODE
Ján Tomko [Fri, 24 Sep 2021 15:23:33 +0000 (17:23 +0200)] 
qemu: deprecate QEMU_CAPS_FSDEV_CREATEMODE

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agoqemu: assume QEMU_CAPS_FSDEV_CREATEMODE
Ján Tomko [Fri, 24 Sep 2021 15:20:37 +0000 (17:20 +0200)] 
qemu: assume QEMU_CAPS_FSDEV_CREATEMODE

Added by QEMU commit:
b96feb2cb9 "9pfs: local: Add support for custom fmode/dmode in 9ps
mapped security modes"
in 2.10.0

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agoqemu: Deprecate QEMU_CAPS_MACHINE_KERNEL_IRQCHIP
Ján Tomko [Fri, 24 Sep 2021 15:09:56 +0000 (17:09 +0200)] 
qemu: Deprecate QEMU_CAPS_MACHINE_KERNEL_IRQCHIP

Now that it's no longer used, remove probing for it
and mark it as deprecated.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agoqemu: assume QEMU_CAPS_MACHINE_KERNEL_IRQCHIP
Ján Tomko [Fri, 24 Sep 2021 15:07:06 +0000 (17:07 +0200)] 
qemu: assume QEMU_CAPS_MACHINE_KERNEL_IRQCHIP

Even though we only allow this option on x86,
all QEMUs report the command line option.

Added in QEMU v1.1:
6a48ffaaa7 "kvm: Activate in-kernel irqchip support"

Remove the pointless capability.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agoqemu: capabilities: do not look at parameters for sandbox
Ján Tomko [Fri, 24 Sep 2021 14:23:32 +0000 (16:23 +0200)] 
qemu: capabilities: do not look at parameters for sandbox

Assume the presence of the 'sandbox' option is enough,
no need to look at the parameters.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agoqemu: capabilities: deprecate QEMU_CAPS_SECCOMP_BLACKLIST
Ján Tomko [Fri, 24 Sep 2021 14:22:06 +0000 (16:22 +0200)] 
qemu: capabilities: deprecate QEMU_CAPS_SECCOMP_BLACKLIST

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agoqemu: seccomp: remove dead code
Ján Tomko [Fri, 24 Sep 2021 14:20:01 +0000 (16:20 +0200)] 
qemu: seccomp: remove dead code

There is no QEMU we support that would need the old syntax
for -sandbox on.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agoqemu: conf: simplify seccomp_sandbox comment
Ján Tomko [Fri, 24 Sep 2021 14:15:30 +0000 (16:15 +0200)] 
qemu: conf: simplify seccomp_sandbox comment

It contains too many negations and conditions that are
no longer relevant now that we only support QEMU >= 2.11.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agoqemu: always assume QEMU_CAPS_SECCOMP_BLACKLIST
Ján Tomko [Fri, 24 Sep 2021 14:04:30 +0000 (16:04 +0200)] 
qemu: always assume QEMU_CAPS_SECCOMP_BLACKLIST

elevateprivileges was introduced by QEMU commit:
73a1e64725 "seccomp: add elevateprivileges argument to command line"
released in 2.11.0
and later made conditional on SECCOMP support by:
9d0fdecbad sandbox: disable -sandbox if CONFIG_SECCOMP undefined

Use the existence of the sandbox option as a witness for its support.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agoqemu: ingore the transient domain state in fake reboot
Zhenzhong Duan [Sun, 26 Sep 2021 09:06:38 +0000 (17:06 +0800)] 
qemu: ingore the transient domain state in fake reboot

When action for 'on_poweroff' is set to 'restart', 'fake reboot'
is triggered and qemu shutdown state is transient. Domain state
need not to be changed and events not sent in this case.

Fixes: 4ffc807214cb80086d57e1d3e7b60959a41d2874
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirsh: domain: remove else branch
Kristina Hanicova [Fri, 24 Sep 2021 15:17:50 +0000 (17:17 +0200)] 
virsh: domain: remove else branch

I removed else branches after return/break as they are not
necessary and the code looks cleaner without them.

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirsh: domain: remove 'ret' variable and use 'count' instead
Kristina Hanicova [Fri, 24 Sep 2021 15:17:49 +0000 (17:17 +0200)] 
virsh: domain: remove 'ret' variable and use 'count' instead

This patch also includes use of an early return in case of an
error. I think the changes make the functions more readable.

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirsh: domain: use early return when possible
Kristina Hanicova [Fri, 24 Sep 2021 15:17:48 +0000 (17:17 +0200)] 
virsh: domain: use early return when possible

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirsh: domain: remove 'ret' variable, use early return when possible
Kristina Hanicova [Fri, 24 Sep 2021 15:17:47 +0000 (17:17 +0200)] 
virsh: domain: remove 'ret' variable, use early return when possible

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirsh: domain: remove 'ret' variable and use direct return when possible
Kristina Hanicova [Fri, 24 Sep 2021 15:17:46 +0000 (17:17 +0200)] 
virsh: domain: remove 'ret' variable and use direct return when possible

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirsh: domain: remove nested 'if' in cmdAttachDisk()
Kristina Hanicova [Fri, 24 Sep 2021 15:17:45 +0000 (17:17 +0200)] 
virsh: domain: remove nested 'if' in cmdAttachDisk()

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirsh: domain: use early return in virshDomainDefine()
Kristina Hanicova [Fri, 24 Sep 2021 15:17:44 +0000 (17:17 +0200)] 
virsh: domain: use early return in virshDomainDefine()

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirsh: domain: remove unnecessary variable and label in cmdMigrateSetMaxDowntime()
Kristina Hanicova [Thu, 23 Sep 2021 23:30:49 +0000 (01:30 +0200)] 
virsh: domain: remove unnecessary variable and label in cmdMigrateSetMaxDowntime()

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirsh: domain: fix mistake in cmdMigrateSetMaxDowntime()
Kristina Hanicova [Thu, 23 Sep 2021 23:30:48 +0000 (01:30 +0200)] 
virsh: domain: fix mistake in cmdMigrateSetMaxDowntime()

If there was added a new return value indicating success to the
function virDomainMigrateSetMaxDowntime() in the future, because
of the way the function is called it would be treated it as an
error state and would return false (indicating failure). This
patch fixes it, so that the call of the function follows the same
pattern as is currently set in libvirt.

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agomeson: Increase stack size limit for sanitizer builds
Tim Wiederhake [Thu, 23 Sep 2021 09:16:32 +0000 (11:16 +0200)] 
meson: Increase stack size limit for sanitizer builds

When building with "CC=clang", "-Db_sanitize=address,undefined", and
"-Dbuildtype=debug", the following error occurs:

    ../src/conf/nwfilter_conf.c:2190:1: error: stack frame size of 10616
    bytes in function 'virNWFilterRuleDefFixup' [-Werror,-Wframe-larger-than=]
    virNWFilterRuleDefFixup(virNWFilterRuleDef *rule)
    ^
    1 error generated.

Enforcing stack frame only makes sense on normal builds when stack usage
is deterministic.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
3 years agovsh: Don't check for OOM in vshGetTypedParamValue()
Michal Privoznik [Fri, 24 Sep 2021 09:15:10 +0000 (11:15 +0200)] 
vsh: Don't check for OOM in vshGetTypedParamValue()

Both function description and function itself mention check for
OOM which can't happen really. There was a bug in glib where
g_strdup_*() might have not aborted on OOM, but we have our own
implementation when dealing with broken glib (see
vir_g_strdup_printf()). Therefore, checking for OOM is redundant
and can never be true.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agolibvirt.spec.in: Replace %global with %define
Erik Skultety [Tue, 21 Sep 2021 16:48:19 +0000 (18:48 +0200)] 
libvirt.spec.in: Replace %global with %define

Commit b5e8db8f14d tuned the SPEC file so that libvirt daemons restart
on package upgrade. In order to do that it added a bunch of
parametrized macros using the %global directive. This caused a problem
when running RPM builds on CentOS Stream 8 resulting in:

error: Too many levels of recursion in macro expansion. It is likely
       caused by recursive macro declaration.
error: Macro %libvirt_daemon_perform_restart failed to expand
error: line 1275: %global libvirt_daemon_perform_restart() \
       if test %libvirt_daemon_needs_restart %1 \
       then \
           /bin/systemctl try-restart %1.service >/dev/null 2>&1 || : \
       fi \
       %libvirt_daemon_finish_restart %1

There are 2 important differences between %global and %define
directives:
1) %define is local-only and does have scope - in reality though, its
   scope is apparently not really enforced because it behaves exactly
   the same way as %global
2) %define is evaluated at the time of use while %global is evaluated
   at the time of definition

The latter and the fact the macro is parametrized is the reason why the
RPM builds fails on CentOS. Strangely enough this only happens on
CentOS Stream, but not Fedora (which is also the main proponent of
replacing %define with %global). Anyhow, replacing %global with %define
makes the rpmbuild to pass on both and along with package upgrades.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agoqemu: capabilities: Retire QEMU_CAPS_SPICE_FILE_XFER_DISABLE
Peter Krempa [Thu, 23 Sep 2021 07:12:13 +0000 (09:12 +0200)] 
qemu: capabilities: Retire QEMU_CAPS_SPICE_FILE_XFER_DISABLE

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu: validate: Always assume QEMU_CAPS_SPICE_FILE_XFER_DISABLE
Peter Krempa [Thu, 23 Sep 2021 07:11:29 +0000 (09:11 +0200)] 
qemu: validate: Always assume QEMU_CAPS_SPICE_FILE_XFER_DISABLE

QEMU added the capability to disable file transfers via spice in commit
5ad24e5f3b ("spice: Add -spice disable-agent-file-transfer cmdline
option (rhbz#961850)") released in qemu-v1.6.0 and the option can't be
disabled.

Remove the unnecessary validation.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuxml2argvtest: Modernize the rest of 'graphics-vnc' tests
Peter Krempa [Thu, 23 Sep 2021 15:15:16 +0000 (17:15 +0200)] 
qemuxml2argvtest: Modernize the rest of 'graphics-vnc' tests

As with previous test replace the fake caps versions with a combination
of DO_TEST_CAPS_VER(..., "2.11.0") and DO_TEST_CAPS_LATEST().

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuxml2argvtest: Add DO_TEST_CAPS_LATEST for the vnc unix socket tests
Peter Krempa [Thu, 23 Sep 2021 15:12:53 +0000 (17:12 +0200)] 
qemuxml2argvtest: Add DO_TEST_CAPS_LATEST for the vnc unix socket tests

Now that the code is refactored add the DO_TEST_CAPS_LATEST versions as
promised in the commit adding the pinned versions.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu: capabilities: Retire QEMU_CAPS_VNC_MULTI_SERVERS
Peter Krempa [Thu, 23 Sep 2021 07:26:41 +0000 (09:26 +0200)] 
qemu: capabilities: Retire QEMU_CAPS_VNC_MULTI_SERVERS

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu: command: Always QEMU_CAPS_VNC_MULTI_SERVERS
Peter Krempa [Thu, 23 Sep 2021 07:25:32 +0000 (09:25 +0200)] 
qemu: command: Always QEMU_CAPS_VNC_MULTI_SERVERS

All supported qemu versions now use the new commandline parser
functions, thus we can remove the old-style commandline generator.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuxml2argvtest: Replace vnc unix socket tests with pinned versions
Peter Krempa [Thu, 23 Sep 2021 14:57:43 +0000 (16:57 +0200)] 
qemuxml2argvtest: Replace vnc unix socket tests with pinned versions

Replace the 3 unix socket tests with real caps versions to demonstrate
that supported qemus no longer use the old syntax.

DO_TEST_CAPS_LATEST versions will be added later.

This also removes duplicate invocation of 'graphics-vnc-socket'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu: capabilities: Retire QEMU_CAPS_VNC_OPTS
Peter Krempa [Thu, 23 Sep 2021 08:11:39 +0000 (10:11 +0200)] 
qemu: capabilities: Retire QEMU_CAPS_VNC_OPTS

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu: command: Always assume QEMU_CAPS_VNC_OPTS
Peter Krempa [Thu, 23 Sep 2021 08:10:05 +0000 (10:10 +0200)] 
qemu: command: Always assume QEMU_CAPS_VNC_OPTS

The switch to QemuOpts parser which brought the long-form options
happened in qemu commit 4db14629c3 ("vnc: switch to QemuOpts, allow
multiple servers") released in v2.3.0.

We can always assume this capability and remove the old-style
generators.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu: command: Simplify 'vnc' commandline generator
Peter Krempa [Thu, 23 Sep 2021 08:09:20 +0000 (10:09 +0200)] 
qemu: command: Simplify 'vnc' commandline generator

'qemuDomainSecretGraphicsPrepare' always populates 'gfxPriv->tlsAlias'
when 'cfg->vncTLS' is enabled.

This means we can remove the fallback code setting up TLS for vnc via
the 'x509=' parameter.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuBuildTLSx509BackendProps: Remove unused 'qemuCaps'
Peter Krempa [Thu, 23 Sep 2021 13:51:21 +0000 (15:51 +0200)] 
qemuBuildTLSx509BackendProps: Remove unused 'qemuCaps'

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu: capabilities: Retire QEMU_CAPS_OBJECT_TLS_CREDS_X509
Peter Krempa [Thu, 23 Sep 2021 08:05:06 +0000 (10:05 +0200)] 
qemu: capabilities: Retire QEMU_CAPS_OBJECT_TLS_CREDS_X509

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu: Always assume presence of QEMU_CAPS_OBJECT_TLS_CREDS_X509
Peter Krempa [Thu, 23 Sep 2021 08:01:45 +0000 (10:01 +0200)] 
qemu: Always assume presence of QEMU_CAPS_OBJECT_TLS_CREDS_X509

The 'tls-creds-x509' object is always registered even when qemu is built
without gnutls for all supported qemu versions. This means we cannot
probe for its support and thus simplify the code using TLS.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuxml2argvtest: Use real caps in "graphics-vnc-tls" case
Peter Krempa [Thu, 23 Sep 2021 13:31:18 +0000 (15:31 +0200)] 
qemuxml2argvtest: Use real caps in "graphics-vnc-tls" case

Replace the fake caps invocation with invocation binding it to the
oldest supported qemu version.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agovirsh: util: remove 'else' branch after return
Kristina Hanicova [Thu, 23 Sep 2021 23:49:11 +0000 (01:49 +0200)] 
virsh: util: remove 'else' branch after return

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirsh: remove variable 'ret' and 'inactive'
Kristina Hanicova [Thu, 23 Sep 2021 23:49:10 +0000 (01:49 +0200)] 
virsh: remove variable 'ret' and 'inactive'

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirsh: remove variable 'ret' in cmdVersion()
Kristina Hanicova [Thu, 23 Sep 2021 23:49:09 +0000 (01:49 +0200)] 
virsh: remove variable 'ret' in cmdVersion()

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirsh: remove variable 'ret' and use early return if possible
Kristina Hanicova [Thu, 23 Sep 2021 23:49:08 +0000 (01:49 +0200)] 
virsh: remove variable 'ret' and use early return if possible

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirsh: volume: refactor cmdVolInfo()
Kristina Hanicova [Thu, 23 Sep 2021 23:25:12 +0000 (01:25 +0200)] 
virsh: volume: refactor cmdVolInfo()

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirsh: host: refactor cmdNodeCpuStats()
Kristina Hanicova [Thu, 23 Sep 2021 23:25:11 +0000 (01:25 +0200)] 
virsh: host: refactor cmdNodeCpuStats()

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirsh: host: refactor cmdFreecell()
Kristina Hanicova [Thu, 23 Sep 2021 23:25:10 +0000 (01:25 +0200)] 
virsh: host: refactor cmdFreecell()

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirsh: domain: refactor cmdLxcEnterNamespace()
Kristina Hanicova [Thu, 23 Sep 2021 23:25:09 +0000 (01:25 +0200)] 
virsh: domain: refactor cmdLxcEnterNamespace()

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirsh: domain: refactor virshCPUCountCollect()
Kristina Hanicova [Thu, 23 Sep 2021 23:25:08 +0000 (01:25 +0200)] 
virsh: domain: refactor virshCPUCountCollect()

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirsh: domain: refactor cmdSchedinfo()
Kristina Hanicova [Thu, 23 Sep 2021 23:25:07 +0000 (01:25 +0200)] 
virsh: domain: refactor cmdSchedinfo()

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agoTranslated using Weblate (Korean)
simmon [Fri, 24 Sep 2021 00:05:04 +0000 (02:05 +0200)] 
Translated using Weblate (Korean)

Currently translated at 82.9% (8591 of 10353 strings)

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

Co-authored-by: simmon <simmon@nplob.com>
Signed-off-by: simmon <simmon@nplob.com>
3 years agoscripts: include function versions in API definition
Daniel P. Berrangé [Thu, 23 Sep 2021 10:40:01 +0000 (11:40 +0100)] 
scripts: include function versions in API definition

In order to auto-generate more of the language binding code, it is
desirable to know what libvirt version an API was introduced in.
We can extract this information from the .syms files and expose
it in the API description

eg instead of

  <function name='virNodeNumOfDevices' file='libvirt-nodedev'
            module='libvirt-nodedev'>

we now have

  <function name='virNodeNumOfDevices' file='libvirt-nodedev'
            module='libvirt-nodedev' version='0.5.0'>

This will benefit this proposal:

  https://gitlab.com/libvirt/libvirt-go-module/-/merge_requests/7

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Tested-by: Victor Toso <victortoso@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
3 years agoch: use g_auto in virCHMonitorBuildVMJson
Ján Tomko [Wed, 22 Sep 2021 20:50:48 +0000 (22:50 +0200)] 
ch: use g_auto in virCHMonitorBuildVMJson

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
3 years agoch: use g_auto in virCHMonitorBuildNetsJson
Ján Tomko [Wed, 22 Sep 2021 20:50:22 +0000 (22:50 +0200)] 
ch: use g_auto in virCHMonitorBuildNetsJson

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
3 years agoch: use g_auto in virCHMonitorBuildNetJson
Ján Tomko [Wed, 22 Sep 2021 20:49:57 +0000 (22:49 +0200)] 
ch: use g_auto in virCHMonitorBuildNetJson

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
3 years agoch: use g_auto in virCHMonitorBuildDisksJson
Ján Tomko [Wed, 22 Sep 2021 20:49:27 +0000 (22:49 +0200)] 
ch: use g_auto in virCHMonitorBuildDisksJson

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
3 years agoch: use g_auto in virCHMonitorBuildDiskJson
Ján Tomko [Wed, 22 Sep 2021 20:48:58 +0000 (22:48 +0200)] 
ch: use g_auto in virCHMonitorBuildDiskJson

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
3 years agoch: use g_auto in virCHMonitorBuildCPUJson
Ján Tomko [Wed, 22 Sep 2021 20:45:51 +0000 (22:45 +0200)] 
ch: use g_auto in virCHMonitorBuildCPUJson

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
3 years agoqemuxml2argvtest: remove 'fs9p' cases with fake capabilities.
Peter Krempa [Wed, 22 Sep 2021 10:56:23 +0000 (12:56 +0200)] 
qemuxml2argvtest: remove 'fs9p' cases with fake capabilities.

The filesystem commandline doesn't differ in the '-latest' cases.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuxml2argvtest: Pin old-style '-no-reboot' usage to qemu-5.2
Peter Krempa [Wed, 22 Sep 2021 10:50:51 +0000 (12:50 +0200)] 
qemuxml2argvtest: Pin old-style '-no-reboot' usage to qemu-5.2

After qemu-5.2 we always use -no-shutdown.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuxml2argvtest: Use versioned ("4.1.0") capabilities for pre '-audiodev' cases
Peter Krempa [Wed, 22 Sep 2021 10:45:23 +0000 (12:45 +0200)] 
qemuxml2argvtest: Use versioned ("4.1.0") capabilities for pre '-audiodev' cases

Use real caps instead of fake caps for the legacy cases. This will also
show us when we can remove the old-style code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agotests: qemu: Remove 's390-ccw' machine type from fake capabilities
Peter Krempa [Wed, 22 Sep 2021 09:15:00 +0000 (11:15 +0200)] 
tests: qemu: Remove 's390-ccw' machine type from fake capabilities

Modern QEMUs don't support the machine type at all. Remove it from our
fake caps generator too and adjust test cases which depend on it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuxml2argvtest: Modernize s390x disk tests
Peter Krempa [Wed, 22 Sep 2021 08:58:22 +0000 (10:58 +0200)] 
qemuxml2argvtest: Modernize s390x disk tests

An update to the machine type was necessary as 's390-ccw' is no longer
supported.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuxml2argvtest: Modernize 'disk-floppy-pseries' case
Peter Krempa [Wed, 22 Sep 2021 08:46:06 +0000 (10:46 +0200)] 
qemuxml2argvtest: Modernize 'disk-floppy-pseries' case

Use real caps. The flooppy device still is forbidden for ppc64.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuxml2argvtest: Modernize outstanding disk-backend related tests
Peter Krempa [Wed, 22 Sep 2021 08:41:52 +0000 (10:41 +0200)] 
qemuxml2argvtest: Modernize outstanding disk-backend related tests

For backend related tests we need to cover the pre-blockdev and
post-blockdev era, so the fake-capability test is converted to a
combination of DO_TEST_CAPS_VER(..., "4.1.0") and DO_TEST_CAPS_LATEST.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuxml2argvtest: Modernize 'disk-network-rbd-no-colon' case
Peter Krempa [Wed, 22 Sep 2021 08:30:56 +0000 (10:30 +0200)] 
qemuxml2argvtest: Modernize 'disk-network-rbd-no-colon' case

The test case fails in pre-blockdev scenarios as it would pass RBD
parameters behind our back but succeeds after as we pass it in JSON form
which doesn't have that defect.

Cover both cases instead of the fake-caps version.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuxml2argvtest: Merge 'disk-iscsi' case into 'disk-cache'
Peter Krempa [Wed, 22 Sep 2021 08:08:27 +0000 (10:08 +0200)] 
qemuxml2argvtest: Merge 'disk-iscsi' case into 'disk-cache'

Use the iSCSI disk path in one of the disks of the 'disk-cache' test as
it's the only specialty of 'disk-iscsi' case and remove the now
pointless files.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuxml2argvtest: Replace 'disk-network-iscsi' by the more comprehensive 'disk-networ...
Peter Krempa [Wed, 22 Sep 2021 08:00:00 +0000 (10:00 +0200)] 
qemuxml2argvtest: Replace 'disk-network-iscsi' by the more comprehensive 'disk-network-iscsi-modern'

Move the contents of 'disk-network-iscsi-modern' into 'disk-network-iscsi'
to reuse the name and also invocation with real capablities and remove
the leftovers.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuxml2argvtest: Use real caps for all disk frontend property tests
Peter Krempa [Wed, 22 Sep 2021 08:21:43 +0000 (10:21 +0200)] 
qemuxml2argvtest: Use real caps for all disk frontend property tests

Cases for covering disk frontend properties can be converted to
DO_TEST_CAPS_LATEST without any need for intermediate capabilities.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuxml2argvtest: Use DO_TEST_CAPS_LATEST_PARSE_ERROR for disk cases
Peter Krempa [Tue, 21 Sep 2021 17:14:19 +0000 (19:14 +0200)] 
qemuxml2argvtest: Use DO_TEST_CAPS_LATEST_PARSE_ERROR for disk cases

Convert all the disk-related negative cases to use 'latest'
capabilities. The checks are mostly related to validation so using
real capabilities doesn't influence the outcome.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuxml2argvtest: Convert encrypted disk test cases to DO_TEST_CAPS_LATEST
Peter Krempa [Tue, 21 Sep 2021 14:43:58 +0000 (16:43 +0200)] 
qemuxml2argvtest: Convert encrypted disk test cases to DO_TEST_CAPS_LATEST

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuxml2argvtest: Remove 'disk-usb-nosupport' case
Peter Krempa [Tue, 21 Sep 2021 17:17:25 +0000 (19:17 +0200)] 
qemuxml2argvtest: Remove 'disk-usb-nosupport' case

In effor to convert all test cases to real capability testing, this
test doesn't make sense any more as even the oldest QEMU supported
supports USB storage.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuxml2argvtest: Remove negative case for 'luks-disks-source-qcow2'
Peter Krempa [Tue, 21 Sep 2021 14:57:40 +0000 (16:57 +0200)] 
qemuxml2argvtest: Remove negative case for 'luks-disks-source-qcow2'

Currently we no longer support qemus which would miss the necessary
capability, thus the test can't be converted to DO_TEST_CAPS_LATEST.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuxml2argvtest: Remove fake caps versions of disk tests we have a versioned test for
Peter Krempa [Tue, 21 Sep 2021 17:05:40 +0000 (19:05 +0200)] 
qemuxml2argvtest: Remove fake caps versions of disk tests we have a versioned test for

Many disk-related test case have both a fake capability version and one
tied to qemu-2.12. Remove all of those fake caps tests as we have
coverage.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuxml2argvtest: Agregate all 'disk'-related test cases
Peter Krempa [Tue, 21 Sep 2021 14:35:51 +0000 (16:35 +0200)] 
qemuxml2argvtest: Agregate all 'disk'-related test cases

There were a few disk-related test cases spread around in the test
invocation calls. Move them together with disk tests and move one
irrelevant case away from the disk test block.

Note that there are still a few tests having 'disk' in the name but they
belong to different groups mostly.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuxml2argvtest: Remove 'boot-strict' case
Peter Krempa [Tue, 21 Sep 2021 14:21:29 +0000 (16:21 +0200)] 
qemuxml2argvtest: Remove 'boot-strict' case

It's identical to 'boot-order'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agotestQemuInfoInitArgs: Report error if path to 'latest' caps for an arch is NULL
Peter Krempa [Wed, 22 Sep 2021 08:53:58 +0000 (10:53 +0200)] 
testQemuInfoInitArgs: Report error if path to 'latest' caps for an arch is NULL

When looking up the 'latest' caps they might not be present. Report an
error instead of crashing.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agotestCompareXMLToArgv: Avoid use of uninitialized 'monitor_chr'
Peter Krempa [Wed, 22 Sep 2021 08:52:23 +0000 (10:52 +0200)] 
testCompareXMLToArgv: Avoid use of uninitialized 'monitor_chr'

Failure of 'testQemuInfoInitArgs' jumps over the initialization of
'monitor_chr' via memset, which leads to a crash.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu: driver: Remove unused variable 'cfg'
Peter Krempa [Thu, 23 Sep 2021 11:47:00 +0000 (13:47 +0200)] 
qemu: driver: Remove unused variable 'cfg'

Commit a50c473ad6c988a2 removed last use of 'cfg' from
qemuDomainMemoryPeek and qemuDomainScreenshot triggering a compile time
warning.

Fixes: a50c473ad6c988a249bf79a30fb7c6dc19733347
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
3 years agotests: Test IOThread related functions for test driver
Luke Yue [Wed, 15 Sep 2021 15:30:32 +0000 (23:30 +0800)] 
tests: Test IOThread related functions for test driver

testIOThreadAdd tests iothreadinfo and iothreadadd
testIOThreadDel tests iothreadinfo and iothreaddel
testIOThreadSet tests domstats and iothreadset
testIOThreadPin tests iothreadadd, iothreadinfo and iothreadpin

Above tests should cover the IOThreads related APIs for test driver

Signed-off-by: Luke Yue <lukedyue@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agotest_driver: Introduce testDomainGetStatsIOThread
Luke Yue [Wed, 15 Sep 2021 15:30:31 +0000 (23:30 +0800)] 
test_driver: Introduce testDomainGetStatsIOThread

Introduce testDomainGetStatsIOThread to add support for
testConnectGetAllDomainStats to get IOThread infos.

Signed-off-by: Luke Yue <lukedyue@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agotest_driver: Implement virConnectGetAllDomainStats
Luke Yue [Wed, 15 Sep 2021 15:30:30 +0000 (23:30 +0800)] 
test_driver: Implement virConnectGetAllDomainStats

Implement virConnectGetAllDomainStats in a modular way just like QEMU
driver, though remove some params in GetStatsWorker that we don't need
in test driver currently.

Only add the worker to get state so far, more worker will be added
in the future.

Signed-off-by: Luke Yue <lukedyue@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agotest_driver: Implement testDomainSetIOThreadParams
Luke Yue [Wed, 15 Sep 2021 15:30:29 +0000 (23:30 +0800)] 
test_driver: Implement testDomainSetIOThreadParams

Signed-off-by: Luke Yue <lukedyue@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agotest_driver: Implement virDomainPinIOThread
Luke Yue [Wed, 15 Sep 2021 15:30:28 +0000 (23:30 +0800)] 
test_driver: Implement virDomainPinIOThread

Signed-off-by: Luke Yue <lukedyue@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agotest_driver: Implement virDomainGetIOThreadInfo
Luke Yue [Wed, 15 Sep 2021 15:30:27 +0000 (23:30 +0800)] 
test_driver: Implement virDomainGetIOThreadInfo

If we use test driver on different machines, and use 0 as bitmap_size
for virDomainDriverGetIOThreadsConfig(), we would get different results for
the `CPU Affinity`, because it's depending on the host CPU's bitmap. In
order to get a stable result for testing, use result of
virDomainDefGetVcpus() as bitmap_size instead.

Signed-off-by: Luke Yue <lukedyue@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agodomain_driver.c: Introduce and use virDomainDriverGetIOThreadsConfig()
Luke Yue [Wed, 15 Sep 2021 15:30:26 +0000 (23:30 +0800)] 
domain_driver.c: Introduce and use virDomainDriverGetIOThreadsConfig()

The test driver can share the same code with qemu driver when implement
testDomainGetIOThreadsConfig, so extract it for test driver to use.

Also add a new parameter `bitmap_size` to the function, it's used for
specifying the bitmap size of the bitmap to generate, it would be helpful
for test driver or some special situation.

Signed-off-by: Luke Yue <lukedyue@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agotest_driver: Implement virDomainDelIOThread
Luke Yue [Wed, 15 Sep 2021 15:30:25 +0000 (23:30 +0800)] 
test_driver: Implement virDomainDelIOThread

Signed-off-by: Luke Yue <lukedyue@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agotest_driver: Implement virDomainAddIOThread
Luke Yue [Wed, 15 Sep 2021 15:30:24 +0000 (23:30 +0800)] 
test_driver: Implement virDomainAddIOThread

Introduce testDomainChgIOThread at the same time, could be used for
virDomainDelIOThread etc.

Signed-off-by: Luke Yue <lukedyue@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agotest_driver: Introduce testIOThreadInfo and generate IOThread infos
Luke Yue [Wed, 15 Sep 2021 15:30:23 +0000 (23:30 +0800)] 
test_driver: Introduce testIOThreadInfo and generate IOThread infos

Introduce testIOThreadInfo to store IOThread infos: iothread_id,
poll_max_ns, poll_grow and poll_shrink for future usage.

Add an example of IOThread configuration to testdomfc4.xml, we also want
to generate default testIOThreadInfo for the IOThread configured in the
xml, so introduce testDomainGenerateIOThreadInfos, the values are taken
from QEMU.

Signed-off-by: Luke Yue <lukedyue@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agodomain_driver.c: Introduce and use virDomainDriverAddIOThreadCheck()
Luke Yue [Wed, 15 Sep 2021 15:30:22 +0000 (23:30 +0800)] 
domain_driver.c: Introduce and use virDomainDriverAddIOThreadCheck()

The test driver can share the same code with qemu driver when implement
testDomainAddIOThreadCheck and testDomainDelIOThreadCheck, so extract
them for test driver to use.

Signed-off-by: Luke Yue <lukedyue@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agoqemu: don't change ownership of cache directory
Peng Liang [Mon, 13 Sep 2021 14:23:47 +0000 (22:23 +0800)] 
qemu: don't change ownership of cache directory

Commit 6bcf25017bc6 ("virDomainMemoryPeek API") introduced memory peek
and commit 9936aecfd1b4 ("qemu: Implement the driver methods")
introduced screenshot.  Both of them will put temporary files in
/var/cache/libvirt/qemu, and the temporary files are created by QEMU.
Therefore, the ownership of /var/cache/libvirt/qemu should be changed to
user and group configured in qemu.conf to make sure that QEMU process
can create and write files in the cache directory.

Libvirt will only put the temporary files in /var/cache/libvirt/qemu
until commit cbde35899b90 ("Cache result of QEMU capabilities
extraction"), which will put the cache of QEMU capabilities in
'capabilities' subdir of the cache directory.  Because the capabilities
is used by libvirt, the ownership of both 'capabilities' subdir and
capabilities files are root.  However, when QEMU process runs as a
regular user (e.g. qemu user), the ownership of /var/cache/libvirt/qemu
will be changed to qemu:qemu while that of
/var/cache/libvirt/qemu/capabilities will be still root:root.  Then the
regular user could spoof different capabilities, which maybe lead to
denial of service.

Since the previous patch has move the temp files of screenshot and
memory peek to per-domain directory, no one except domain capabilities
uses cacheDir currently.  And since domain capabilities are used by
libvirtd instead of QEMU, no need to change the ownership of cacheDir to
qemu:qemu explicitly.

Signed-off-by: Peng Liang <liangpeng10@huawei.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agoqemu: move temp file of screenshot and memorypeek to per-domain dir
Peng Liang [Mon, 13 Sep 2021 14:23:46 +0000 (22:23 +0800)] 
qemu: move temp file of screenshot and memorypeek to per-domain dir

The temp files of screenshot and memory peek, which are created by QEMU,
are put in the cache directory.  However, the caches of domain
capabilities, which are created and used by libvirtd, are also put in
the cache directory.  In order to make the cache directory more secure,
move the temp files of screenshot and memory peek to per-domain
directory.

Since the temp files are just temporary files and are only used by
libvirtd (libvirtd will delete them after use), the use of screenshot
and memory peek will be affected.

Signed-off-by: Peng Liang <liangpeng10@huawei.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirDomainDefParseXML: Use automatic memory management
Tim Wiederhake [Fri, 17 Sep 2021 13:40:09 +0000 (15:40 +0200)] 
virDomainDefParseXML: Use automatic memory management

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agoqemu: command: Remove qemuBuildRBDSecinfoURI
Peter Krempa [Wed, 22 Sep 2021 11:32:06 +0000 (13:32 +0200)] 
qemu: command: Remove qemuBuildRBDSecinfoURI

Merge the code into the only caller.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu: domain: Rename secrets setup function
Peter Krempa [Wed, 22 Sep 2021 07:47:05 +0000 (09:47 +0200)] 
qemu: domain: Rename secrets setup function

Since there's just one type left, we can change the name to a more
generic one.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu: Simplify qemuDomainSecretInfo
Peter Krempa [Wed, 22 Sep 2021 07:34:31 +0000 (09:34 +0200)] 
qemu: Simplify qemuDomainSecretInfo

Now that we've removed support for plaintext secrets qemuDomainSecretInfo
can be simplified by removing the 'type' field and merging in all the
fields from 'qemuDomainSecretAES'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuBuildSCSIiSCSIHostdevDrvStr: Don't call qemuDiskSourceNeedsProps
Peter Krempa [Tue, 21 Sep 2021 16:26:43 +0000 (18:26 +0200)] 
qemuBuildSCSIiSCSIHostdevDrvStr: Don't call qemuDiskSourceNeedsProps

It always returns true for iSCSI, so we can remove the fallback logic.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>