Re: [libvirt] [PATCH 7/7] snapshot: Add VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE_LIST flag

2019-02-20 Thread Eric Blake
On 2/20/19 9:53 AM, Eric Blake wrote: > Continue the work of the previous patch in making it possible > to copy the state of a transient domain with snapshots from one > host to another, by allowing the destination to perform bulk > redefines. Note that the destination still has to do separate > c

[libvirt] domXML modeling question

2019-02-20 Thread Jim Fehlig
There have been a few requests [1][2] to support Xen's max_grant_frames setting in libvirt domXML, but I'm not quite sure how to model it. The documentation [3] on this setting states: Specify the maximum number of grant frames the domain is allowed to have. This value controls how many pages

Re: [libvirt] [PATCH v2 3/3] news: document bhyve msrs feature

2019-02-20 Thread Cole Robinson
On 2/10/19 6:09 AM, Roman Bogorodskiy wrote: > Describe bhyve's ignoring unknown MSRs writes feature > introduced by commit 525918ac5c. > > Signed-off-by: Roman Bogorodskiy > --- > docs/news.xml | 10 ++ > 1 file changed, 10 insertions(+) > > diff --git a/docs/news.xml b/docs/news.xml >

Re: [libvirt] [PATCH v2 2/3] bhyve: implement ignore unknown MSRs feature

2019-02-20 Thread Cole Robinson
On 2/10/19 6:09 AM, Roman Bogorodskiy wrote: > Implement the MSRs ignore unknown reads and writes feature > that's specified using: > > > ... > > ... > > > in the domain XML. > > In bhyve, it's just passing '-w' command line argument to the bhyve(8) > executable. > > Signed-o

Re: [libvirt] [PATCH v2 1/3] conf: introduce 'msrs' feature

2019-02-20 Thread Cole Robinson
On 2/10/19 6:09 AM, Roman Bogorodskiy wrote: > Introduce the 'msrs' feature element that controls Model Specific > Registers related behaviour. At this moment it allows only > single tunable attribute "unknown": > > > > Which tells hypervisor to ignore accesses to unimplemented > Model Specific

Re: [libvirt] [jenkins-ci PATCH] lcitool: Don't import crypt

2019-02-20 Thread Cole Robinson
On 2/14/19 4:39 AM, Andrea Bolognani wrote: > It hasn't been needed since dbe55924f90d, and flake8 rightfully > complains about that. > > Signed-off-by: Andrea Bolognani > --- > guests/lcitool | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/guests/lcitool b/guests/lcitool > index 759eff

[libvirt] libvirt 'make cov' vs gnulib 'make coverage'

2019-02-20 Thread Cole Robinson
Recently I've played with libvirt coverage/gcov/lcov support. The libvirt specific way to enable it is: ./configure --enable-test-coverage make check make cov firefox coverage/index.html However it looks like gnulib provides an automagic way to get similar output. The process is: make

Re: [libvirt] [PATCHv2 2/2] network: add netmask to dhcp range of dnsmasq conf file for IPv4

2019-02-20 Thread John Ferlan
On 2/18/19 6:21 PM, Laine Stump wrote: > dnsmasq documentation says that the *IPv4* prefix/network > address/broadcast address sent to dhcp clients will be automatically > determined by dnsmasq by looking at the interface it's listening on, > so the original libvirt code did not add a netmask to

Re: [libvirt] [PATCH v3 00/17] qemu: virtio-{non-}transitional support

2019-02-20 Thread Cole Robinson
On 2/13/19 3:31 AM, Andrea Bolognani wrote: > On Fri, 2019-02-08 at 17:11 -0500, Cole Robinson wrote: >> v2 libvirt patches: >> https://www.redhat.com/archives/libvir-list/2019-January/msg00877.html >> v1 libvirt patches: >> https://www.redhat.com/archives/libvir-list/2019-January/msg00593.html >>

[libvirt] [PATCH v2 3/6] conf: Clean up some unnecessary goto paths

2019-02-20 Thread John Ferlan
Now that we're using VIR_AUTOPTR(virBitmap) there's a couple of methods that we can clean up some now unnecessary goto paths. Signed-off-by: John Ferlan --- src/conf/domain_conf.c | 26 +- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/src/conf/domain_conf

[libvirt] [PATCH v2 2/6] conf: Use VIR_AUTOPTR(virBitmap) in domain_conf

2019-02-20 Thread John Ferlan
Let's make use of the auto __cleanup capabilities for virBitmapPtr. Signed-off-by: John Ferlan --- src/conf/domain_conf.c | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 542d53e709..f27af65d80 100644

[libvirt] [PATCH v2 1/6] conf: Rework virDomainEmulatorPinDefParseXML

2019-02-20 Thread John Ferlan
In preparation for using auto free mechanism, change to using the VIR_STEAL_PTR on @def to @ret and of course be sure to properly clean up @def in cleanup. Signed-off-by: John Ferlan --- src/conf/domain_conf.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/conf/d

[libvirt] [PATCH v2 4/6] conf: Remove a few unused variables in domain_conf

2019-02-20 Thread John Ferlan
In preparation for VIR_AUTOFREE usage, let's remove a couple of unused variables so that clang compilations won't fail. Signed-off-by: John Ferlan --- src/conf/domain_conf.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c

[libvirt] [PATCH v2 5/6] conf: Use VIR_AUTOFREE in domain_conf

2019-02-20 Thread John Ferlan
Let's make use of the auto __cleanup capabilities for VIR_FREE consumers. In some cases adding or removing blank lines for readability. Signed-off-by: John Ferlan --- src/conf/domain_conf.c | 1080 +--- 1 file changed, 347 insertions(+), 733 deletions(-) diff

[libvirt] [PATCH v2 6/6] conf: Clean up some unnecessary goto paths

2019-02-20 Thread John Ferlan
Now that we're using VIR_AUTOFREE there's quite a bit of clean up possible for now unnecessary goto paths. Signed-off-by: John Ferlan --- src/conf/domain_conf.c | 801 - 1 file changed, 310 insertions(+), 491 deletions(-) diff --git a/src/conf/domain_conf

[libvirt] [PATCH v2 0/6] Alter domain_conf to make use of autofree

2019-02-20 Thread John Ferlan
v1: https://www.redhat.com/archives/libvir-list/2019-February/msg01160.html Changes since v1: * Push patch 1 * Split patch 2 to follow code review guidance: * (Patch1) Pull out virDomainEmulatorPinDefParseXML changes to use VIR_STEAL_PTR * (Patch2) Use VIR_AUTOPTR(virBit

[libvirt] [glib PATCH v2 09/15] po: minimize id ilo is it ja ka kk km kn ko

2019-02-20 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- po/id.mini.po| 20 + po/id.po | 153 --- po/ilo.mini.po | 20 + po/ilo.po| 153 --- po/is.mini.po| 20 + p

[libvirt] [glib PATCH v2 04/15] po: minimize & canonicalize translations stored in git

2019-02-20 Thread Daniel P . Berrangé
Similar to the libvirt-glib.pot, .po files contain line numbers and file names identifying where in the source a translatable string comes from. The source locations in the .po files are thrown away and replaced with content from the libvirt-glib.pot whenever msgmerge is run, so this is not preciou

[libvirt] [glib PATCH v2 14/15] po: minimize uk ur vi wba yo zh_CN zh_HK zh_TW zu

2019-02-20 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- po/{uk.po => uk.mini.po} | 152 +++--- po/ur.mini.po| 20 + po/ur.po | 153 --- po/vi.mini.po| 20 + po/vi.po | 153 -

[libvirt] [glib PATCH v2 01/15] po: provide custom make rules for po file management

2019-02-20 Thread Daniel P . Berrangé
Historically we have relied on intltool to install a standard po/Makefile.in.in which has very limited scope for customization. intltool is deprecated in favour of standard gettextize tools, but these share the same disadvantages. Writing make rules for po file management is no more difficult than

[libvirt] [glib PATCH v2 03/15] po: add rules for integration with zanata

2019-02-20 Thread Daniel P . Berrangé
Add rules to handle pushing libvirt-glib.pot to zanata, and refreshing .po files with new content from zanata. Signed-off-by: Daniel P. Berrangé --- po/Makefile.am | 8 1 file changed, 8 insertions(+) diff --git a/po/Makefile.am b/po/Makefile.am index f2818c7..d66aec7 100644 --- a/po/M

[libvirt] [glib PATCH v2 00/15] po: improve translation handling

2019-02-20 Thread Daniel P . Berrangé
This applies the same improvements previously done in libvirt: https://www.redhat.com/archives/libvir-list/2018-April/msg01004.html https://www.berrange.com/posts/2018/11/29/improved-translation-po-file-handling-by-ditching-gettext-autotools-integration/ The key problems with our current app

[libvirt] [glib PATCH v2 06/15] po: minimize bn bo br brx bs ca cs cy da de_CH

2019-02-20 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- po/bn.mini.po| 20 + po/bn.po | 153 - po/bo.mini.po| 20 + po/bo.po | 153 - po/br.mini.po| 20 + po/br

[libvirt] [glib PATCH v2 08/15] po: minimize fr gl gu he hi hr hu ia

2019-02-20 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- po/{fr.po => fr.mini.po} | 156 +++ po/gl.mini.po| 20 + po/gl.po | 153 -- po/gu.mini.po| 20 + po/gu.po | 153 -

Re: [libvirt] [PATCH 4/4] conf: Use VIR_AUTOFREE in domain_conf

2019-02-20 Thread John Ferlan
On 2/20/19 10:47 AM, Ján Tomko wrote: > On Wed, Feb 20, 2019 at 09:46:59AM -0500, John Ferlan wrote: >> Let's make use of the auto __cleanup capabilities cleaning up any >> now unnecessary goto paths. >> > > At this scale, separating the AUTOFREE conversion and the return values > would really

[libvirt] [PATCH 7/7] snapshot: Add VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE_LIST flag

2019-02-20 Thread Eric Blake
Continue the work of the previous patch in making it possible to copy the state of a transient domain with snapshots from one host to another, by allowing the destination to perform bulk redefines. Note that the destination still has to do separate calls for creating/defining the domain first, and

[libvirt] [PATCH 5/7] domain: Expand virDomainDefFormatInternal with snapshots

2019-02-20 Thread Eric Blake
Make it possible to grab all snapshot XMLs via a single API call, by adding a new internal flag. All callers are adjusted, for now passing NULL and not using the new flag. A new wrapper virDomainDefFormatFull() is added to make it easier for the next patch to add a few callers without having to re

[libvirt] [PATCH 2/7] snapshot: Give virDomainSnapshotDefFormat its own flags

2019-02-20 Thread Eric Blake
virDomainSnapshotDefFormat currently takes two sets of knobs: an 'unsigned int flags' argument that can currently just be VIR_DOMAIN_DEF_FORMAT_SECURE, and an 'int internal' argument used as a bool to determine whether to output an additional element. It then reuses the 'flags' knob to call into v

[libvirt] [PATCH 3/7] snapshot: Refactor virDomainSnapshotDefFormat

2019-02-20 Thread Eric Blake
Split out an internal helper that produces format into a virBuffer, similar to what domain_conf.c does, and making the next patch easier to write. Signed-off-by: Eric Blake --- src/conf/snapshot_conf.c | 103 ++- 1 file changed, 59 insertions(+), 44 deletions(

[libvirt] [PATCH 6/7] domain: Add VIR_DOMAIN_XML_SNAPSHOTS flag

2019-02-20 Thread Eric Blake
Right now, copying the state of a transient domain with snapshots from one host to another requires multiple API calls on both machines - on the host: get the domain XML, get a list of the snapshots, and then for each snapshot get the snapshot's XML; then on the destination: create the domain, then

[libvirt] [PATCH 0/7] bulk snapshot list/redefine (incremental backup saga)

2019-02-20 Thread Eric Blake
While looking at my work on incremental backups, Nir raised a good point: if we want to recreate a set of known checkpoints on one machine that will be taking over a domain from another machine, my initial proposal required making multiple API calls to list the XML for each checkpoint on the source

[libvirt] [PATCH 1/7] domain: Document VIR_DOMAIN_XML_MIGRATABLE

2019-02-20 Thread Eric Blake
Commit 28f8dfdc (1.0.0) added a flag to virDomainGetXMLDesc, but failed to document its effects. And considering that the MIGRATABLE flag has been the source of past bugs (CVE-2014-7823, fixed in commit b1674ad5 (1.2.11), or even cf2d4c60 (1.2.13) where flag mismatch broke virsh edit), make the wo

Re: [libvirt] [PATCH 3/4] conf: Fix XML ctxt swap in virDomainNetDefParseXML

2019-02-20 Thread John Ferlan
On 2/20/19 10:42 AM, Ján Tomko wrote: > On Wed, Feb 20, 2019 at 09:46:58AM -0500, John Ferlan wrote: >> Alter the logic to return @tmpnode to ctxt->node in both the error >> and non-error path when calling virDomainNetIPInfoParseXML. >> > > What is the motivation here? > > On error, ctxt->node

Re: [libvirt] [PATCH 4/4] conf: Use VIR_AUTOFREE in domain_conf

2019-02-20 Thread Ján Tomko
On Wed, Feb 20, 2019 at 09:46:59AM -0500, John Ferlan wrote: Let's make use of the auto __cleanup capabilities cleaning up any now unnecessary goto paths. At this scale, separating the AUTOFREE conversion and the return values would really make this easier to read. Also, this fails compilatio

[libvirt] [PATCH 3/4] util: implement virCgroupV2(Set|Get)CpusetCpus

2019-02-20 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/util/vircgroupv2.c | 24 1 file changed, 24 insertions(+) diff --git a/src/util/vircgroupv2.c b/src/util/vircgroupv2.c index f3aa6ebc48..25afab1cad 100644 --- a/src/util/vircgroupv2.c +++ b/src/util/vircgroupv2.c @@ -1600,6 +1600,28 @@

[libvirt] [PATCH 2/4] util: implement virCgroupV2(Set|Get)CpusetMemoryMigrate

2019-02-20 Thread Pavel Hrdina
Cgroups v2 don't have memory_migrate interface and the migration is enabled by default. Signed-off-by: Pavel Hrdina --- src/util/vircgroupv2.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/src/util/vircgroupv2.c b/src/util/vircgroupv2.c index 4cfbd52f2d..f3aa6ebc48 100

[libvirt] [PATCH 1/4] util: implement virCgroupV2(Set|Get)CpusetMems

2019-02-20 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/util/vircgroupv2.c | 25 + 1 file changed, 25 insertions(+) diff --git a/src/util/vircgroupv2.c b/src/util/vircgroupv2.c index e0fa8e1cc0..4cfbd52f2d 100644 --- a/src/util/vircgroupv2.c +++ b/src/util/vircgroupv2.c @@ -1561,6 +1561,28 @

[libvirt] [PATCH 0/4] implement cgroups v2 cpuset controller support

2019-02-20 Thread Pavel Hrdina
Pavel Hrdina (4): util: implement virCgroupV2(Set|Get)CpusetMems util: implement virCgroupV2(Set|Get)CpusetMemoryMigrate util: implement virCgroupV2(Set|Get)CpusetCpus util: enable cgroups v2 cpuset controller for threads src/util/vircgroupv2.c | 74 +++

[libvirt] [PATCH 3/4] conf: Fix XML ctxt swap in virDomainNetDefParseXML

2019-02-20 Thread John Ferlan
Alter the logic to return @tmpnode to ctxt->node in both the error and non-error path when calling virDomainNetIPInfoParseXML. Signed-off-by: John Ferlan --- src/conf/domain_conf.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain

[libvirt] [PATCH 2/4] conf: Use VIR_AUTOPTR(virBitmap) in domain_conf

2019-02-20 Thread John Ferlan
Let's make use of the auto __cleanup capabilities cleaning up any now unnecessary goto paths. Signed-off-by: John Ferlan --- src/conf/domain_conf.c | 53 -- 1 file changed, 20 insertions(+), 33 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/d

[libvirt] [PATCH 0/4] Alter domain_conf to make use of autofree

2019-02-20 Thread John Ferlan
Adding to the recent hype for autofree... It's more than just saving a few lines - in some cases the code is easier to read too. The last patch is really long - I suppose it could be broken up as could perhaps domain_conf into more easily process-able units. John Ferlan (4): conf: Use VIR_STEAL

[libvirt] [PATCH v4 3/4] util: Move error reporting back to virFileWrapperFdClose()

2019-02-20 Thread Andrea Bolognani
virFileWrapperFdFree(), like all free functions, is supposed to only release allocated resources, so error reporting is better suited for virFileWrapperFdClose(). This reverts commit b0c3e931804a86cd7146db0164ab4843039c410b. Signed-off-by: Andrea Bolognani --- src/util/virfile.c | 8 +++- 1

[libvirt] [PATCH v4 1/4] util: Make it safe to call virFileWrapperFdClose() multiple times

2019-02-20 Thread Andrea Bolognani
We'll want to use this function in the cleanup path soon, and in order to be able to do that we need to make sure we can call it multiple times on the same virFileWrapperFd without side effects. Signed-off-by: Andrea Bolognani --- src/util/virfile.c | 8 +++- 1 file changed, 7 insertions(+),

[libvirt] [PATCH v4 0/4] qemu: Report better error on dump/migrate failure

2019-02-20 Thread Andrea Bolognani
Changes from [v3]: * Make sure errors from virFileWrapperFdClose() result in an overall failure being bubbled up; * don't call virReportError() unless the function is going to report the failure through its return code as well; * revert b0c3e931804a more thoroughly. Changes from [v2]: * Move

Re: [libvirt] [PATCH v2 3/3] testutils: Explicitly name virTestCompare*() arguments

2019-02-20 Thread Ján Tomko
On Wed, Feb 20, 2019 at 02:20:10PM +0100, Michal Privoznik wrote: Currently, some arguments are called strcontent and strsrc, or content and src or some other combination. This makes it impossible to see at the first glance what argument is supposed to represent 'expected' value and which one rep

[libvirt] [PATCH v4 4/4] util: Report error in virFileWrapperFdClose()

2019-02-20 Thread Andrea Bolognani
libvirt_iohelper is used internally by the virFileWrapperFd APIs; more specifically, in the QEMU driver we have the doCoreDump() and qemuDomainSaveMemory() helper functions as users, and those in turn end up being called by the implementation of several driver APIs. By calling virReportError() if

[libvirt] [PATCH v4 2/4] qemu: Always call virFileWrapperFdClose()

2019-02-20 Thread Andrea Bolognani
Right now we're reporting errors in virFileWrapperFdFree(), but that's hardly the appropriate place to do so, as free functions are supposed to do nothing more than release allocated resources. We want to move that code back into virFileWrapperFdClose(), but before we can do that we need to make s

Re: [libvirt] [PATCH v2 2/3] virTestCompareToULL: Rename local variables

2019-02-20 Thread Ján Tomko
On Wed, Feb 20, 2019 at 02:20:09PM +0100, Michal Privoznik wrote: The current naming makes it hard for me to see which holds the expected value and which holds the actual value. Rename them to make it obvious. Signed-off-by: Michal Privoznik --- tests/testutils.c | 10 +- 1 file changed,

Re: [libvirt] [PATCH v2 1/3] virTestCompareToULL: Use VIR_AUTOFREE()

2019-02-20 Thread Ján Tomko
On Wed, Feb 20, 2019 at 02:20:08PM +0100, Michal Privoznik wrote: In order to save a few lines of code, and also since it's hype let's use VIR_AUTOFREE() for the two strings we allocate there. Signed-off-by: Michal Privoznik --- tests/testutils.c | 17 + 1 file changed, 5 inserti

Re: [libvirt] [PATCH v2 2/3] virTestCompareToULL: Rename local variables

2019-02-20 Thread Martin Kletzander
On Wed, Feb 20, 2019 at 02:20:09PM +0100, Michal Privoznik wrote: The current naming makes it hard for me to see which holds the expected value and which holds the actual value. Rename them to make it obvious. Well, the naming was confusing because of the function parameters, so I would mainly

Re: [libvirt] [PATCH v2 3/3] testutils: Explicitly name virTestCompare*() arguments

2019-02-20 Thread Andrea Bolognani
On Wed, 2019-02-20 at 14:20 +0100, Michal Privoznik wrote: [...] > /* > - * @param strcontent: String input content > - * @param filename: File to compare strcontent against > + * @param actual: String input content > + * @param filename: File to compare @actual against > * > - * If @strcontent

Re: [libvirt] [PATCH] testutils: Explicitly name virTestCompare*() arguments

2019-02-20 Thread Andrea Bolognani
On Wed, 2019-02-20 at 14:06 +0100, Michal Privoznik wrote: > On 2/20/19 1:56 PM, Andrea Bolognani wrote: > > There is barely ever a reason *not* to split changes into smaller, > > independent units; having to write "at the same time" in the commit > > message should be your hint that you're doing i

[libvirt] [PATCH v2 1/3] virTestCompareToULL: Use VIR_AUTOFREE()

2019-02-20 Thread Michal Privoznik
In order to save a few lines of code, and also since it's hype let's use VIR_AUTOFREE() for the two strings we allocate there. Signed-off-by: Michal Privoznik --- tests/testutils.c | 17 + 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/tests/testutils.c b/tests/te

[libvirt] [PATCH v2 0/3] Couple of testuitls.c almost trivial fixes

2019-02-20 Thread Michal Privoznik
This is v2 of: https://www.redhat.com/archives/libvir-list/2019-February/msg01077.html diff to v1: - Split one patch into smaller ones - Made myself a new coffee meanwhile Michal Prívozník (3): virTestCompareToULL: Use VIR_AUTOFREE() virTestCompareToULL: Rename local variables testutils: E

[libvirt] [PATCH v2 2/3] virTestCompareToULL: Rename local variables

2019-02-20 Thread Michal Privoznik
The current naming makes it hard for me to see which holds the expected value and which holds the actual value. Rename them to make it obvious. Signed-off-by: Michal Privoznik --- tests/testutils.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/testutils.c b

[libvirt] [PATCH v2 3/3] testutils: Explicitly name virTestCompare*() arguments

2019-02-20 Thread Michal Privoznik
Currently, some arguments are called strcontent and strsrc, or content and src or some other combination. This makes it impossible to see at the first glance what argument is supposed to represent 'expected' value and which one represents 'actual' value. Rename the arguments to make it obvious. Si

Re: [libvirt] [PATCH v3 4/4] util: Report error in virFileWrapperFdClose()

2019-02-20 Thread Daniel P . Berrangé
On Wed, Feb 20, 2019 at 01:34:15PM +0100, Andrea Bolognani wrote: > On Tue, 2019-02-19 at 16:58 +, Daniel P. Berrangé wrote: > > On Tue, Feb 19, 2019 at 05:52:31PM +0100, Andrea Bolognani wrote: > [...] > > > @@ -337,8 +337,12 @@ virFileWrapperFdClose(virFileWrapperFdPtr wfd) > > > > > >

Re: [libvirt] [PATCH v3 4/4] util: Report error in virFileWrapperFdClose()

2019-02-20 Thread Andrea Bolognani
On Tue, 2019-02-19 at 16:58 +, Daniel P. Berrangé wrote: > On Tue, Feb 19, 2019 at 05:52:31PM +0100, Andrea Bolognani wrote: [...] > > @@ -337,8 +337,12 @@ virFileWrapperFdClose(virFileWrapperFdPtr wfd) > > > > ret = virCommandWait(wfd->cmd, NULL); > > > > +/* If the command used t

Re: [libvirt] [PATCH] testutils: Explicitly name virTestCompare*() arguments

2019-02-20 Thread John Ferlan
On 2/20/19 2:37 AM, Michal Privoznik wrote: > On 2/19/19 9:19 PM, John Ferlan wrote: >> Assuming extraction (sigh) of the VIR_AUTOFREE, >> >> Reviewed-by: John Ferlan >> > > While I'd definitely want this to be split into two patches if it was > fixing something under src/, but this is under te

Re: [libvirt] [PATCH v3 3/4] util: Move error reporting back to virFileWrapperFdClose()

2019-02-20 Thread Andrea Bolognani
On Tue, 2019-02-19 at 16:59 +, Daniel P. Berrangé wrote: > On Tue, Feb 19, 2019 at 05:52:30PM +0100, Andrea Bolognani wrote: > > virFileWrapperFdFree(), like all free functions, is supposed > > to only release allocated resources, so error reporting is > > better suited for virFileWrapperFdClos

Re: [libvirt] [PATCH v3 2/4] qemu: Always call virFileWrapperFdClose()

2019-02-20 Thread Daniel P . Berrangé
On Wed, Feb 20, 2019 at 01:16:34PM +0100, Andrea Bolognani wrote: > On Tue, 2019-02-19 at 17:01 +, Daniel P. Berrangé wrote: > > On Tue, Feb 19, 2019 at 05:52:29PM +0100, Andrea Bolognani wrote: > [...] > > > @@ -3231,6 +3231,7 @@ qemuDomainSaveMemory(virQEMUDriverPtr driver, > > > > > > cl

Re: [libvirt] [PATCH v3 2/4] qemu: Always call virFileWrapperFdClose()

2019-02-20 Thread Andrea Bolognani
On Tue, 2019-02-19 at 17:01 +, Daniel P. Berrangé wrote: > On Tue, Feb 19, 2019 at 05:52:29PM +0100, Andrea Bolognani wrote: [...] > > @@ -3231,6 +3231,7 @@ qemuDomainSaveMemory(virQEMUDriverPtr driver, > > > > cleanup: > > VIR_FORCE_CLOSE(fd); > > +qemuFileWrapperFDClose(vm, wrapp

[libvirt] [glib PATCH 09/15] po: minimize id ilo is it ja ka kk km kn ko

2019-02-20 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- po/id.mini.po| 20 + po/id.po | 153 --- po/ilo.mini.po | 20 + po/ilo.po| 153 --- po/is.mini.po| 20 + p

[libvirt] [glib PATCH 02/15] po: remove language list from zanata configuration

2019-02-20 Thread Daniel P . Berrangé
The element in zanata.xml is no longer relevant as this info is recorded server side. Signed-off-by: Daniel P. Berrangé --- po/zanata.xml | 99 --- 1 file changed, 99 deletions(-) diff --git a/po/zanata.xml b/po/zanata.xml index 70cc22a..042c695

[libvirt] [glib PATCH 05/15] po: minimize af am anp ar as ast bal be bg bn_IN

2019-02-20 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- po/af.mini.po| 20 ++ po/af.po | 153 -- po/am.mini.po| 20 ++ po/am.po | 153 -- po/anp.mini.po | 19 ++ po/anp.po| 152 -

[libvirt] [glib PATCH 13/15] po: minimize sq sr@latin sr sv ta te tg th tr tw

2019-02-20 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- po/sq.mini.po | 20 ++ po/sq.po| 153 --- po/sr.mini.po | 21 ++ po/sr.po| 154 po/s...@latin.mini.po | 21 ++ po/s...@lati

[libvirt] [glib PATCH 00/15] po: improve translation handling

2019-02-20 Thread Daniel P . Berrangé
This applies the same improvements previously done in libvirt: https://www.redhat.com/archives/libvir-list/2018-April/msg01004.html https://www.berrange.com/posts/2018/11/29/improved-translation-po-file-handling-by-ditching-gettext-autotools-integration/ The key problems with our current app

[libvirt] [glib PATCH 03/15] po: add rules for integration with zanata

2019-02-20 Thread Daniel P . Berrangé
Add rules to handle pushing libvirt-glib.pot to zanata, and refreshing .po files with new content from zanata. Signed-off-by: Daniel P. Berrangé --- po/Makefile.am | 8 1 file changed, 8 insertions(+) diff --git a/po/Makefile.am b/po/Makefile.am index 279fc47..d37014b 100644 --- a/po/M

[libvirt] [glib PATCH 14/15] po: minimize uk ur vi wba yo zh_CN zh_HK zh_TW zu

2019-02-20 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- po/{uk.po => uk.mini.po} | 152 +++--- po/ur.mini.po| 20 + po/ur.po | 153 --- po/vi.mini.po| 20 + po/vi.po | 153 -

[libvirt] [glib PATCH 08/15] po: minimize fr gl gu he hi hr hu ia

2019-02-20 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- po/{fr.po => fr.mini.po} | 156 +++ po/gl.mini.po| 20 + po/gl.po | 153 -- po/gu.mini.po| 20 + po/gu.po | 153 -

[libvirt] [glib PATCH 11/15] po: minimize mn mr ms nb nds ne nl nn nso

2019-02-20 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- po/mn.mini.po | 20 +++ po/mn.po | 153 - po/mr.mini.po | 20 +++ po/mr.po | 153 - po/ms.mini.po | 20 +++ po/ms.po | 153

[libvirt] [glib PATCH 01/15] po: provide custom make rules for po file management

2019-02-20 Thread Daniel P . Berrangé
Historically we have relied on intltool to install a standard po/Makefile.in.in which has very limited scope for customization. intltool is deprecated in favour of standard gettextize tools, but these share the same disadvantages. Writing make rules for po file management is no more difficult than

[libvirt] [glib PATCH 07/15] po: minimize de el en_GB eo es et eu fa fi

2019-02-20 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- po/de.mini.po | 20 + po/de.po | 153 po/el.mini.po | 20 + po/el.po | 153 po/{en_GB.po => en_GB.mini.po

[libvirt] [glib PATCH 12/15] po: minimize or pa pl pt_BR pt ro ru si sk sl

2019-02-20 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- po/or.mini.po | 20 + po/or.po | 153 po/pa.mini.po | 20 + po/pa.po | 153 po/{pl.po => pl.mini.po}

[libvirt] [glib PATCH 06/15] po: minimize bn bo br brx bs ca cs cy da de_CH

2019-02-20 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- po/bn.mini.po| 20 + po/bn.po | 153 - po/bo.mini.po| 20 + po/bo.po | 153 - po/br.mini.po| 20 + po/br

[libvirt] [libvirt-php] [PATCH 1/1] Add function libvirt_domain_undefine_flags and libvirt_domain_snapshot_create_xml

2019-02-20 Thread Zhensheng Yuan
Hi, I created a patch for libvirt-php to support virDomainUndefineFlags and create snapshot from XML string. The test case file is "examples/domain_undefine_flags_and_snapshot_create_xml_test_case.php". Hoping this is useful for libvirt-php. >From e753d0014e8ce8cbcafb0fbd92159a6cc9f32168 Mon Se

[libvirt] [PATCH 0/2] udev: Remove udev handle from main loop when udev thread stops

2019-02-20 Thread Marc Hartmayer
Changelog: + RFC -> v1: - Remove the event handle in the error path of nodeStateInitializeEnumerate - Added patch 2: wake up udev thread in case of an error Marc Hartmayer (2): udev: nodeStateInitializeEnumerate: remove watch handle in case of an error udev: wake up the udev thread fo

[libvirt] [PATCH 1/2] udev: nodeStateInitializeEnumerate: remove watch handle in case of an error

2019-02-20 Thread Marc Hartmayer
If the udev thread is stopped, it must be ensured that the watch handle is also removed from the main loop. Signed-off-by: Marc Hartmayer --- src/node_device/node_device_udev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device

[libvirt] [PATCH 2/2] udev: wake up the udev thread for stopping it

2019-02-20 Thread Marc Hartmayer
Signal the udev thread the change of `priv->threadQuit` by using the thread condition. Signed-off-by: Marc Hartmayer --- src/node_device/node_device_udev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c index 4dd2e9004

Re: [libvirt] [RFC PATCH] udev: Remove udev handle from main loop when udev thread stops

2019-02-20 Thread Marc Hartmayer
On Tue, Feb 12, 2019 at 09:46 PM +0100, John Ferlan wrote: > On 2/7/19 11:08 AM, Marc Hartmayer wrote: >> Commit "nodedev: Move device enumumeration out of nodeStateInitialize" >> (9f0ae0b18e3e620) has moved the heavy task of device enumeration into >> a separate thread. The problem with this comm

[libvirt] [PATCH 2/2] qemu: Replace virDomainChrSourceDefFree with virObjectUnref

2019-02-20 Thread Marc Hartmayer
Replace virDomainChrSourceDefFree with virObjectUnref. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- cfg.mk| 1 - src/conf/domain_conf.c| 17 + src/conf/domain_conf.h| 1 - src/libvirt_private.syms | 1 - src/qemu

[libvirt] [PATCH 0/2] Get rid of virDomainChrSourceDefFree

2019-02-20 Thread Marc Hartmayer
Marc Hartmayer (2): qemu: Use refcounting for priv->monConfig qemu: Replace virDomainChrSourceDefFree with virObjectUnref cfg.mk| 1 - src/conf/domain_conf.c| 17 + src/conf/domain_conf.h| 1 - src/libvirt_private.syms | 1 - src