Entering freeze for libvirt-6.6.0

2020-07-24 Thread Jiri Denemark
I have just tagged v6.6.0-rc1 in the repository and pushed signed tarballs and source RPMs to https://libvirt.org/sources/ Please give the release candidate some testing and in case you find a serious issue which should have a fix in the upcoming release, feel free to reply to this thread to make

Re: [libvirt PATCH 1/1] conf: move graphics validation checks out of *ParseXML function.

2020-07-24 Thread Jonathon Jongsma
On Wed, 2020-07-22 at 14:56 -0300, Nicolas Brignone wrote: > Existing virDomainDefPostParseGraphics function seems to be the right > place to put this validations. > > After moving this validation, one less argument is needed in > virDomainGraphicsListenDefParseXML, so removing the "graphics" >

Re: [PATCH] client: fix memory leak in client msg

2020-07-24 Thread Jonathon Jongsma
On Thu, 2020-07-23 at 09:29 +0800, Hao Wang wrote: > > From 3ad3fae4f2562a11bef8dcdd25b6a7e0b00d4e2c Mon Sep 17 00:00:00 > > 2001 > From: Hao Wang > Date: Sat, 18 Jul 2020 15:43:30 +0800 > Subject: [PATCH] client: fix memory leak in client msg > > When closing client->waitDispatch in

Re: [libvirt PATCH v2 10/10] rpc: use new virt-ssh-helper binary for remote tunnelling

2020-07-24 Thread Andrea Bolognani
On Fri, 2020-07-24 at 17:28 +0100, Daniel P. Berrangé wrote: > On Fri, Jul 24, 2020 at 06:22:37PM +0200, Andrea Bolognani wrote: > > I still think that the presence of an explicit 'netcat' parameter in > > the URI should result in switching to proxy=netcat instead of the > > default behavior,

Re: [libvirt PATCH v2 10/10] rpc: use new virt-ssh-helper binary for remote tunnelling

2020-07-24 Thread Daniel P . Berrangé
On Fri, Jul 24, 2020 at 06:22:37PM +0200, Andrea Bolognani wrote: > On Fri, 2020-07-24 at 16:14 +0100, Daniel P. Berrangé wrote: > > char * > > +virNetClientSSHHelperCommand(virNetClientProxy proxy, > > + const char *netcatPath, > > + const

Re: [PATCH 06/32] docs: formatdomain: Split out

2020-07-24 Thread Jonathon Jongsma
On Thu, 2020-07-23 at 15:21 +0200, Peter Krempa wrote: > Start splitting the massive document into smaller pieces using the > .. include:: directive. > > Signed-off-by: Peter Krempa > --- > docs/formatdomain-devices.rst | 5053 > > docs/formatdomain.rst

Re: [libvirt PATCH v2 10/10] rpc: use new virt-ssh-helper binary for remote tunnelling

2020-07-24 Thread Andrea Bolognani
On Fri, 2020-07-24 at 16:14 +0100, Daniel P. Berrangé wrote: > char * > +virNetClientSSHHelperCommand(virNetClientProxy proxy, > + const char *netcatPath, > + const char *socketPath, > + const char *driverURI, > +

Re: [PATCH v1 34/34] qemuDomainNamespaceTeardownInput: Deduplicate code

2020-07-24 Thread Ján Tomko
On a Wednesday in 2020, Michal Privoznik wrote: We can use qemuDomainSetupInput() to obtain the path that we need to unlink() from within domain's namespace. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain_namespace.c | 18 -- 1 file changed, 4 insertions(+), 14

Re: [PATCH v1 33/34] qemuDomainNamespaceTeardownRNG: Deduplicate code

2020-07-24 Thread Ján Tomko
On a Wednesday in 2020, Michal Privoznik wrote: We can use qemuDomainSetupRNG() to obtain the path that we need to unlink() from within domain's namespace. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain_namespace.c | 16 1 file changed, 4 insertions(+), 12

Re: [PATCH v1 32/34] qemuDomainNamespaceTeardownChardev: Deduplicate code

2020-07-24 Thread Ján Tomko
On a Wednesday in 2020, Michal Privoznik wrote: We can use qemuDomainSetupChardev() to obtain the path that we need to unlink() from within domain's namespace. Note, while previously we unlinked only VIR_DOMAIN_CHR_TYPE_DEV chardevs, with this change we unlink some other types too - exactly

Re: [PATCH v1 31/34] qemuDomainNamespaceTeardownMemory: Deduplicate code

2020-07-24 Thread Ján Tomko
On a Wednesday in 2020, Michal Privoznik wrote: We can use qemuDomainSetupMemory() to obtain the path that we need to unlink() from within domain's namespace. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain_namespace.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-)

Re: [PATCH v1 30/34] qemuDomainNamespaceTeardownHostdev: Unlink paths in one go

2020-07-24 Thread Ján Tomko
On a Wednesday in 2020, Michal Privoznik wrote: In my attempt to deduplicate the code, we can use qemuDomainSetupHostdev() to obtain the list of paths to unlink and then pass it to qemuDomainNamespaceUnlinkPaths() to unlink them in a single fork. Signed-off-by: Michal Privoznik ---

Re: [PATCH v1 29/34] qemuDomainNamespaceUnlinkPaths: Turn @paths into string list

2020-07-24 Thread Ján Tomko
On a Wednesday in 2020, Michal Privoznik wrote: So far, the only caller qemuDomainNamespaceUnlinkPath() will always pass a single path to unlink, but similarly to qemuDomainNamespaceMknodPaths() - there are a few callers that would like to pass two or more files to unlink at once (held in a

Re: [PATCH v1 25/34] qemuDomainBuildNamespace: Populate loader from daemon's namespace

2020-07-24 Thread Ján Tomko
On a Wednesday in 2020, Michal Privoznik wrote: As mentioned in one of previous commits, populating domain's namespace from pre-exec() hook is dangerous. This commit moves population of the namespace with domain loader into daemon's namespace. Signed-off-by: Michal Privoznik ---

Re: [PATCH v1 24/34] qemuDomainBuildNamespace: Populate RNGs from daemon's namespace

2020-07-24 Thread Ján Tomko
On a Wednesday in 2020, Michal Privoznik wrote: As mentioned in one of previous commits, populating domain's namespace from pre-exec() hook is dangerous. This commit moves population of the namespace with domain RNGs into daemon's namespace. Signed-off-by: Michal Privoznik ---

Re: [PATCH v1 21/34] qemuDomainBuildNamespace: Populate TPM from daemon's namespace

2020-07-24 Thread Ján Tomko
On a Wednesday in 2020, Michal Privoznik wrote: As mentioned in one of previous commits, populating domain's namespace from pre-exec() hook is dangerous. This commit moves population of the namespace with domain TPM into daemon's namespace. Signed-off-by: Michal Privoznik ---

Re: [PATCH v1 23/34] qemuDomainBuildNamespace: Populate inputs from daemon's namespace

2020-07-24 Thread Ján Tomko
On a Wednesday in 2020, Michal Privoznik wrote: As mentioned in one of previous commits, populating domain's namespace from pre-exec() hook is dangerous. This commit moves population of the namespace with domain inputs into daemon's namespace. Signed-off-by: Michal Privoznik ---

Re: [PATCH v1 28/34] qemuDomainDetachDeviceUnlink: Unlink paths in one go

2020-07-24 Thread Ján Tomko
On a Wednesday in 2020, Michal Privoznik wrote: Simirarly to qemuDomainAttachDeviceMknodHelper() which was modified just a couple of commits ago, modify the unlink helper which is called on device detach so that it can unlink multiple files in one go instead of forking off for every single one

Re: [PATCH v1 20/34] qemuDomainBuildNamespace: Populate chardevs from daemon's namespace

2020-07-24 Thread Ján Tomko
On a Wednesday in 2020, Michal Privoznik wrote: As mentioned in one of previous commits, populating domain's namespace from pre-exec() hook is dangerous. This commit moves population of the namespace with domain chardevs into daemon's namespace. Signed-off-by: Michal Privoznik ---

Re: [PATCH v1 26/34] qemuDomainBuildNamespace: Populate SEV from daemon's namespace

2020-07-24 Thread Ján Tomko
On a Wednesday in 2020, Michal Privoznik wrote: As mentioned in one of previous commits, populating domain's namespace from pre-exec() hook is dangerous. This commit moves population of the namespace with domain SEV into daemon's namespace. Signed-off-by: Michal Privoznik ---

Re: [PATCH v1 27/34] qemu_domain_namespace: Drop unused functions

2020-07-24 Thread Ján Tomko
On a Wednesday in 2020, Michal Privoznik wrote: After previous cleanup, creating /dev nodes from pre-exec hook is no longer needed and thus can be removed. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain_namespace.c | 248 --- 1 file changed, 248

Re: [PATCH v1 22/34] qemuDomainBuildNamespace: Populate graphics from daemon's namespace

2020-07-24 Thread Ján Tomko
On a Wednesday in 2020, Michal Privoznik wrote: As mentioned in one of previous commits, populating domain's namespace from pre-exec() hook is dangerous. This commit moves population of the namespace with domain graphics (render node) into daemon's namespace. Signed-off-by: Michal Privoznik

Re: [libvirt PATCH 217/351] meson: src: build libvirt_leaseshelper binary

2020-07-24 Thread Pavel Hrdina
On Fri, Jul 24, 2020 at 09:16:40AM +0200, Peter Krempa wrote: > On Thu, Jul 16, 2020 at 11:57:33 +0200, Pavel Hrdina wrote: > > Signed-off-by: Pavel Hrdina > > --- > > src/network/Makefile.inc.am | 22 -- > > src/network/meson.build | 12 > > 2 files changed,

Re: [PATCH v1 19/34] qemuDomainBuildNamespace: Populate memory from daemon's namespace

2020-07-24 Thread Ján Tomko
On a Wednesday in 2020, Michal Privoznik wrote: As mentioned in one of previous commits, populating domain's namespace from pre-exec() hook is dangerous. This commit moves population of the namespace with domain memory (nvdimms) into daemon's namespace. Signed-off-by: Michal Privoznik ---

Re: [PATCH v1 18/34] qemuDomainBuildNamespace: Populate hostdevs from daemon's namespace

2020-07-24 Thread Ján Tomko
On a Wednesday in 2020, Michal Privoznik wrote: As mentioned in one of previous commits, populating domain's namespace from pre-exec() hook is dangerous. This commit moves population of the namespace with domain hostdevs into daemon's namespace. Signed-off-by: Michal Privoznik ---

Re: [PATCH v1 17/34] qemuDomainBuildNamespace: Populate disks from daemon's namespace

2020-07-24 Thread Ján Tomko
On a Wednesday in 2020, Michal Privoznik wrote: As mentioned in one of previous commits, populating domain's namespace from pre-exec() hook is dangerous. This commit moves population of the namespace with domain disks into daemon's namespace. Fixes: a30078cb832646177defd256e77c632905f1e6d0

Re: [PATCH v1 16/34] qemuDomainBuildNamespace: Populate basic /dev from daemon's namespace

2020-07-24 Thread Ján Tomko
On a Wednesday in 2020, Michal Privoznik wrote: As mentioned in previous commit, populating domain's namespace from pre-exec() hook is dangerous. This commit moves population of the namespace with basic /dev nodes (e.g. /dev/null, /dev/kvm, etc.) into daemon's namespace. Signed-off-by: Michal

Re: [PATCH v1 14/34] qemuDomainSetupDisk: Accept @src

2020-07-24 Thread Ján Tomko
On a Wednesday in 2020, Michal Privoznik wrote: The aim to make it look as close to qemuDomainNamespaceSetupDisk() as possible. The latter will call the former and this change makes that diff easier to read. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain_namespace.c | 8 1

Re: [PATCH v1 15/34] qemu_domain_namespace: Repurpose qemuDomainBuildNamespace()

2020-07-24 Thread Ján Tomko
On a Wednesday in 2020, Michal Privoznik wrote: Okay, here is the deal. Currently, the way we build namespace is very fragile. It is done from pre-exec hook when starting a domain, after we mass closed all FDs and before we drop privileges and exec() QEMU. This fact poses some limitations onto

[libvirt PATCH v2 05/10] remote: parse the remote transport string earlier

2020-07-24 Thread Daniel P . Berrangé
We delay converting the remote transport string to enum form until fairly late. As a result we're doing string comparisons when we could be just doing enum comparisons. Signed-off-by: Daniel P. Berrangé --- po/POTFILES.in | 1 + src/remote/remote_driver.c | 51

[libvirt PATCH v2 10/10] rpc: use new virt-ssh-helper binary for remote tunnelling

2020-07-24 Thread Daniel P . Berrangé
This wires up support for using the new virt-ssh-helper binary with the ssh, libssh and libssh2 protocols. The new binary will be used preferentially if it is available in $PATH, otherwise we fall back to traditional netcat. The "proxy" URI parameter can be used to force use of netcat e.g.

[libvirt PATCH v2 08/10] remote: introduce virt-ssh-helper binary

2020-07-24 Thread Daniel P . Berrangé
When accessing libvirtd over a SSH tunnel, the remote driver needs a way to proxy the SSH input/output stream to a suitable libvirt daemon. Tihs is currently done by spawning netcat, pointing it to the libvirtd socket path. This is problematic for a number of reasons: - The socket path varies

[libvirt PATCH v2 06/10] remote: split out function for constructing socket path

2020-07-24 Thread Daniel P . Berrangé
The remoteGetUNIXSocketHelper method will be needed by source files beyond the remote driver client. Signed-off-by: Daniel P. Berrangé --- src/remote/remote_driver.c | 129 +- src/remote/remote_sockets.c | 134

[libvirt PATCH v2 09/10] rpc: switch order of args in virNetClientNewSSH

2020-07-24 Thread Daniel P . Berrangé
Switch keyfile and netcat parameters, since the netcat path and socket path are a logical pair that belong together. This patches the other constructors. Signed-off-by: Daniel P. Berrangé --- src/remote/remote_driver.c | 2 +- src/rpc/virnetclient.c | 2 +- src/rpc/virnetclient.h | 4

[libvirt PATCH v2 00/10] remote: introduce a custom netcat impl for ssh tunnelling

2020-07-24 Thread Daniel P . Berrangé
We have long had a problem with use of netcat for ssh tunnelling because there's no guarantee the UNIX socket path the client builds will match the UNIX socket path the remote host uses. We don't even allow session mode SSH tunnelling for this reason. We also can't easily auto-spawn libvirtd in

Re: [PATCH v1 13/34] qemuDomainNamespaceMknodPaths: Turn @paths into string list

2020-07-24 Thread Ján Tomko
On a Wednesday in 2020, Michal Privoznik wrote: Every caller does the same - counts the number of items in a string list they have, only to pass the number to qemuDomainNamespaceMknodPaths(). This is needless - the function can accept the string list and count the items itself. Signed-off-by:

[libvirt PATCH v2 01/10] rpc: merge logic for generating remote SSH shell script

2020-07-24 Thread Daniel P . Berrangé
Three parts of the code all build up the same SSH shell script snippet for remote tunneling the RPC protocol, but in slightly different ways. Combine them all into one helper method in the virNetClient code, since this logic doesn't really belong in the virNetSocket code. Note that the this

[libvirt PATCH v2 04/10] remote: split out function for parsing URI scheme

2020-07-24 Thread Daniel P . Berrangé
The remoteSplitURISCheme method will be needed by source files beyond the remote driver client. Signed-off-by: Daniel P. Berrangé --- src/remote/remote_driver.c | 25 - src/remote/remote_sockets.c | 28 src/remote/remote_sockets.h | 6

[libvirt PATCH v2 07/10] remote: extract logic for determining daemon to connect to

2020-07-24 Thread Daniel P . Berrangé
We'll shortly want to reuse code for determining whether to connect to the system or session daemon from places outside the remote driver client. Pulling it out into a self contained function facilitates reuse. Signed-off-by: Daniel P. Berrangé --- src/remote/remote_driver.c | 51

[libvirt PATCH v2 02/10] remote: push logic for default netcat binary into common helper

2020-07-24 Thread Daniel P . Berrangé
We don't want to repeat the choice of default netcat binary setting in three different places. This will also make it possible to do better error reporting in the helper. Signed-off-by: Daniel P. Berrangé --- src/remote/remote_driver.c | 2 +- src/rpc/virnetclient.c | 5 +++-- 2 files

[libvirt PATCH v2 03/10] remote: split off enums into separate source file

2020-07-24 Thread Daniel P . Berrangé
The remoteDriverTransport and remoteDriverMode enums are going to be needed by source files beyond the remote driver client. Signed-off-by: Daniel P. Berrangé --- src/remote/Makefile.inc.am | 2 ++ src/remote/remote_driver.c | 41 +- src/remote/remote_sockets.c |

Re: [PATCH v1 12/34] qemuDomainNamespaceMknodPaths: Create more files in one go

2020-07-24 Thread Ján Tomko
On a Wednesday in 2020, Michal Privoznik wrote: While the previous commit prepared the helper function run in a forked off helper (with corresponding struct), this commit modifies the caller, which now create all files requested in a single process and does not fork off for every single path.

Re: [PATCH v1 11/34] qemuDomainAttachDeviceMknodHelper: Create more files in a single go

2020-07-24 Thread Ján Tomko
On a Wednesday in 2020, Michal Privoznik wrote: So far, when attaching a device needs two or more /dev nodes created into a domain, we fork off and run the helper for every node separately. For majority of devices this is okay, because they need no or one node created anyway. But the idea is to

Re: [PATCH v1 08/34] qemuDomainAttachDeviceMknodHelper: Don't leak data->target

2020-07-24 Thread Ján Tomko
On a Wednesday in 2020, Michal Privoznik wrote: It's not really a problem since this is a helper process that dies as soon as the helper function returns, but the cleanup code will be replaced with a function soon and this change prepares the code for that. Signed-off-by: Michal Privoznik ---

Re: [PATCH v1 09/34] qemu_domain_namespace.c: Rename qemuDomainAttachDeviceMknodData

2020-07-24 Thread Ján Tomko
On a Wednesday in 2020, Michal Privoznik wrote: This structure is going to be used from not only device attach code, but also when building the namespace. Moreover, the code lives in a separate file so the chances of clashing with another name are minimal. Signed-off-by: Michal Privoznik ---

Re: [PATCH v1 10/34] qemuDomainAttachDeviceMknodRecursive: Isolate bind mounted devices condition

2020-07-24 Thread Ján Tomko
On a Wednesday in 2020, Michal Privoznik wrote: When attaching a device into a domain, the corresponding /dev node might need to be created in the domain's namespace. For some types of files we call mknod(), for symlinks we call symlink(), but for others - which exist in the host namespace - we

Re: [libvirt PATCH 197/351] meson: src: add support for building daemon binaries

2020-07-24 Thread Pavel Hrdina
On Fri, Jul 24, 2020 at 08:45:24AM +0200, Peter Krempa wrote: > On Thu, Jul 16, 2020 at 11:57:13 +0200, Pavel Hrdina wrote: > > Signed-off-by: Pavel Hrdina > > --- > > src/meson.build| 51 ++ > > src/remote/Makefile.inc.am | 41

Re: [PATCH] qemu: clear residual QMP caps processes during QEMU driver initialization

2020-07-24 Thread Daniel Henrique Barboza
On 7/19/20 11:09 PM, Bihong Yu wrote: On 2020/7/18 5:14, Daniel Henrique Barboza wrote: On 7/17/20 8:10 AM, Bihong Yu wrote: From c328ff62b11d58553fd2032a85fd3295e009b3d3 Mon Sep 17 00:00:00 2001 From: Bihong Yu Date: Fri, 17 Jul 2020 16:55:12 +0800 Subject: [PATCH] qemu: clear

Re: [PATCH v1 07/34] qemuDomainNamespaceSetupHostdev: Create paths in one go

2020-07-24 Thread Ján Tomko
On a Wednesday in 2020, Michal Privoznik wrote: While qemuDomainNamespaceMknodPaths() doesn't actually creates s/creates/create/ files in the namespace in one go (it forks for each path), it a few commits time it will. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain_namespace.c |

Re: [PATCH v1 06/34] qemu_domain_namespace: Check for namespace enablement earlier

2020-07-24 Thread Ján Tomko
On a Wednesday in 2020, Michal Privoznik wrote: Functions that create a device node after domain startup (used from hotplug) will get a list of paths they want to create and eventually call qemuDomainNamespaceMknodPaths() which then checks whether domain mount namespace is enabled in the first

Re: [PATCH v1 05/34] qemu_domain_namespace: Drop unused @cfg argument

2020-07-24 Thread Ján Tomko
On a Wednesday in 2020, Michal Privoznik wrote: There is a lot of functions called from qemuDomainBuildNamespace() that accept @cfg (virQEMUDriverConfigPtr) as an argument and don't use it. Historically, it was done so that all qemuDomainSetupAll*() functions look the same. Signed-off-by:

Re: [PATCH v1 04/34] qemu_domain_namespace: Rename qemuDomainCreateNamespace()

2020-07-24 Thread Ján Tomko
On a Wednesday in 2020, Michal Privoznik wrote: The name of this function is not very helpful, because it doesn't create anything, it just flips a bit in a bitmask when domain is starting up. Move the function internals into qemu_process.c and forget the function ever existed. Signed-off-by:

Re: [PATCH v1 03/34] qemu: Separate out namespace handling code

2020-07-24 Thread Ján Tomko
On a Wednesday in 2020, Michal Privoznik wrote: The qemu_domain.c file is big as is and we should split it into separate semantic blocks. Start with code that handles domain namespaces. Signed-off-by: Michal Privoznik --- po/POTFILES.in |1 + src/qemu/Makefile.inc.am

Re: [PATCH v1 02/34] virDevMapperGetTargets: Don't ignore EBADF

2020-07-24 Thread Ján Tomko
On a Wednesday in 2020, Michal Privoznik wrote: One of the symptoms of the bug [1] is that on the second start of a domain we get EBADF when talking to libdevmapper. The reason is that libdevmapper opens /dev/mapper/control to talk to kernel and saves the FD into a global variable. This works

Re: [libvirt PATCH 217/351] meson: src: build libvirt_leaseshelper binary

2020-07-24 Thread Peter Krempa
On Thu, Jul 16, 2020 at 11:57:33 +0200, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- > src/network/Makefile.inc.am | 22 -- > src/network/meson.build | 12 > 2 files changed, 12 insertions(+), 22 deletions(-) I took this one as a representative

[PATCH v2] docs: Mention supported hypervisor of transient element

2020-07-24 Thread Han Han
Signed-off-by: Han Han --- docs/formatdomain.html.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index f3a639b972..6b67a09bb3 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -4092,7 +4092,8

Re: [libvirt PATCH 197/351] meson: src: add support for building daemon binaries

2020-07-24 Thread Peter Krempa
On Thu, Jul 16, 2020 at 11:57:13 +0200, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- > src/meson.build| 51 ++ > src/remote/Makefile.inc.am | 41 -- > 2 files changed, 51 insertions(+), 41 deletions(-) > >

Re: [libvirt PATCH 180/351] meson: src: build lockd.so shared module

2020-07-24 Thread Peter Krempa
On Thu, Jul 16, 2020 at 11:56:56 +0200, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- > src/locking/Makefile.inc.am | 13 - > src/locking/meson.build | 17 + > 2 files changed, 17 insertions(+), 13 deletions(-) [...] > diff --git