Re: [PATCH 03/15] vbox: Drop @iid from UIMachine::LaunchVMProcess()

2023-01-23 Thread Michal Prívozník
On 1/23/23 11:00, Martin Kletzander wrote: > On Mon, Jan 23, 2023 at 10:34:12AM +0100, Michal Privoznik wrote: >> The @iid argument of UIMachine::LaunchVMProcess() callback is >> unused. Drop it and also its propagation from parent functions. >> > > Looks like even in 6.1 this was not a function

Re: [PATCH V2 1/1] qemuProcessEventSubmit : rename vm to event->vm

2023-01-23 Thread Shaleen Bathla
ping On Tue, Jan 17, 2023 at 02:52:13PM +0530, Shaleen Bathla wrote: > In error case, free event->vm instead of vm. > This makes it easier for the reader to understand what we should free. > > Signed-off-by: Shaleen Bathla > --- > src/qemu/qemu_process.c | 2 +- > 1 file changed, 1

Re: [PATCH V2 0/2] define g_autoptr for virNWFilterDef and virNWFilterRuleDef

2023-01-23 Thread Michal Prívozník
On 1/20/23 07:33, Jiang Jiacheng wrote: > Ping... > These were merged as: commit e5b065b40e555dd2c39c2af320d95b21547e7070 Author: Jiang Jiacheng AuthorDate: Tue Jan 10 19:29:26 2023 +0800 Commit: Ján Tomko CommitDate: Fri Jan 20 22:09:34 2023 +0100 src/tests: use g_autoptr for

Re: [PATCH 2/2] vbox: Fix starting domains

2023-01-23 Thread Martin Kletzander
On Mon, Jan 23, 2023 at 02:35:40PM +0100, Michal Prívozník wrote: On 1/23/23 10:45, Martin Kletzander wrote: On Mon, Jan 23, 2023 at 10:31:53AM +0100, Michal Privoznik wrote: When starting a VirtualBox domain, we try to guess which frontend to use. While the whole algorithm looks a bit

[PATCH 11/15] vbox: Drop @networkName from UIDHCPServer::Start()

2023-01-23 Thread Michal Privoznik
The @networkName argument of UIDHCPServer::Start() callback is unused. Drop it and also its propagation from parent functions. Signed-off-by: Michal Privoznik --- src/vbox/vbox_network.c | 2 -- src/vbox/vbox_tmpl.c | 2 +- src/vbox/vbox_uniformed_api.h | 2 +- 3 files changed, 2

[PATCH 1/8] vbox: Introduce VBOX_QUERY_INTERFACE()

2023-01-23 Thread Michal Privoznik
So far we haven't needed to use a different interface for objects we are working with. We were happy with calling their respective vtbl callbacks. Well, this will change soon as we will query an exception (type of nsIException) but will need to promote it to IVirtualBoxErrorInfo class. This

Re: [libvirt PATCH 7/7] ci: integration.sh: Define the SCRATCH_DIR variable for local execution

2023-01-23 Thread Martin Kletzander
On Mon, Jan 23, 2023 at 12:08:23PM +0100, Erik Skultety wrote: On Mon, Jan 23, 2023 at 11:42:52AM +0100, Martin Kletzander wrote: On Mon, Jan 23, 2023 at 10:50:31AM +0100, Erik Skultety wrote: > On Mon, Jan 23, 2023 at 09:41:10AM +0100, Martin Kletzander wrote: > > On Fri, Jan 20, 2023 at

Re: [PATCH 0/2] qemu_interface: Fix managed='no' case when creating an ethernet interface

2023-01-23 Thread Martin Kletzander
On Mon, Jan 23, 2023 at 12:03:41PM +0100, Michal Privoznik wrote: *** BLURB HERE *** Michal Prívozník (2): virnetdevtap: Clarify virNetDevTapCreate() behavior wrt VIR_NETDEV_TAP_CREATE_ALLOW_EXISTING qemu_interface: Fix managed='no' case when creating an ethernet interface Series:

Re: [libvirt PATCH 7/7] ci: integration.sh: Define the SCRATCH_DIR variable for local execution

2023-01-23 Thread Daniel P . Berrangé
On Mon, Jan 23, 2023 at 10:50:31AM +0100, Erik Skultety wrote: > On Mon, Jan 23, 2023 at 09:41:10AM +0100, Martin Kletzander wrote: > > On Fri, Jan 20, 2023 at 04:06:03PM +0100, Erik Skultety wrote: > > > Running outside of GitLab will likely not have the variable set and > > > hence the execution

Re: [libvirt PATCH 7/7] ci: integration.sh: Define the SCRATCH_DIR variable for local execution

2023-01-23 Thread Daniel P . Berrangé
On Mon, Jan 23, 2023 at 02:19:23PM +0100, Erik Skultety wrote: > ... > > > > Although an option, the main motivation here to remain consistent with > > > how it > > > works in GitLab. Since we define SCRATCH_DIR under the 'vars' section, > > > IIRC you > > > can only use a scalar value, not a

Re: [PATCH 2/2] vbox: Fix starting domains

2023-01-23 Thread Michal Prívozník
On 1/23/23 15:22, Martin Kletzander wrote: > On Mon, Jan 23, 2023 at 02:35:40PM +0100, Michal Prívozník wrote: >> On 1/23/23 10:45, Martin Kletzander wrote: >>> On Mon, Jan 23, 2023 at 10:31:53AM +0100, Michal Privoznik wrote: When starting a VirtualBox domain, we try to guess which frontend

Re: [libvirt PATCH 1/7] ci: integration: Extract several hidden job definitions to a script

2023-01-23 Thread Erik Skultety
On Mon, Jan 23, 2023 at 12:06:21PM +, Daniel P. Berrangé wrote: > On Fri, Jan 20, 2023 at 04:05:57PM +0100, Erik Skultety wrote: > > This will allow us to re-use the script in other scenarios like local > > executions where up until now one had to copy-paste the recipe > > line-by-line. > > >

Re: [PATCH 2/2] vbox: Fix starting domains

2023-01-23 Thread Michal Prívozník
On 1/23/23 10:45, Martin Kletzander wrote: > On Mon, Jan 23, 2023 at 10:31:53AM +0100, Michal Privoznik wrote: >> When starting a VirtualBox domain, we try to guess which frontend >> to use. While the whole algorithm looks a bit outdated, it may >> happen that we tell VirtualBox to use "gui"

Re: [libvirt PATCH 7/7] ci: integration.sh: Define the SCRATCH_DIR variable for local execution

2023-01-23 Thread Erik Skultety
On Mon, Jan 23, 2023 at 11:42:52AM +0100, Martin Kletzander wrote: > On Mon, Jan 23, 2023 at 10:50:31AM +0100, Erik Skultety wrote: > > On Mon, Jan 23, 2023 at 09:41:10AM +0100, Martin Kletzander wrote: > > > On Fri, Jan 20, 2023 at 04:06:03PM +0100, Erik Skultety wrote: > > > > Running outside of

Re: [libvirt PATCH 7/7] ci: integration.sh: Define the SCRATCH_DIR variable for local execution

2023-01-23 Thread Erik Skultety
On Mon, Jan 23, 2023 at 12:40:01PM +0100, Martin Kletzander wrote: > On Mon, Jan 23, 2023 at 12:08:23PM +0100, Erik Skultety wrote: > > On Mon, Jan 23, 2023 at 11:42:52AM +0100, Martin Kletzander wrote: > > > On Mon, Jan 23, 2023 at 10:50:31AM +0100, Erik Skultety wrote: > > > > On Mon, Jan 23,

Re: [libvirt PATCH 1/7] ci: integration: Extract several hidden job definitions to a script

2023-01-23 Thread Daniel P . Berrangé
On Fri, Jan 20, 2023 at 04:05:57PM +0100, Erik Skultety wrote: > This will allow us to re-use the script in other scenarios like local > executions where up until now one had to copy-paste the recipe > line-by-line. > > Signed-off-by: Erik Skultety > --- > ci/integration-template.yml | 36

Re: [libvirt PATCH 7/7] ci: integration.sh: Define the SCRATCH_DIR variable for local execution

2023-01-23 Thread Erik Skultety
... > > Although an option, the main motivation here to remain consistent with how > > it > > works in GitLab. Since we define SCRATCH_DIR under the 'vars' section, IIRC > > you > > can only use a scalar value, not a command (if we can, I retract my > > argument) > > and hence we'd have to

Re: [PATCH v2 3/3] qemu: Provide virDomainGetCPUStats() implementation for session connection

2023-01-23 Thread Michal Prívozník
On 1/19/23 15:18, Martin Kletzander wrote: > On Wed, Jan 18, 2023 at 10:58:19AM +0100, Michal Privoznik wrote: >> We have virDomainGetCPUStats() API which offers querying >> statistics on host CPU usage by given guest. And it works in two >> modes: getting overall stats (@start_cpu == -1, @ncpus

[PATCH v2] vbox: Fix starting domains

2023-01-23 Thread Michal Privoznik
When starting a VirtualBox domain, we try to guess which frontend to use. While the whole algorithm looks a bit outdated, it may happen that we tell VirtualBox to use "gui" frontend, but not which DISPLAY= to use. I haven't found any documentation on the algorithm we use, but if I make us

Re: [PATCH v2 2/3] virprocess: Make virProcessGetStatInfo() fail if unable to parse data

2023-01-23 Thread Michal Prívozník
On 1/19/23 15:15, Martin Kletzander wrote: > On Wed, Jan 18, 2023 at 10:58:18AM +0100, Michal Privoznik wrote: >> Yeah, we've already seen this commit (v8.0.0-rc2~4) and also its >> revert (v8.1.0-rc1~345). While the original idea was sound, the >> implementation was less so and it changed

Re: [PATCH v2 3/3] qemu: Provide virDomainGetCPUStats() implementation for session connection

2023-01-23 Thread Martin Kletzander
On Mon, Jan 23, 2023 at 02:12:06PM +0100, Michal Prívozník wrote: On 1/19/23 15:18, Martin Kletzander wrote: On Wed, Jan 18, 2023 at 10:58:19AM +0100, Michal Privoznik wrote: We have virDomainGetCPUStats() API which offers querying statistics on host CPU usage by given guest. And it works in

[PATCH 02/15] vbox: Drop @mediaChangeOnly from vboxDomainAttachDeviceImpl()

2023-01-23 Thread Michal Privoznik
The @mediaChangeOnly argument of vboxDomainAttachDeviceImpl() function is unused. Drop it. Signed-off-by: Michal Privoznik --- src/vbox/vbox_common.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index

[PATCH 2/8] vbox: Introduce IVirtualBoxErrorInfo interface

2023-01-23 Thread Michal Privoznik
The IVirtualBoxErrorInfo interface allows us to query error messages from VirtualBox. Since VirtualBox has stacked errors we need the GetNext() method too. The odd one, that sticks out is GetIID() as it is not part of the interface as defined bu VirtualBox header files. BUT, we need to get the

[PATCH 15/15] NEWS: Document recent vbox changes

2023-01-23 Thread Michal Privoznik
The support for VirtualBox 5.2 and 6.0 was removed and 7.0 was added. Reflect these changes in the NEWS file. Signed-off-by: Michal Privoznik --- NEWS.rst | 11 +++ 1 file changed, 11 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 2756b25611..a0fe0d18a0 100644 --- a/NEWS.rst +++

[PATCH 03/15] vbox: Drop @iid from UIMachine::LaunchVMProcess()

2023-01-23 Thread Michal Privoznik
The @iid argument of UIMachine::LaunchVMProcess() callback is unused. Drop it and also its propagation from parent functions. Signed-off-by: Michal Privoznik --- src/vbox/vbox_common.c| 6 +++--- src/vbox/vbox_tmpl.c | 1 - src/vbox/vbox_uniformed_api.h | 1 - 3 files changed,

[PATCH 00/15] vbox: Add support for version 7.0 SDK and drop old

2023-01-23 Thread Michal Privoznik
For full experience you'll need to apply these on top of: https://listman.redhat.com/archives/libvir-list/2023-January/237248.html Michal Prívozník (15): vbox: Drop misleading G_GNUC_UNUSED annotation vbox: Drop @mediaChangeOnly from vboxDomainAttachDeviceImpl() vbox: Drop @iid from

[PATCH 0/2] vbox: Two simple fixes

2023-01-23 Thread Michal Privoznik
I've notice these while working on adding support for 7.0 API. Michal Prívozník (2): vbox: Fix memleak in _virtualboxCreateMachine() vbox: Fix starting domains src/vbox/vbox_common.c | 13 ++--- src/vbox/vbox_tmpl.c | 1 + 2 files changed, 7 insertions(+), 7 deletions(-) --

[PATCH 04/15] vbox: Drop @iid from UISession::Open()

2023-01-23 Thread Michal Privoznik
The @iid argument of UISession::Open() callback is unused. Drop it and also its propagation from parent functions. Signed-off-by: Michal Privoznik --- src/vbox/vbox_common.c| 14 +++--- src/vbox/vbox_storage.c | 2 +- src/vbox/vbox_tmpl.c | 2 +-

[PATCH 06/15] vbox: Drop @data and @name from UIHost::CreateHostOnlyNetworkInterface()

2023-01-23 Thread Michal Privoznik
The @data and @name arguments of UIHost::CreateHostOnlyNetworkInterface() callback are unused. Drop them and also their propagation from parent functions. Signed-off-by: Michal Privoznik --- src/vbox/vbox_network.c | 3 +-- src/vbox/vbox_tmpl.c | 3 +--

[PATCH 07/15] vbox: Drop UIUSBCommon::Enable()

2023-01-23 Thread Michal Privoznik
The UIUSBCommon::Enable() function is no longer needed as it is a NOP. Drop it. Signed-off-by: Michal Privoznik --- src/vbox/vbox_common.c| 1 - src/vbox/vbox_tmpl.c | 8 src/vbox/vbox_uniformed_api.h | 1 - 3 files changed, 10 deletions(-) diff --git

Re: [PATCH 1/2] vbox: Fix memleak in _virtualboxCreateMachine()

2023-01-23 Thread Martin Kletzander
On Mon, Jan 23, 2023 at 10:31:52AM +0100, Michal Privoznik wrote: The _virtualboxCreateMachine() function allocates @createFlagsUtf16 but never frees it. ==12481== 236 bytes in 2 blocks are definitely lost in loss record 2,060 of 2,216 ==12481==at 0x48407E5: malloc

Re: [PATCH 2/2] vbox: Fix starting domains

2023-01-23 Thread Martin Kletzander
On Mon, Jan 23, 2023 at 10:31:53AM +0100, Michal Privoznik wrote: When starting a VirtualBox domain, we try to guess which frontend to use. While the whole algorithm looks a bit outdated, it may happen that we tell VirtualBox to use "gui" frontend, but not which DISPLAY= to use. I haven't found

Re: [libvirt PATCH 7/7] ci: integration.sh: Define the SCRATCH_DIR variable for local execution

2023-01-23 Thread Erik Skultety
On Mon, Jan 23, 2023 at 09:41:10AM +0100, Martin Kletzander wrote: > On Fri, Jan 20, 2023 at 04:06:03PM +0100, Erik Skultety wrote: > > Running outside of GitLab will likely not have the variable set and > > hence the execution would fail. > > > > Signed-off-by: Erik Skultety > > --- > >

[PATCH 1/2] virnetdevtap: Clarify virNetDevTapCreate() behavior wrt VIR_NETDEV_TAP_CREATE_ALLOW_EXISTING

2023-01-23 Thread Michal Privoznik
The VIR_NETDEV_TAP_CREATE_ALLOW_EXISTING flag is documented as: /* The device is allowed to exist before creation */ VIR_NETDEV_TAP_CREATE_ALLOW_EXISTING = 1 << 4, and yet, the documentation to virNetDevTapCreate() documents its behavior when the flag is passed as: *

[PATCH 0/2] qemu_interface: Fix managed='no' case when creating an ethernet interface

2023-01-23 Thread Michal Privoznik
*** BLURB HERE *** Michal Prívozník (2): virnetdevtap: Clarify virNetDevTapCreate() behavior wrt VIR_NETDEV_TAP_CREATE_ALLOW_EXISTING qemu_interface: Fix managed='no' case when creating an ethernet interface src/qemu/qemu_interface.c | 5 +++-- src/util/virnetdevtap.c | 2 +- 2

[PATCH] network: Increase max route size when checking IPv6 forwarding

2023-01-23 Thread Brooks Swinnerton
In d9ee51e, virNetDevIPCheckIPv6Forwarding was updated to walk the contents of /proc/net/ipv6_route so that it could check to see if the RTF_ADDRCONF was set on any IPv6 routes to ultimately determine if enabling forwarding would result in an error due to accept_ra=1 being set on the interface.

Re: [libvirt PATCH 4/7] ci: integration.sh: Replace most 'sudo' usage with running as root

2023-01-23 Thread Martin Kletzander
On Fri, Jan 20, 2023 at 04:06:00PM +0100, Erik Skultety wrote: This is a purely cosmetic change dropping the majority of 'sudo' invocations which we need to do to make final preparations on the test environment. This patch visually divides the part where we need to run as root from the rest of

[PATCH 14/15] vbox: Add support for version 7.0 SDK

2023-01-23 Thread Michal Privoznik
As advertised in previous commit that added the SDK header file, there were some changes to the API: 1) IVirtualBox::OpenMachine() and IVirtualBox::CreateMachine() now have @password argument to deal with password protected settings files. Well, we don't have that wired now (and we don't

[PATCH 3/8] vbox: Introduce vboxUniformedPFN::GetException()

2023-01-23 Thread Michal Privoznik
The GetException() method can be used to obtain the latest exception that occurred in VirtualBox. Calling the method does not reset the exception though. For that we'll need to call another method (introduced in following commit). Signed-off-by: Michal Privoznik --- src/vbox/vbox_common.h

[PATCH 12/15] vbox: Rename #include guard macro in header files

2023-01-23 Thread Michal Privoznik
To avoid including a header file more than once, either: #pragma once can be used, or the older trick (that vbox still uses): #ifndef MACRO # define MACRO Well, vbox still uses the latter and in its 7.0 release the macro was renamed from ___VirtualBox_CXPCOM_h to ___VirtualBox_CAPI_h.

[PATCH 0/8] vbox: Report VirtualBox exceptions too

2023-01-23 Thread Michal Privoznik
See 5/8 for motivation. Michal Prívozník (8): vbox: Introduce VBOX_QUERY_INTERFACE() vbox: Introduce IVirtualBoxErrorInfo interface vbox: Introduce vboxUniformedPFN::GetException() vbox: Introduce vboxUniformedPFN::ClearException() vbox: Introduce vboxReportError() vbox: Replace

Re: [PATCH 03/15] vbox: Drop @iid from UIMachine::LaunchVMProcess()

2023-01-23 Thread Martin Kletzander
On Mon, Jan 23, 2023 at 10:34:12AM +0100, Michal Privoznik wrote: The @iid argument of UIMachine::LaunchVMProcess() callback is unused. Drop it and also its propagation from parent functions. Looks like even in 6.1 this was not a function parameter of LaunchVMProcess. Was it ever? What I'm

Re: [libvirt PATCH 3/7] ci: integration-template: Drop Fedora 35 check

2023-01-23 Thread Martin Kletzander
On Fri, Jan 20, 2023 at 04:05:59PM +0100, Erik Skultety wrote: We no longer support Fedora 35. While at it, we can also tailor the "older than 35" based on the check below. rest of the check to CentOS Stream 8 since all other supported Red Hat like platforms have moved onto modular daemons

Re: [libvirt PATCH 6/7] ci: integration.sh: Replace 'test' with '[' operator

2023-01-23 Thread Martin Kletzander
On Fri, Jan 20, 2023 at 04:06:02PM +0100, Erik Skultety wrote: Since we now have a standalone script instead of inlined shell commands in a YAML, we can adopt the common syntax for if-then-else clauses which involve the '[' test command alias rather than keep using 'test' explicitly.

[PATCH 05/15] vbox: Drop @iid from UISession::OpenExisting()

2023-01-23 Thread Michal Privoznik
The @iid argument of UISession::OpenExisting() callback is unused. Drop it and also its propagation from parent functions. Signed-off-by: Michal Privoznik --- src/vbox/vbox_common.c| 22 +++--- src/vbox/vbox_tmpl.c | 2 +- src/vbox/vbox_uniformed_api.h | 2 +-

[PATCH 6/8] vbox: Replace virReportError() with vboxReportError()

2023-01-23 Thread Michal Privoznik
Now that we have vboxReportError() which reports VirtualBox errors too, we can switch the code to use the former. And since the vboxReportError() is designed to behave exactly like virReportError() we can do that almost everywhere, regardless of the source of the error. There are a few exceptions

Re: [libvirt PATCH 7/7] ci: integration.sh: Define the SCRATCH_DIR variable for local execution

2023-01-23 Thread Martin Kletzander
On Mon, Jan 23, 2023 at 10:50:31AM +0100, Erik Skultety wrote: On Mon, Jan 23, 2023 at 09:41:10AM +0100, Martin Kletzander wrote: On Fri, Jan 20, 2023 at 04:06:03PM +0100, Erik Skultety wrote: > Running outside of GitLab will likely not have the variable set and > hence the execution would

Re: [libvirt PATCH 7/7] ci: integration.sh: Define the SCRATCH_DIR variable for local execution

2023-01-23 Thread Martin Kletzander
On Fri, Jan 20, 2023 at 04:06:03PM +0100, Erik Skultety wrote: Running outside of GitLab will likely not have the variable set and hence the execution would fail. Signed-off-by: Erik Skultety --- ci/integration.sh | 8 1 file changed, 8 insertions(+) diff --git a/ci/integration.sh

[PATCH 01/15] vbox: Drop misleading G_GNUC_UNUSED annotation

2023-01-23 Thread Michal Privoznik
There are few cases where a function argument is marked as unused, but it's used later in the function. The majority of such occurrences are in vbox_tmpl.c as a residue of older vbox versions, but a pair was found in vbox_common.c too. Signed-off-by: Michal Privoznik --- src/vbox/vbox_common.c

[PATCH 4/8] vbox: Introduce vboxUniformedPFN::ClearException()

2023-01-23 Thread Michal Privoznik
The ClearException() method clears the latest exception inside of VirtualBox. This needed because obtaining an exception via GetException() does not clear it. Signed-off-by: Michal Privoznik --- src/vbox/vbox_tmpl.c | 6 ++ src/vbox/vbox_uniformed_api.h | 1 + 2 files changed, 7

Re: [libvirt PATCH] conf: clarify some external TPM error messages

2023-01-23 Thread Martin Kletzander
On Fri, Jan 20, 2023 at 12:59:00PM +0100, Ján Tomko wrote: Two of the messages referred to 'backend type' when dealing with the source type and one mentioned the 'client' attribute from an earlier iteration of the patches, even though the attribute was later changed to 'connect'.

[PATCH 8/8] vbox: Stop reporting RC in error messages

2023-01-23 Thread Michal Privoznik
As shown in the commit that introduced vboxReportError(), we are appending the retval of a failed VirtualBox API onto our error messages. Well, this is no longer needed because vboxReportError() already appends the VirtualBox error in plain text. Signed-off-by: Michal Privoznik ---

[PATCH 7/8] vbox: Move error messages onto a single line

2023-01-23 Thread Michal Privoznik
Our coding style suggests error messages to be on a single line for easier git grep. Since I'm touching them anyways, let's make them follow our own suggestion. Signed-off-by: Michal Privoznik --- src/vbox/vbox_common.c | 52 +++--- 1 file changed, 19

[PATCH 5/8] vbox: Introduce vboxReportError()

2023-01-23 Thread Michal Privoznik
When a VirtualBox API fails it produced an exception. Until now, we did not have correct APIs wired up to get the exception and its error message. Thus, we were left with plain: virReportError("virtualbox API failed, rc=%08x", rc); This is not very user friendly because those rc values are

[PATCH 1/2] vbox: Fix memleak in _virtualboxCreateMachine()

2023-01-23 Thread Michal Privoznik
The _virtualboxCreateMachine() function allocates @createFlagsUtf16 but never frees it. ==12481== 236 bytes in 2 blocks are definitely lost in loss record 2,060 of 2,216 ==12481==at 0x48407E5: malloc (vg_replace_malloc.c:393) ==12481==by 0xB6C6D1B: RTStrToUtf16Tag (utf-8.cpp:1033)

[PATCH 2/2] vbox: Fix starting domains

2023-01-23 Thread Michal Privoznik
When starting a VirtualBox domain, we try to guess which frontend to use. While the whole algorithm looks a bit outdated, it may happen that we tell VirtualBox to use "gui" frontend, but not which DISPLAY= to use. I haven't found any documentation on the algorithm we use, but if I make us

[PATCH 08/15] vbox: Drop UIUSBCommon::GetEnabled()

2023-01-23 Thread Michal Privoznik
The UIUSBCommon::GetEnabled() function is not needed really, as it sets a boolean to true and always succeeds. We can live without the function. Signed-off-by: Michal Privoznik --- src/vbox/vbox_common.c| 6 -- src/vbox/vbox_tmpl.c | 8

Re: KubeVirt with libvirt 9.0.0: Requested operation is not valid: The tap0 interface already exists

2023-01-23 Thread Michal Prívozník
On 1/19/23 11:25, Vasily Ulyanov wrote: > Hi All, > > I am now trying to run our downstream KubeVirt build with a recent libvirt > 9.0.0 > and I see a problem that libvirt refuses to start a VM if it is configured to > use a pre-created tap device: > > virError(Code=55, Domain=0,

[PATCH 2/2] qemu_interface: Fix managed='no' case when creating an ethernet interface

2023-01-23 Thread Michal Privoznik
In a recent commit of v9.0.0-rc1~192 I've tried to forbid case where a TAP device already exists, but at the same time it's managed by Libvirt ( ). NB, if @managed attribute is missing then it's assumed to be managed by Libvirt. Anyway, I've mistakenly put setting of

Re: [PATCH v2] vbox: Fix starting domains

2023-01-23 Thread Martin Kletzander
On Mon, Jan 23, 2023 at 02:59:28PM +0100, Michal Privoznik wrote: When starting a VirtualBox domain, we try to guess which frontend to use. While the whole algorithm looks a bit outdated, it may happen that we tell VirtualBox to use "gui" frontend, but not which DISPLAY= to use. I haven't found

[PATCH 5/5] virnetlibsshsession: Don't check return value of 'virNetLibsshSessionAuthMethodNew'

2023-01-23 Thread Peter Krempa
The function can't return NULL to the callers so it doesn't make sense to check it. Signed-off-by: Peter Krempa --- src/rpc/virnetlibsshsession.c | 43 ++- 1 file changed, 7 insertions(+), 36 deletions(-) diff --git a/src/rpc/virnetlibsshsession.c

[PATCH 0/5] Credential asking cleanup follow-up

2023-01-23 Thread Peter Krempa
Few things noticed during review and during fixing of the original patches after review. Peter Krempa (5): util: authconfig: Don't check return value of 'g_key_file_new()' virNetSSHSessionAuthAddPasswordAuth: Don't access unlocked 'sess' virnetsshsession: Don't check return value of

[PATCH 1/5] util: authconfig: Don't check return value of 'g_key_file_new()'

2023-01-23 Thread Peter Krempa
The function can't fail so it's pointless to check its return value. Signed-off-by: Peter Krempa --- src/util/virauthconfig.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/util/virauthconfig.c b/src/util/virauthconfig.c index 0363a1bef9..818df7a252 100644 ---

[PATCH 2/5] virNetSSHSessionAuthAddPasswordAuth: Don't access unlocked 'sess'

2023-01-23 Thread Peter Krempa
'sess->authPath' is modified before locking the 'sess' object. Additionally on failure of 'virAuthGetConfigFilePathURI' 'sess' would be unlocked even when it was not yet locked. Fixes: 273745b43122a77adf8c73b2e0a852ac42387349 Signed-off-by: Peter Krempa --- src/rpc/virnetsshsession.c | 10

[PATCH 3/5] virnetsshsession: Don't check return value of 'virNetSSHSessionAuthMethodNew'

2023-01-23 Thread Peter Krempa
The function can't return NULL to the callers so it doesn't make sense to check it. Signed-off-by: Peter Krempa --- src/rpc/virnetsshsession.c | 31 --- 1 file changed, 4 insertions(+), 27 deletions(-) diff --git a/src/rpc/virnetsshsession.c

[PATCH 4/5] virNetLibsshSessionAuthAddPasswordAuth: Don't access unlocked 'sess'

2023-01-23 Thread Peter Krempa
'sess->authPath' is modified before locking the 'sess' object. Additionally on failure of 'virAuthGetConfigFilePathURI' 'sess' would be unlocked even when it was not yet locked. Fixes: 6917467c2b0e8f655999f3e568708c4651811689 Signed-off-by: Peter Krempa --- src/rpc/virnetlibsshsession.c | 7

Re: [libvirt PATCH 7/7] ci: integration.sh: Define the SCRATCH_DIR variable for local execution

2023-01-23 Thread Erik Skultety
On Mon, Jan 23, 2023 at 01:27:12PM +, Daniel P. Berrangé wrote: > On Mon, Jan 23, 2023 at 02:19:23PM +0100, Erik Skultety wrote: > > ... > > > > > > Although an option, the main motivation here to remain consistent with > > > > how it > > > > works in GitLab. Since we define SCRATCH_DIR

Re: [PATCH v2 1/3] src: Don't use virReportSystemError() on virProcessGetStatInfo() failure

2023-01-23 Thread Martin Kletzander
On Wed, Jan 18, 2023 at 10:58:17AM +0100, Michal Privoznik wrote: Firstly, the virProcessGetStatInfo() does not fail really. But even if it did, it sets correct errno only sometimes (and even that is done in a helper it's calling - virProcessGetStat() and even there it's the case only in very

Re: [PATCH 0/5] Credential asking cleanup follow-up

2023-01-23 Thread Ján Tomko
On a Monday in 2023, Peter Krempa wrote: Few things noticed during review and during fixing of the original patches after review. Peter Krempa (5): util: authconfig: Don't check return value of 'g_key_file_new()' virNetSSHSessionAuthAddPasswordAuth: Don't access unlocked 'sess'

[PATCH 5/7] qemu: Add implicit watchdog for q35 machine types

2023-01-23 Thread Martin Kletzander
The iTCO watchdog is part of the q35 machine type since its inception, we just did not add it implicitly. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2137346 Signed-off-by: Martin Kletzander --- src/qemu/qemu_domain.c| 44 +++

[PATCH 0/7] qemu: Fix implicit q35 watchdog

2023-01-23 Thread Martin Kletzander
More info in commit messages (duh). Martin Kletzander (7): Avoid unnecessary nesting Support multiple watchdog devices Add iTCO watchdog support qemu: Enable iTCO watchdog by disabling its noreboot pin strap qemu: Add implicit watchdog for q35 machine types Document change to multiple

[PATCH 4/7] qemu: Enable iTCO watchdog by disabling its noreboot pin strap

2023-01-23 Thread Martin Kletzander
In order for the iTCO watchdog to be operational we must disable the noreboot pin strap in qemu. This is the default starting from 8.0 machine types, but desirable for older ones as well. And we can safely do that since that is not guest-visible. Signed-off-by: Martin Kletzander ---

[PATCH 6/7] Document change to multiple watchdogs

2023-01-23 Thread Martin Kletzander
With the reasoning behind it. Signed-off-by: Martin Kletzander --- docs/formatdomain.rst | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index f76c7c3d81f5..90a039f7bdfd 100644 --- a/docs/formatdomain.rst +++

[PATCH 2/7] Support multiple watchdog devices

2023-01-23 Thread Martin Kletzander
This is already possible with qemu, and actually already happening with q35 machines and a specified watchdog since q35 already includes a watchdog we do not include in the XML. In order to express such posibility multiple watchdogs need to be supported. Signed-off-by: Martin Kletzander ---

[PATCH 3/7] Add iTCO watchdog support

2023-01-23 Thread Martin Kletzander
Supported only with q35 machine types. Signed-off-by: Martin Kletzander --- src/conf/domain_conf.c| 1 + src/conf/domain_conf.h| 1 + src/conf/schemas/domaincommon.rng | 1 + src/qemu/qemu_domain_address.c| 1 + src/qemu/qemu_validate.c | 25

[PATCH 1/7] Avoid unnecessary nesting

2023-01-23 Thread Martin Kletzander
Signed-off-by: Martin Kletzander --- src/qemu/qemu_hotplug.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 026e1ee5add7..1fa3cc3ea9b1 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@

[PATCH 7/7] news: Add information about iTCO watchdog changes

2023-01-23 Thread Martin Kletzander
Signed-off-by: Martin Kletzander --- NEWS.rst | 6 ++ 1 file changed, 6 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 2756b2561164..b4e9ef608d68 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -25,6 +25,12 @@ v9.1.0 (unreleased) allowing installation of a modular daemon configuration

Re: [PATCH 4/7] qemu: Enable iTCO watchdog by disabling its noreboot pin strap

2023-01-23 Thread Daniel P . Berrangé
On Mon, Jan 23, 2023 at 03:57:53PM +0100, Martin Kletzander wrote: > In order for the iTCO watchdog to be operational we must disable the noreboot > pin strap in qemu. This is the default starting from 8.0 machine types, but > desirable for older ones as well. And we can safely do that since