]>
git.ipfire.org Git - thirdparty/libvirt.git/log
Kristina Hanicova [Thu, 22 Jul 2021 09:45:52 +0000 (11:45 +0200)]
storage: create logical volume with --yes option
If lvcreate found an existing signature when trying to create a
new logical volume (E.g. left after some deleted volume), the
action failed due to inability to answer interactive question to
wiping it (lvcreate assumed 'no' was the answer). With added
option --yes to the command line, the answer to any interactive
question is assumed to be yes. Therefore, lvcreate wipes the
signature and the new volume is created successfully.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=
1940413
Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 11:34:44 +0000 (13:34 +0200)]
virStorageVolObjListNew: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 11:33:09 +0000 (13:33 +0200)]
virSecuritySELinuxQEMUInitialize: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 11:32:29 +0000 (13:32 +0200)]
virSecuritySELinuxLXCInitialize: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 11:31:12 +0000 (13:31 +0200)]
virQEMUCapsProbeQMPHostCPU: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 08:06:35 +0000 (10:06 +0200)]
virNodeDeviceObjListNew: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 07:16:06 +0000 (09:16 +0200)]
virNetworkObjNew: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 07:13:54 +0000 (09:13 +0200)]
virNetworkObjListNew: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 07:13:02 +0000 (09:13 +0200)]
virNetDaemonNew: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 15:01:54 +0000 (17:01 +0200)]
virLockSpaceNew: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 15:01:25 +0000 (17:01 +0200)]
virLockDaemonNewPostExecRestart: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 15:00:47 +0000 (17:00 +0200)]
virLockDaemonNew: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 14:59:53 +0000 (16:59 +0200)]
virInterfaceObjListNew: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 14:59:17 +0000 (16:59 +0200)]
virHashAtomicNew: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 14:58:22 +0000 (16:58 +0200)]
virFileCacheNew: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 14:57:21 +0000 (16:57 +0200)]
virDomainObjListNew: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 14:56:09 +0000 (16:56 +0200)]
virDomainMomentObjListNew: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 14:55:37 +0000 (16:55 +0200)]
virDomainDefValidateAliases: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 14:54:01 +0000 (16:54 +0200)]
virDomainDefBootOrderPostParse: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 14:53:01 +0000 (16:53 +0200)]
virDomainCCWAddressSetCreate: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 14:52:11 +0000 (16:52 +0200)]
virCloseCallbacksNew: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 14:51:35 +0000 (16:51 +0200)]
virChrdevAlloc: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 13:56:00 +0000 (15:56 +0200)]
qemuInteropFetchConfigs: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 13:55:20 +0000 (15:55 +0200)]
qemuDomainObjPrivateAlloc: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 13:53:56 +0000 (15:53 +0200)]
qemuBlockNodeNameGetBackingChain: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 13:49:26 +0000 (15:49 +0200)]
qemuBlockNodeNamesDetect: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 13:47:52 +0000 (15:47 +0200)]
libxlLoggerNew: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 13:42:46 +0000 (15:42 +0200)]
qemusecuritymock: init_hash: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 13:41:27 +0000 (15:41 +0200)]
hypervCreateEmbeddedParam: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 13:40:33 +0000 (15:40 +0200)]
ebiptablesApplyNewRules: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 11:29:59 +0000 (13:29 +0200)]
virNWFilterRuleDefToRuleInst: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 11:43:28 +0000 (13:43 +0200)]
virNWFilterCreateVarsFrom: Remove superfluous `goto`s
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 08:20:38 +0000 (10:20 +0200)]
virNWFilterCreateVarsFrom: Use automatic memory management
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 08:20:07 +0000 (10:20 +0200)]
virNWFilterCreateVarsFrom: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 11:38:53 +0000 (13:38 +0200)]
virSystemdActivationNew: Remove superfluous `goto`s
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 11:38:05 +0000 (13:38 +0200)]
virSystemdActivationNew: Use automatic memory management
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 11:36:19 +0000 (13:36 +0200)]
virSystemdActivationNew: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 08:27:16 +0000 (10:27 +0200)]
virNWFilterLearnInit: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 08:26:21 +0000 (10:26 +0200)]
virNWFilterIPAddrMapInit: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 08:25:30 +0000 (10:25 +0200)]
virNWFilterDoInstantiate: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Tim Wiederhake [Wed, 14 Jul 2021 09:11:01 +0000 (11:11 +0200)]
virNWFilterParseParamAttributes: Remove superfluous `goto`s
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Tim Wiederhake [Wed, 14 Jul 2021 09:08:50 +0000 (11:08 +0200)]
virNWFilterParseParamAttributes: Simplify loop body
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Tim Wiederhake [Wed, 14 Jul 2021 08:49:23 +0000 (10:49 +0200)]
virNWFilterParseParamAttributes: Use automatic memory management
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Tim Wiederhake [Wed, 14 Jul 2021 08:42:58 +0000 (10:42 +0200)]
virNWFilterParseParamAttributes: Remove tautological `if`
`cur` is guaranteed to be of type `XML_ELEMENT_NODE` by using
`xmlFirstElementChild()` and `xmlNextElementSibling()`.
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 08:35:27 +0000 (10:35 +0200)]
virNWFilterParseParamAttributes: Iterate over "element" children
"xmlNextElementSibling()" skips attribute nodes, making the explicit
check for the type of `cur` redundant. This prepares for the removal
of this check in the next commit.
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 08:30:34 +0000 (10:30 +0200)]
virNWFilterParseParamAttributes: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 09:09:56 +0000 (11:09 +0200)]
conf: Add AUTOPTR_CLEANUP_FUNC for virNWFilterVarValue
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Pavel Hrdina [Thu, 22 Jul 2021 19:00:50 +0000 (21:00 +0200)]
virsh: fix setmem flags logic
When we dropped virDomainSetMemory usage it got kind of tricky to
figure out the flags correctly.
Originally the logic was following:
no option | --current | --live | --config | --live --config
----------+-----------+--------+----------+----------------
LIVE | CURRENT | LIVE | CONFIG | LIVE & CONFIG
But after the commit removing virDomainSetMemory usage it changed to:
no option | --current | --live | --config | --live --config
----------+-----------+--------+-----------------+----------------
LIVE | CURRENT | LIVE | LIVE & CONFIG | LIVE & CONFIG
This commit fixes the logic back to the original behavior except for
ESX, HyperV and Virtuozzo drivers where virDomainSetMemory() default
behavior was CURRENT instead of LIVE.
Fixes: ce8138564bba0def7d7195814fba4555915d60d5
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=
1980199
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Justin Gatzen [Thu, 22 Jul 2021 06:58:45 +0000 (02:58 -0400)]
conf: Add grabToggle to evdev input
Add support for customizable grabToggle key combinations with
<input type='evdev'>.
Signed-off-by: Justin Gatzen <justin.gatzen@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 10:25:46 +0000 (12:25 +0200)]
qemu: process: Extract code for submitting event handling to separate thread
The submission of the event to the helper thread has a verbose cleanup
path which was duplicated in all the event handlers. Simplify it by
extracting the code into a helper named 'qemuProcessEventSubmit' and
reuse it where appropriate.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainMemoryFailureCallback
Change the callback prototype and fix the callback registered in the
process code.
The removed error messages are impossible as the enum values are
converted via VIR_ENUM helpers and guarded by compiler checks.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainGuestCrashloadedCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainRdmaGidStatusChangedCallback
Change the callback prototype and fix the callback registered in the
process code.
It is also impossible for @info to be non-NULL in the cleanup section so
the cleanup can be completely removed.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainPRManagerStatusChangedCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainDumpCompletedCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainBlockThresholdCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainAcpiOstInfoCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainMigrationPassCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainMigrationStatusCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainSpiceMigratedCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainSerialChangeCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainNicRxFilterChangedCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainDeviceDeletedCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainGuestPanicCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainPMSuspendDiskCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainBalloonChangeCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainPMSuspendCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainPMWakeupCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainTrayChangeCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainJobStatusChangeCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainBlockJobCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainGraphicsCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainIOErrorCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainWatchdogCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainRTCChangeCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainResumeCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainStopCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainResetCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainShutdownCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainEventCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 07:35:39 +0000 (09:35 +0200)]
qemu: monitor: Remove return value from qemuMonitorEmit* functions
The callers in the monitor code invoking the callbacks after events are
received don't actually check the return value from the callbacks and
there isn't really anything we could do on failure.
Remove the return value from the intermediary functions so we can later
remove them from the callback prototypes.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:24:07 +0000 (10:24 +0200)]
qemu: monitor: Remove handlers for the 'POWERDOWN' event
The qemu process code doesn't register a callback for it so we don't
need to be handling it at all.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Wed, 21 Jul 2021 09:22:25 +0000 (11:22 +0200)]
storage_driver: Unlock object on ACL fail in storagePoolLookupByTargetPath
'virStoragePoolObjListSearch' returns a locked and refed object, thus we
must release it on ACL permission failure.
Fixes: 7aa0e8c0cb8
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=
1984318
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Peter Krempa [Tue, 13 Jul 2021 09:52:20 +0000 (11:52 +0200)]
syntax-check: Prohibit 'vir' prefix for enum implementations in virsh
Avoid potential conflict of enum helpers declared in virsh.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Mon, 19 Jul 2021 11:23:29 +0000 (13:23 +0200)]
virsh-volume: Avoid 'vir' prefix for locally declared VIR_ENUM* helpers
Stuff used in virsh should use 'virsh'.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Mon, 19 Jul 2021 11:23:29 +0000 (13:23 +0200)]
virsh-network: Avoid 'vir' prefix for locally declared VIR_ENUM* helpers
Stuff used in virsh should use 'virsh'.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Mon, 19 Jul 2021 11:23:29 +0000 (13:23 +0200)]
virsh-domain: Avoid 'vir' prefix for locally declared VIR_ENUM* helpers
Stuff used in virsh should use 'virsh'.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Mon, 19 Jul 2021 11:23:29 +0000 (13:23 +0200)]
virsh-host: Avoid 'vir' prefix for locally declared VIR_ENUM* helpers
Stuff used in virsh should use 'virsh'.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Boris Fiuczynski [Wed, 21 Jul 2021 11:30:00 +0000 (13:30 +0200)]
nodedev: fix internal error when no defined mdevs exist
Commit
e9b534905f4 introduced an error when parsing an empty list
returned from mdevctl.
This occurs e.g. if nodedev-undefine is used to undefine the last
defined mdev which causes the following error messages
libvirtd[33143]: internal error: Unexpected format for mdevctl response
libvirtd[33143]: internal error: failed to query mdevs from mdevctl:
libvirtd[33143]: mdevctl failed to updated mediated devices
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Pavel Hrdina [Thu, 22 Jul 2021 13:15:18 +0000 (15:15 +0200)]
qemuxml2argvmock: drop virQEMUCapsGetKVMSupportsSecureGuest
It is actually not needed because in qemuxml2argvtest we preload
domaincapsmock as well.
Reported-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Pavel Hrdina [Thu, 22 Jul 2021 09:45:38 +0000 (11:45 +0200)]
tests: fix compiling tests with minGW
We need to mock virQEMUCapsGetKVMSupportsSecureGuest only if compiling
with QEMU otherwise compilation will fail with error:
/usr/lib/gcc/i686-w64-mingw32/11.1.1/../../../../i686-w64-mingw32/bin/ld: tests/libdomaincapsmock.dll.p/domaincapsmock.c.obj: in function `virQEMUCapsGetKVMSupportsSecureGuest':
/builds/libvirt/libvirt/build/../tests/domaincapsmock.c:40: undefined reference to `virQEMUCapsGet'
/usr/lib/gcc/i686-w64-mingw32/11.1.1/../../../../i686-w64-mingw32/bin/ld: /builds/libvirt/libvirt/build/../tests/domaincapsmock.c:41: undefined reference to `virQEMUCapsGet'
Fixes: 248a30c0c0ec2610e8fa2bbbc98da6d06978ad2e
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Tim Wiederhake [Mon, 19 Jul 2021 12:14:20 +0000 (14:14 +0200)]
ci: Halt on sanitizer errors
The undefined behaviour sanitizer (UBSAN) defaults to merely printing an
error message if it detects undefined behaviour. These error messages often
end up in captured output and do not fail the tests, effectively hiding
the warning. Make the test cases fail to make the issues visible.
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Tim Wiederhake [Thu, 22 Jul 2021 08:30:21 +0000 (10:30 +0200)]
virFileReadLimFD: Cast maxlen to size_t before adding
If the function is called with maxlen equal to `INT_MAX`, adding
one will trigger a signed integer overflow.
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Boris Fiuczynski [Thu, 22 Jul 2021 09:07:42 +0000 (11:07 +0200)]
conf: remove unnecessary restore in virDomainSEVDefParseXML
Since commit
d399a728f4 placed the restore in the right scope the
restore can get removed in virDomainSEVDefParseXML.
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Zhenzhong Duan [Thu, 22 Jul 2021 07:44:18 +0000 (15:44 +0800)]
conf: Restore ctxt's node in right scope
We just found <qemu:commandline> is ignored in our xml. Further debug
shows that ctxt's node pointer isn't restored in virDomainSecDefParseXML(),
which leads to parsing of remaining elements failed.
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Kristina Hanicova [Tue, 20 Jul 2021 14:44:08 +0000 (16:44 +0200)]
genericxml2xmltest: Refactor DO_TEST_FULL() calls
I have added 2 new macros to call tests which are expected to
fail in order to make the code more consistent and readable.
Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Kristina Hanicova [Wed, 21 Jul 2021 07:57:45 +0000 (09:57 +0200)]
genericxml2xmltest: Substitute 'inactive' variable with 'active'
Having negation in a name of a bool variable seems a bit
confusing to me. I think the substitution makes the code much
more readable.
Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Boris Fiuczynski [Fri, 16 Jul 2021 09:44:35 +0000 (11:44 +0200)]
qemu: Fix error code for SEV launchSecurity unsupported
When SEV is not supported but specified in the domain XML by a user it
should not result in an internal error (VIR_ERR_INTERNAL_ERROR)
therefore switching to XML error (VIR_ERR_CONFIG_UNSUPPORTED).
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Boris Fiuczynski [Fri, 16 Jul 2021 09:44:34 +0000 (11:44 +0200)]
qemu: Use common id lsec0 for launchSecurity
Use the common id 'lsec0' for all launchSecurity types in the QEMU
command line construction.
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Boris Fiuczynski [Fri, 16 Jul 2021 09:44:33 +0000 (11:44 +0200)]
docs: Add s390-pv in domain capabilities documentation
Add documentation for domain capability s390-pv.
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>