[libvirt] [PATCH v2] storage: Fix daemon crash on lookup storagepool by targetpath

2019-12-20 Thread Yi Li
Causing a crash when storagePoolLookupByTargetPath beacuse of Some types of storage pool have no target elements. Use STREQ_NULLABLE instead of STREQ Avoids segfaults when using NULL arguments. Core was generated by `/usr/sbin/libvirtd'. Program terminated with signal 11, Segmentation fault.

Re: [libvirt] [PATCH v5 3/5] qemu_process.c: use g_autoptr()

2019-12-20 Thread Cole Robinson
On 12/20/19 4:16 PM, Daniel Henrique Barboza wrote: > Change all feasible pointers to use g_autoptr(). > > Signed-off-by: Daniel Henrique Barboza > --- > src/qemu/qemu_process.c | 123 ++-- > 1 file changed, 41 insertions(+), 82 deletions(-) > @@ -4340,7

[libvirt] [go-xml PATCH 2/2] Support domain address type='unassigned'

2019-12-20 Thread Cole Robinson
Signed-off-by: Cole Robinson --- This should fix the libvirt-go-xml CI domain.go | 23 +++ 1 file changed, 23 insertions(+) diff --git a/domain.go b/domain.go index 7552c4b..c290003 100644 --- a/domain.go +++ b/domain.go @@ -887,6 +887,9 @@ type DomainAddressCCID struct {

[libvirt] [go-xml PATCH 0/2] Fix libvirt-go-xml test CI

2019-12-20 Thread Cole Robinson
Patch 1 is a nearby 'fix' Patch 2 fixes the CI for the new address type='unassigned' Cole Robinson (2): Fix virtio-s390 address lookup Support domain address type='unassigned' domain.go | 25 - 1 file changed, 24 insertions(+), 1 deletion(-) -- 2.23.0 --

[libvirt] [go-xml PATCH 1/2] Fix virtio-s390 address lookup

2019-12-20 Thread Cole Robinson
It was comparing against spapr-vio Signed-off-by: Cole Robinson --- All this virtio-s390 stuff is kinda bogus though, because it is never actually output in libvirt XML. domain.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/domain.go b/domain.go index 8c4d7a4..7552c4b

Re: [libvirt] [PATCH v4 0/4] qemu_process: Glib sponsored cleanup

2019-12-20 Thread Cole Robinson
On 12/20/19 3:54 PM, Michal Prívozník wrote: > On 12/20/19 7:57 PM, Cole Robinson wrote: >> On 12/19/19 4:09 PM, Daniel Henrique Barboza wrote: >>> This series got buried a few months ago. Let's go onward unto >>> the 20s with no one left behind. >>> >>> changes from version 3 [1]: >>> - rebased

[libvirt] [PATCH v5 5/5] qemu_process.c: remove 'cleanup' label from qemuProcessCreatePretendCmd()

2019-12-20 Thread Daniel Henrique Barboza
The 'cleanup' flag is doing no cleaup in this function. We can remove it and return NULL on error or qemuBuildCommandLine(). Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_process.c | 37 - 1 file changed, 16 insertions(+), 21 deletions(-) diff

[libvirt] [PATCH v5 3/5] qemu_process.c: use g_autoptr()

2019-12-20 Thread Daniel Henrique Barboza
Change all feasible pointers to use g_autoptr(). Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_process.c | 123 ++-- 1 file changed, 41 insertions(+), 82 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index

[libvirt] [PATCH v5 0/5] qemu_process: Glib sponsored cleanup

2019-12-20 Thread Daniel Henrique Barboza
changes from previous version 4 [1]: - patch 1: * moved 'dev' inside the for loop in qemuProcessHandleBlockThreshold() * moved 'id' inside the 'for' loop in qemuProcessLookupPTYs() * moved 'path' inside both conditionals in qemuProcessBuildDestroyMemoryPaths() * set 'template=NULL' in

[libvirt] [PATCH v5 2/5] qemu_domain.h: add G_DEFINE_AUTOPTR_CLEANUP_FUNC for qemuDomainLogContext

2019-12-20 Thread Daniel Henrique Barboza
This will allow us to g_autoptr qemuDomainLogContext pointers in the following patch. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_domain.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index a32852047c..7a86818cbb 100644 ---

[libvirt] [PATCH v5 1/5] qemu_process.c: use g_autofree

2019-12-20 Thread Daniel Henrique Barboza
Change all feasible strings and scalar pointers to use g_autofree. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_process.c | 103 +++- 1 file changed, 38 insertions(+), 65 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c

[libvirt] [PATCH v5 4/5] qemu_process.c: remove cleanup labels after g_auto*() changes

2019-12-20 Thread Daniel Henrique Barboza
The g_auto*() changes made by the previous patches made a lot of 'cleanup' labels obsolete. Let's remove them. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_process.c | 182 1 file changed, 70 insertions(+), 112 deletions(-) diff --git

Re: [libvirt] [PATCH RFC 11/11] qemu: backup: Implement support for backup disk bitmap name configuration

2019-12-20 Thread Eric Blake
On 12/20/19 7:25 AM, Peter Krempa wrote: Use the user-configured name of the bitmap when merging the appropriate bitmaps for an excremental backup so that the user can see it as Eww. I know you meant incremental, but your choice of wording left quite a smelly impression  configured.

Re: [libvirt] [PATCH v4 0/4] qemu_process: Glib sponsored cleanup

2019-12-20 Thread Michal Prívozník
On 12/20/19 7:57 PM, Cole Robinson wrote: > On 12/19/19 4:09 PM, Daniel Henrique Barboza wrote: >> This series got buried a few months ago. Let's go onward unto >> the 20s with no one left behind. >> >> changes from version 3 [1]: >> - rebased to master at commit 330b556829 >> - removed former

Re: [libvirt] [PATCH] schemas: Allow additional qemu cmd line arguments/env variables and qemuCaps to be interleaved

2019-12-20 Thread Cole Robinson
On 12/20/19 4:27 AM, Michal Privoznik wrote: > While command line arguments are sort of positional (becasue you > have to have two entries, one for "-arg" the other for "value"), > it doesn't really matter whether env variables come before or > after command line arguments. > > And it matter even

Re: [libvirt] [PATCH] util: add note about event file descriptors on Windows

2019-12-20 Thread Cole Robinson
On 12/20/19 10:47 AM, Daniel P. Berrangé wrote: > When using GNULIB with Winsock, libvirt will never see the normal HANDLE > objects, instead GNULIB guarantees that libvirt gets a C runtime file > descriptor. The GNULIB poll impl also expects to get C runtime file > descriptors rather than HANDLE

Re: [libvirt] [PATCH RFC 09/11] conf: backup: Allow configuration of names exported via NBD

2019-12-20 Thread Eric Blake
On 12/20/19 7:25 AM, Peter Krempa wrote: If users wish to use different name for exported disks or bitmaps different names the new fields allow to do so. Additionally they also document the allow this possibility. current settings. Signed-off-by: Peter Krempa ---

Re: [libvirt] [PATCH v2 0/2] Initialize host boot time global var upfront

2019-12-20 Thread Cole Robinson
On 12/19/19 6:24 AM, Michal Privoznik wrote: > This is a v2 for: > > https://www.redhat.com/archives/libvir-list/2019-December/msg01045.html > > While technically v1 was fixed I agree with Cole's suggestion, so I'm > discarding v1 and sending another version which implements his > suggestion. >

Re: [libvirt] [PATCH RFC 09/11] conf: backup: Allow configuration of names exported via NBD

2019-12-20 Thread Eric Blake
On 12/20/19 8:00 AM, Daniel P. Berrangé wrote: On Fri, Dec 20, 2019 at 02:25:27PM +0100, Peter Krempa wrote: If users wish to use different name for exported disks or bitmaps the new fields allow to do so. Additionally they also document the current settings. Is there a reason why users would

Re: [libvirt] [PATCH 03/11] qemu: backup: Configure backup store image with backing file

2019-12-20 Thread Eric Blake
On 12/20/19 7:25 AM, Peter Krempa wrote: In contrast to snapshots the backup job does not complain when the backup job's store file has backing pre-configured. It's actually required so that the NBD server exposes all the data properly. Remove our fake termination and use the existing disk

Re: [libvirt] [PATCH 0/5] Get rid of "no_memory" labels

2019-12-20 Thread Cole Robinson
On 12/20/19 7:43 AM, Fabiano Fidêncio wrote: > As pointed out by Ján Tomko, "no_memory seems suspicious in the times of > abort()". > > As libvirt decided to take the path to not report OOM and simply abort > when it happens, let's get rid of the no_memory labels and simplify the > code around

Re: [libvirt] [PATCH v4 0/4] qemu_process: Glib sponsored cleanup

2019-12-20 Thread Cole Robinson
On 12/20/19 2:31 PM, Daniel Henrique Barboza wrote: > > > On 12/20/19 3:57 PM, Cole Robinson wrote: >> On 12/19/19 4:09 PM, Daniel Henrique Barboza wrote: >>> This series got buried a few months ago. Let's go onward unto >>> the 20s with no one left behind. >>> >>> changes from version 3 [1]:

Re: [libvirt] [PATCH v4 0/4] qemu_process: Glib sponsored cleanup

2019-12-20 Thread Daniel Henrique Barboza
On 12/20/19 3:57 PM, Cole Robinson wrote: On 12/19/19 4:09 PM, Daniel Henrique Barboza wrote: This series got buried a few months ago. Let's go onward unto the 20s with no one left behind. changes from version 3 [1]: - rebased to master at commit 330b556829 - removed former patch 4. The

Re: [libvirt] [PATCH v2 1/3] qemu: add explicit flag to skip qemu caps invalidation

2019-12-20 Thread Michal Prívozník
On 12/20/19 2:47 PM, Daniel P. Berrangé wrote: > Currently if the binary path is NULL in the qemu capabilities object, > cache invalidation is skipped. A future patch will ensure that the > binary path is always non-NULL, so a way to explicitly skip invalidation > is required. > > Signed-off-by:

Re: [libvirt] [PATCH v2 0/3] store binary name in capabilities

2019-12-20 Thread Michal Prívozník
On 12/20/19 2:47 PM, Daniel P. Berrangé wrote: > It is helpful for debugging to have the binary name in the capabilities XML > > Daniel P. Berrangé (3): > qemu: add explicit flag to skip qemu caps invalidation > qemu: add qemu caps constructor which takes binary name > qemu: store the

Re: [libvirt] [PATCH v4 1/4] qemu_process.c: use g_autofree

2019-12-20 Thread Daniel Henrique Barboza
On 12/20/19 3:34 PM, Cole Robinson wrote: On 12/19/19 4:09 PM, Daniel Henrique Barboza wrote: Change all feasible strings and scalar pointers to use g_autofree. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_process.c | 97 +++-- 1 file

Re: [libvirt] [PATCH v4 0/4] qemu_process: Glib sponsored cleanup

2019-12-20 Thread Cole Robinson
On 12/19/19 4:09 PM, Daniel Henrique Barboza wrote: > This series got buried a few months ago. Let's go onward unto > the 20s with no one left behind. > > changes from version 3 [1]: > - rebased to master at commit 330b556829 > - removed former patch 4. The 'g_strdup_printf' change was > made

Re: [libvirt] [PATCH] news: document phyp removal

2019-12-20 Thread Michal Prívozník
On 12/20/19 7:04 PM, Cole Robinson wrote: > Signed-off-by: Cole Robinson > --- > docs/news.xml | 10 ++ > 1 file changed, 10 insertions(+) Reviewed-by: Michal Privoznik Michal -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v4 2/4] qemu_process.c: use g_autoptr()

2019-12-20 Thread Cole Robinson
On 12/19/19 4:09 PM, Daniel Henrique Barboza wrote: > Change all feasible pointers to use g_autoptr(). > > Signed-off-by: Daniel Henrique Barboza > --- > src/qemu/qemu_process.c | 113 +--- > 1 file changed, 37 insertions(+), 76 deletions(-) > @@ -6718,7

Re: [libvirt] [PATCH v4 1/4] qemu_process.c: use g_autofree

2019-12-20 Thread Cole Robinson
On 12/19/19 4:09 PM, Daniel Henrique Barboza wrote: > Change all feasible strings and scalar pointers to use g_autofree. > > Signed-off-by: Daniel Henrique Barboza > --- > src/qemu/qemu_process.c | 97 +++-- > 1 file changed, 34 insertions(+), 63 deletions(-)

[libvirt] [PATCH] news: document phyp removal

2019-12-20 Thread Cole Robinson
Signed-off-by: Cole Robinson --- docs/news.xml | 10 ++ 1 file changed, 10 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 055353b9a5..1af57f8af0 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -99,6 +99,16 @@ Python 2 binary. Python 3 must be used instead.

Re: [libvirt] [PATCH] Remove phyp driver

2019-12-20 Thread Cole Robinson
On 12/18/19 2:50 PM, Michal Prívozník wrote: > [I'm CCing Eduardo, who worked a lot on this driver in the past. Maybe > he knows if this hypervisor is still alive.] > > On 12/18/19 4:43 PM, Cole Robinson wrote: >> The phyp driver was added in 2009 and does not appear to have had any >> real

Re: [libvirt] [PATCH] Remove phyp driver

2019-12-20 Thread Daniel P . Berrangé
On Wed, Dec 18, 2019 at 10:43:11AM -0500, Cole Robinson wrote: > The phyp driver was added in 2009 and does not appear to have had any > real feature change since 2011. There's virtually no evidence online > of users actually using it. IMO it's time to kill it. > > Signed-off-by: Cole Robinson >

Re: [libvirt] i want to update the disk driver from ide to virtio, but fail , why ?

2019-12-20 Thread Cole Robinson
On 12/20/19 6:23 AM, thomas wrote: > hi, ALL: > my question description as follow: > > > > virsh dumpxml root-vsys_v2  > v2.xml ,   >  in the v2.xml has the following information: >     >   >   >   >     *// i want change the 'ide' to > 'virtio', but fail* >   >  

Re: [libvirt] [PATCH v2] storage: Fix volStorageBackendRBDRefreshVolInfo

2019-12-20 Thread Cole Robinson
On 10/29/19 12:12 AM, Yi Li wrote: > Fix the return value status comparison checking for call to > volStorageBackendRBDRefreshVolInfo introduced by commit id f46d137e. > > we only should fail when the return is < 0. -ENOENT, -ETIMEDOUT will > ignore according commit id f46d137e. > >

Re: [libvirt] [PATCH] storage: Fix daemon crash on lookup storagepool by targetpath

2019-12-20 Thread Cole Robinson
On 12/20/19 8:37 AM, Yi Li wrote: > Causing a crash when storagePoolLookupByTargetPath because of > Some types of storage pool have no target elements. > > Core was generated by `/usr/sbin/libvirtd'. > Program terminated with signal 11, Segmentation fault. > (gdb) bt > 0 0x9e951388 in

[libvirt] [PATCH] util: add note about event file descriptors on Windows

2019-12-20 Thread Daniel P . Berrangé
When using GNULIB with Winsock, libvirt will never see the normal HANDLE objects, instead GNULIB guarantees that libvirt gets a C runtime file descriptor. The GNULIB poll impl also expects to get C runtime file descriptors rather than HANDLE objects. Document this behaviour so that it is clear to

[libvirt] [PATCH v3 06/11] esx: improve some of the virErrorNumber used

2019-12-20 Thread Pino Toscano
A lot of virReportError() calls use VIR_ERR_INTERNAL_ERROR to represent the number of the error, even in cases where there is one fitting more. Hence, replace some of them with better virErrorNumber values. Signed-off-by: Pino Toscano --- src/esx/esx_network_driver.c| 4 ++--

[libvirt] [PATCH v3 02/11] esx: implement connectListAllNetworks

2019-12-20 Thread Pino Toscano
Implement the .connectListAllNetworks networks API in the esx network driver. Signed-off-by: Pino Toscano --- src/esx/esx_network_driver.c | 64 1 file changed, 64 insertions(+) diff --git a/src/esx/esx_network_driver.c b/src/esx/esx_network_driver.c index

[libvirt] [PATCH v3 07/11] esx: implement domainGetHostname

2019-12-20 Thread Pino Toscano
Implement the .domainGetHostname hypervisor driver API to get the hostname of a running guest (needs VMware Tools). Signed-off-by: Pino Toscano --- docs/drvesx.html.in | 3 +++ src/esx/esx_driver.c | 54 2 files changed, 57 insertions(+) diff

[libvirt] [PATCH v3 08/11] esx: generator: fix free of elements in lists

2019-12-20 Thread Pino Toscano
When a list is freed, we iterate through all the items, invoking the free function for each; the actual free function called for each element is the function of the actual type of each element, and thus the @_next pointer in the element struct has the same type as the element itself. Currently,

[libvirt] [PATCH v3 10/11] esx: implement domainInterfaceAddresses

2019-12-20 Thread Pino Toscano
Implement the .domainInterfaceAddresses hypervisor API, although only functional for the VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_AGENT source. Signed-off-by: Pino Toscano --- docs/drvesx.html.in | 4 ++ src/esx/esx_driver.c | 166 +++ 2 files changed, 170

[libvirt] [PATCH v3 04/11] esx: split scsilunToStorageVol helper

2019-12-20 Thread Pino Toscano
Move the creation of a virStorageVolPtr object from the esxVI_ScsiLun object of a SCSI lun out of esxStorageVolLookupByName and esxStorageVolLookupByPath in an own helper. This way it can be used also in other functions. Signed-off-by: Pino Toscano Reviewed-by: Cole Robinson ---

[libvirt] [PATCH v3 05/11] esx: implement storagePoolListAllVolumes

2019-12-20 Thread Pino Toscano
Implement the .storagePoolListAllVolumes storage API in the esx storage driver, and in all its subdrivers. Signed-off-by: Pino Toscano --- src/esx/esx_storage_backend_iscsi.c | 68 +++ src/esx/esx_storage_backend_vmfs.c | 83 +

[libvirt] [PATCH v3 00/11] esx: various improvements

2019-12-20 Thread Pino Toscano
- fix a bug in the esx VI generator - implement connectListAllStoragePools, so virConnectListAllStoragePools() works - implement connectListAllNetworks, so virConnectListAllNetworks() works - implement storagePoolListAllVolumes, so virStoragePoolListAllVolumes() works - implement

[libvirt] [PATCH v3 11/11] docs: document implemented APIs in esx

2019-12-20 Thread Pino Toscano
Signed-off-by: Pino Toscano --- docs/news.xml | 14 ++ 1 file changed, 14 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 055353b9a5..6c29011d53 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -86,6 +86,20 @@ lzop should be used. +

[libvirt] [PATCH v3 09/11] esx: generator: add GuestNicInfo object

2019-12-20 Thread Pino Toscano
Add the definition of the GuestNicInfo object, with all the required objects for it. Signed-off-by: Pino Toscano --- scripts/esx_vi_generator.py| 1 + src/esx/esx_vi_generator.input | 54 ++ 2 files changed, 55 insertions(+) diff --git

[libvirt] [PATCH v3 01/11] esx: implement connectListAllStoragePools

2019-12-20 Thread Pino Toscano
Implement the .connectListAllStoragePools storage API in the esx storage driver, and in all its subdrivers. Signed-off-by: Pino Toscano --- src/esx/esx_storage_backend_iscsi.c | 70 + src/esx/esx_storage_backend_vmfs.c | 96 +

[libvirt] [PATCH v3 03/11] esx: split datastorePathToStorageVol helper

2019-12-20 Thread Pino Toscano
Move the creation of a virStorageVolPtr object by lookup out of esxStorageVolLookupByPath in an own helper. This way it can be used also in other functions. Signed-off-by: Pino Toscano Reviewed-by: Cole Robinson --- src/esx/esx_storage_backend_vmfs.c | 29 +++-- 1 file

Re: [libvirt] [PATCH 4/7] libvirt: support an "embed" URI path selector for opening drivers

2019-12-20 Thread Daniel P . Berrangé
On Thu, Dec 19, 2019 at 11:15:50AM +, Daniel P. Berrangé wrote: > On Tue, Dec 17, 2019 at 12:41:27PM -0500, Cole Robinson wrote: > > The second issue: testing with virt-manager, everything locks up with > > OpenGraphicsFD: > > > > #0 0x77a7f07a in pthread_cond_timedwait@@GLIBC_2.3.2

[libvirt] [PATCH v3 4/5] secrets: add support for running secret driver in embedded mode

2019-12-20 Thread Daniel P . Berrangé
This enables support for running the secret driver embedded to the calling application process using a URI: secret:///embed?root=/some/path When using the embedded mode with a root=/var/tmp/embed, the driver will use the following paths: configDir: /var/tmp/embed/etc/secrets

[libvirt] [PATCH v3 5/5] qemu: introduce a new "virt-qemu-run" program

2019-12-20 Thread Daniel P . Berrangé
The previous "QEMU shim" proof of concept was taking an approach of only caring about initial spawning of the QEMU process. It was then registered with the libvirtd daemon who took over management of it. The intent was that later libvirtd would be refactored so that the shim retained control over

[libvirt] [PATCH v3 1/5] libvirt: pass a directory path into drivers for embedded usage

2019-12-20 Thread Daniel P . Berrangé
The intent here is to allow the virt drivers to be run directly embedded in an arbitrary process without interfering with libvirtd. To achieve this they need to store all their configuration & state in a separate directory tree from the main system or session libvirtd instances. This can be

[libvirt] [PATCH v3 0/5] introduce support for an embedded driver mode

2019-12-20 Thread Daniel P . Berrangé
This is a followup to: https://www.redhat.com/archives/libvir-list/2019-May/msg00467.html https://www.redhat.com/archives/libvir-list/2019-December/msg00050.html This series implements support for an embedded driver mode for libvirt, with initial support in the QEMU and secrets drivers. In

[libvirt] [PATCH v3 3/5] qemu: add support for running QEMU driver in embedded mode

2019-12-20 Thread Daniel P . Berrangé
This enables support for running QEMU embedded to the calling application process using a URI: qemu:///embed?root=/some/path Note that it is important to keep the path reasonably short to avoid risk of hitting the limit on UNIX socket path names which is 108 characters. When using the

[libvirt] [PATCH v3 2/5] libvirt: support an "embed" URI path selector for opening drivers

2019-12-20 Thread Daniel P . Berrangé
The driver URI scheme: "$drivername:///embed?root=/some/path" enables a new way to use the drivers by embedding them directly in the calling process. To use this the process must have a thread running the libvirt event loop. This URI will then cause libvirt to dynamically load the driver

Re: [libvirt] [PATCH RFC 09/11] conf: backup: Allow configuration of names exported via NBD

2019-12-20 Thread Daniel P . Berrangé
On Fri, Dec 20, 2019 at 02:25:27PM +0100, Peter Krempa wrote: > If users wish to use different name for exported disks or bitmaps > the new fields allow to do so. Additionally they also document the > current settings. Is there a reason why users would want to change the names ? Regards,

Re: [libvirt] [PATCH 07/11] qemu: process: Terminate backup job on VM destroy

2019-12-20 Thread Daniel P . Berrangé
On Fri, Dec 20, 2019 at 02:25:25PM +0100, Peter Krempa wrote: > Commit d75f865fb989b3e6330c78c28e1c3bf7fa28e6a5 caused a job-deadlock if > a VM is running the backup job and being destroyed as it removed the > cleanup of the async job type and there was nothing to clean up the > backup job. > >

Re: [libvirt] [PATCH 08/11] schemas: backup: Remove pointless for 'name' of backup disk

2019-12-20 Thread Daniel P . Berrangé
On Fri, Dec 20, 2019 at 02:25:26PM +0100, Peter Krempa wrote: > One of the first versions thought of using disk path as the second > option but this was dropped as being a legacy interface. Remove the > leftover pointless wrapper for the disk name as there's just > one option now. > >

Re: [libvirt] [PATCH 06/11] qemu: backup: Properly propagate async job type when cancelling the job

2019-12-20 Thread Daniel P . Berrangé
On Fri, Dec 20, 2019 at 02:25:24PM +0100, Peter Krempa wrote: > When cancelling the blockjobs as part of failed backup job startup > recover we didn't pass in the correct async job type. Luckily the block > job handler and cancellation code paths use no block job at all > currently so those were

Re: [libvirt] [PATCH 05/11] qemu: blockjob: Remove infrastructure for remembering to delete image

2019-12-20 Thread Daniel P . Berrangé
On Fri, Dec 20, 2019 at 02:25:23PM +0100, Peter Krempa wrote: > Now that we delete the images elsewhere it's not required. Additionally > it's safe to do as we never released an upstream version which required > this being in place. > > Signed-off-by: Peter Krempa > --- > src/qemu/qemu_backup.c

Re: [libvirt] [PATCH 04/11] qemu: backup: Move deletion of backup images to job termination

2019-12-20 Thread Daniel P . Berrangé
On Fri, Dec 20, 2019 at 02:25:22PM +0100, Peter Krempa wrote: > While qemu is running both locations are identical in semantics, but the > move will allow us to fix the scenario when the VM is destroyed or > crashes where we'd leak the images. > > Signed-off-by: Peter Krempa > --- >

Re: [libvirt] [PATCH 03/11] qemu: backup: Configure backup store image with backing file

2019-12-20 Thread Daniel P . Berrangé
On Fri, Dec 20, 2019 at 02:25:21PM +0100, Peter Krempa wrote: > In contrast to snapshots the backup job does not complain when the > backup job's store file has backing pre-configured. It's actually > required so that the NBD server exposes all the data properly. > > Remove our fake termination

Re: [libvirt] [PATCH 02/11] qemu: Reset the node-name allocator in qemuDomainObjPrivateDataClear

2019-12-20 Thread Daniel P . Berrangé
On Fri, Dec 20, 2019 at 02:25:20PM +0100, Peter Krempa wrote: > qemuDomainObjPrivateDataClear clears state which become invalid after VM > stopped running and the node name allocator belongs there. > > Signed-off-by: Peter Krempa > --- > src/qemu/qemu_domain.c | 3 +++ >

[libvirt] [PATCH v2 3/3] qemu: store the emulator name in the capabilities XML

2019-12-20 Thread Daniel P . Berrangé
We don't need this for any functional purpose, but when debugging hosts it is useful to know what binary a given capabilities XML document is associated with. Signed-off-by: Daniel P. Berrangé --- src/qemu/qemu_capabilities.c | 15 +++

Re: [libvirt] [PATCH 01/11] qemu: block: Use proper asyncJob when waiting for completion of blockdev-create

2019-12-20 Thread Daniel P . Berrangé
On Fri, Dec 20, 2019 at 02:25:19PM +0100, Peter Krempa wrote: > The waiting loop used QEMU_ASYNC_JOB_NONE rather than 'asyncJob' passed > from the caller. > > Signed-off-by: Peter Krempa > --- > src/qemu/qemu_block.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by:

[libvirt] [PATCH v2 2/3] qemu: add qemu caps constructor which takes binary name

2019-12-20 Thread Daniel P . Berrangé
Simplify repeated code patterns by providing a new constructor taking the QEMU binary name. Signed-off-by: Daniel P. Berrangé --- src/qemu/qemu_capabilities.c | 23 ++- src/qemu/qemu_capabilities.h | 1 + 2 files changed, 15 insertions(+), 9 deletions(-) diff --git

[libvirt] [PATCH v2 1/3] qemu: add explicit flag to skip qemu caps invalidation

2019-12-20 Thread Daniel P . Berrangé
Currently if the binary path is NULL in the qemu capabilities object, cache invalidation is skipped. A future patch will ensure that the binary path is always non-NULL, so a way to explicitly skip invalidation is required. Signed-off-by: Daniel P. Berrangé --- src/qemu/qemu_capabilities.c | 14

[libvirt] [PATCH v2 0/3] store binary name in capabilities

2019-12-20 Thread Daniel P . Berrangé
It is helpful for debugging to have the binary name in the capabilities XML Daniel P. Berrangé (3): qemu: add explicit flag to skip qemu caps invalidation qemu: add qemu caps constructor which takes binary name qemu: store the emulator name in the capabilities XML

[libvirt] [PATCH] storage: Fix daemon crash on lookup storagepool by targetpath

2019-12-20 Thread Yi Li
Causing a crash when storagePoolLookupByTargetPath because of Some types of storage pool have no target elements. Core was generated by `/usr/sbin/libvirtd'. Program terminated with signal 11, Segmentation fault. (gdb) bt 0 0x9e951388 in strcmp () from /lib64/libc.so.6 1

[libvirt] [PATCH RFC 11/11] qemu: backup: Implement support for backup disk bitmap name configuration

2019-12-20 Thread Peter Krempa
Use the user-configured name of the bitmap when merging the appropriate bitmaps for an excremental backup so that the user can see it as configured. Additionally expose the default bitmap name if nothing is configured. Signed-off-by: Peter Krempa --- src/qemu/qemu_backup.c | 9 - 1 file

[libvirt] [PATCH 04/11] qemu: backup: Move deletion of backup images to job termination

2019-12-20 Thread Peter Krempa
While qemu is running both locations are identical in semantics, but the move will allow us to fix the scenario when the VM is destroyed or crashes where we'd leak the images. Signed-off-by: Peter Krempa --- src/qemu/qemu_backup.c | 24 src/qemu/qemu_blockjob.c | 15

[libvirt] [PATCH RFC 10/11] qemu: backup: Implement support for backup disk export name configuration

2019-12-20 Thread Peter Krempa
Pass the exportname as configured when exporting the image via NBD and fill it with the default if it's not configured. Signed-off-by: Peter Krempa --- src/qemu/qemu_backup.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_backup.c b/src/qemu/qemu_backup.c

[libvirt] [PATCH 07/11] qemu: process: Terminate backup job on VM destroy

2019-12-20 Thread Peter Krempa
Commit d75f865fb989b3e6330c78c28e1c3bf7fa28e6a5 caused a job-deadlock if a VM is running the backup job and being destroyed as it removed the cleanup of the async job type and there was nothing to clean up the backup job. Add an explicit cleanup of the backup job when destroying a VM.

[libvirt] [PATCH RFC 09/11] conf: backup: Allow configuration of names exported via NBD

2019-12-20 Thread Peter Krempa
If users wish to use different name for exported disks or bitmaps the new fields allow to do so. Additionally they also document the current settings. Signed-off-by: Peter Krempa --- docs/formatbackup.html.in | 9 + docs/schemas/domainbackup.rng

[libvirt] [PATCH 05/11] qemu: blockjob: Remove infrastructure for remembering to delete image

2019-12-20 Thread Peter Krempa
Now that we delete the images elsewhere it's not required. Additionally it's safe to do as we never released an upstream version which required this being in place. Signed-off-by: Peter Krempa --- src/qemu/qemu_backup.c | 12 src/qemu/qemu_blockjob.c

[libvirt] [PATCH 08/11] schemas: backup: Remove pointless for 'name' of backup disk

2019-12-20 Thread Peter Krempa
One of the first versions thought of using disk path as the second option but this was dropped as being a legacy interface. Remove the leftover pointless wrapper for the disk name as there's just one option now. Signed-off-by: Peter Krempa --- docs/schemas/domainbackup.rng | 8 ++-- 1 file

[libvirt] [PATCH 06/11] qemu: backup: Properly propagate async job type when cancelling the job

2019-12-20 Thread Peter Krempa
When cancelling the blockjobs as part of failed backup job startup recover we didn't pass in the correct async job type. Luckily the block job handler and cancellation code paths use no block job at all currently so those were correct. Signed-off-by: Peter Krempa --- src/qemu/qemu_backup.c |

[libvirt] [PATCH 01/11] qemu: block: Use proper asyncJob when waiting for completion of blockdev-create

2019-12-20 Thread Peter Krempa
The waiting loop used QEMU_ASYNC_JOB_NONE rather than 'asyncJob' passed from the caller. Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index 95a2702f9d..eab21bc107

[libvirt] [PATCH 02/11] qemu: Reset the node-name allocator in qemuDomainObjPrivateDataClear

2019-12-20 Thread Peter Krempa
qemuDomainObjPrivateDataClear clears state which become invalid after VM stopped running and the node name allocator belongs there. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 3 +++ src/qemu/qemu_process.c | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git

[libvirt] [PATCH 03/11] qemu: backup: Configure backup store image with backing file

2019-12-20 Thread Peter Krempa
In contrast to snapshots the backup job does not complain when the backup job's store file has backing pre-configured. It's actually required so that the NBD server exposes all the data properly. Remove our fake termination and use the existing disk source as backing. Signed-off-by: Peter Krempa

[libvirt] [PATCH 00/11] qemu: backup: Fixes and improvements

2019-12-20 Thread Peter Krempa
I've got a report of pull-mode backup not working properly. While investigating I've found out few other problems and one regression caused by a recent patch. All of those are fixed below. Additionally the last 3 patches are RFC and were created based on the discussion on qemu-block and I don't

[libvirt] [PATCH 3/5] rpc: Get rid of "no_memory" labels

2019-12-20 Thread Fabiano Fidêncio
As pointed out by Ján Tomko, "no_memory seems suspicious in the times of abort()". As libvirt decided to take the path to not report OOM and simply abort when it happens, let's get rid of the no_memory labels and simplify the code around them. Signed-off-by: Fabiano Fidêncio ---

[libvirt] [PATCH 4/5] util: Get rid of "no_memory" labels

2019-12-20 Thread Fabiano Fidêncio
As pointed out by Ján Tomko, "no_memory seems suspicious in the times of abort()". As libvirt decided to take the path to not report OOM and simply abort when it happens, let's get rid of the no_memory labels and simplify the code around them. Mind that virfirewall.c was not touched and still

[libvirt] [PATCH 2/5] openvz: Get rid of "no_memory" labels

2019-12-20 Thread Fabiano Fidêncio
As pointed out by Ján Tomko, "no_memory seems suspicious in the times of abort()". As libvirt decided to take the path to not report OOM and simply abort when it happens, let's get rid of the no_memory labels and simplify the code around them. Signed-off-by: Fabiano Fidêncio ---

[libvirt] [PATCH 5/5] vbox: Get rid of "no_memory" labels

2019-12-20 Thread Fabiano Fidêncio
As pointed out by Ján Tomko, "no_memory seems suspicious in the times of abort()". As libvirt decided to take the path to not report OOM and simply abort when it happens, let's get rid of the no_memory labels and simplify the code around them. Signed-off-by: Fabiano Fidêncio ---

[libvirt] [PATCH 0/5] Get rid of "no_memory" labels

2019-12-20 Thread Fabiano Fidêncio
As pointed out by Ján Tomko, "no_memory seems suspicious in the times of abort()". As libvirt decided to take the path to not report OOM and simply abort when it happens, let's get rid of the no_memory labels and simplify the code around them. The two exceptions are: - phyp code, as libvirt may

[libvirt] [PATCH 1/5] conf: Get rid of "no_memory" labels

2019-12-20 Thread Fabiano Fidêncio
As pointed out by Ján Tomko, "no_memory seems suspicious in the times of abort()". As libvirt decided to take the path to not report OOM and simply abort when it happens, let's get rid of the no_memory labels and simplify the code around them. Signed-off-by: Fabiano Fidêncio ---

Re: [libvirt] i want to update the disk driver from ide to virtio, but fail , why ?

2019-12-20 Thread thomas
At 2019-12-20 19:23:59, "thomas" wrote: hi, ALL: my question description as follow: virsh dumpxml root-vsys_v2 > v2.xml , in the v2.xml has the following information: // i want change the 'ide' to 'virtio', but fail so i

[libvirt] i want to update the disk driver from ide to virtio, but fail , why ?

2019-12-20 Thread thomas
hi, ALL: my question description as follow: virsh dumpxml root-vsys_v2 > v2.xml , in the v2.xml has the following information: // i want change the 'ide' to 'virtio', but fail so i create a new xml name v2-new.xml ,it content is:

[libvirt] [PULL 3/3] virtio-blk: fix out-of-bounds access to bitmap in notify_guest_bh

2019-12-20 Thread Stefan Hajnoczi
From: Li Hangjing When the number of a virtio-blk device's virtqueues is larger than BITS_PER_LONG, the out-of-bounds access to bitmap[ ] will occur. Fixes: e21737ab15 ("virtio-blk: multiqueue batch notify") Cc: qemu-sta...@nongnu.org Cc: Stefan Hajnoczi Signed-off-by: Li Hangjing

[libvirt] [PULL 1/3] virtio-blk: deprecate SCSI passthrough

2019-12-20 Thread Stefan Hajnoczi
The Linux virtio_blk.ko guest driver is removing legacy SCSI passthrough support. Deprecate this feature in QEMU too. Signed-off-by: Stefan Hajnoczi Reviewed-by: Paolo Bonzini Reviewed-by: Christoph Hellwig Reviewed-by: Thomas Huth Message-id: 20191213144626.1208237-1-stefa...@redhat.com

[libvirt] [PULL 0/3] Block patches

2019-12-20 Thread Stefan Hajnoczi
The following changes since commit aceeaa69d28e6f08a24395d0aa6915b687d0a681: Merge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2019-12-17' into staging (2019-12-17 15:55:20 +) are available in the Git repository at: https://github.com/stefanha/qemu.git

[libvirt] [PULL 2/3] docs: fix rst syntax errors in unbuilt docs

2019-12-20 Thread Stefan Hajnoczi
The .rst files outside docs/{devel,interop,specs} aren't built yet and therefore a few syntax errors have slipped through. Fix them. Signed-off-by: Stefan Hajnoczi Reviewed-by: Daniel P. Berrangé Message-Id: <2019094411.427174-1-stefa...@redhat.com> Signed-off-by: Stefan Hajnoczi ---

Re: [libvirt] [PATCH] schemas: Allow additional qemu cmd line arguments/env variables and qemuCaps to be interleaved

2019-12-20 Thread Fabiano Fidêncio
On Fri, Dec 20, 2019 at 10:29 AM Michal Privoznik wrote: > > While command line arguments are sort of positional (becasue you becasue -> because > have to have two entries, one for "-arg" the other for "value"), > it doesn't really matter whether env variables come before or > after command

[libvirt] [PATCH] schemas: Allow additional qemu cmd line arguments/env variables and qemuCaps to be interleaved

2019-12-20 Thread Michal Privoznik
While command line arguments are sort of positional (becasue you have to have two entries, one for "-arg" the other for "value"), it doesn't really matter whether env variables come before or after command line arguments. And it matter even less when playing with qemu capabilities.

Re: [libvirt] [PATCH 41/42] admin: Use g_autofree on getSocketPath()

2019-12-20 Thread Fabiano Fidêncio
On Fri, Dec 20, 2019 at 9:14 AM Michal Prívozník wrote: > > On 12/19/19 8:33 PM, Ján Tomko wrote: > > On Thu, Dec 19, 2019 at 05:22:32PM +0100, Fabiano Fidêncio wrote: > >> On Thu, Dec 19, 2019 at 5:14 PM Pavel Hrdina wrote: > >>> > >>> On Thu, Dec 19, 2019 at 11:04:46AM +0100, Fabiano Fidêncio

Re: [libvirt] [PATCH 41/42] admin: Use g_autofree on getSocketPath()

2019-12-20 Thread Michal Prívozník
On 12/19/19 8:33 PM, Ján Tomko wrote: > On Thu, Dec 19, 2019 at 05:22:32PM +0100, Fabiano Fidêncio wrote: >> On Thu, Dec 19, 2019 at 5:14 PM Pavel Hrdina wrote: >>> >>> On Thu, Dec 19, 2019 at 11:04:46AM +0100, Fabiano Fidêncio wrote: >>> > Signed-off-by: Fabiano Fidêncio >>> > --- >>> >