[libvirt] about support quorum and replication in libvirt

2017-07-26 Thread wang.guang55
hi we wiill use quorum and replication in qemu. but we found that libvirt does not support quorum and replication in xml. so we want submit some patches for supporting quorum and replication in xml. how about it??.-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mai

Re: [libvirt] Plans for next release

2017-07-26 Thread Daniel Veillard
On Wed, Jul 26, 2017 at 10:15:37PM +0200, Peter Krempa wrote: > On Tue, Jul 25, 2017 at 23:47:12 +0800, Daniel Veillard wrote: > > The end of the month is next week, so if we want to release around > > Aug 1st, I think we should enter freeze on Thursday morning, then > > I could make rc2 on Satur

[libvirt] question about support quorum and replication in libvirt

2017-07-26 Thread wang.guang55
hl we wiill use quorum and replication in qemu. but we found that libvirt does not support quorum and replication . so we want submit some patches for supporing quorum and replication how about it??.-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libv

Re: [libvirt] [PATCH 0/3] libxl: Add a test suite for libxl_domain_config generator

2017-07-26 Thread Marek Marczykowski-Górecki
On Fri, Jul 14, 2017 at 05:59:57PM -0600, Jim Fehlig wrote: > On 07/01/2017 08:16 PM, Marek Marczykowski-Górecki wrote: > > On Sun, Feb 26, 2017 at 07:02:24PM -0700, Jim Fehlig wrote: > > > Long ago danpb posted some patches to test libvirt domXML to > > > libxl_domain_config conversion > > > > >

[libvirt] status of support for cache allocation technology?

2017-07-26 Thread Chris Friesen
Hi, I'm just wondering what the current status is about exposing/controlling cache banks. Looking at the code, it appears that we report the banks as part of "virsh capabilities". Is it possible to associate a particular bank with a particular domain, or has that not yet merged? Is the "[P

Re: [libvirt] [PATCH 00/24] qemu: refactor node name detection

2017-07-26 Thread Eric Blake
On 07/26/2017 05:00 AM, Peter Krempa wrote: > Since query-blockstats provides full hierarchy of node names without any > doubtful > matching algorithm, use it to make the node name detector reliable. > > Unfortunately some of the changes are ugly when viewed as a diff since they > delete and rewr

Re: [libvirt] [PATCH 24/24] tests: qemumonitorjson: Test extraction of iSCSI device node names

2017-07-26 Thread Eric Blake
On 07/26/2017 05:00 AM, Peter Krempa wrote: > --- > .../qemumonitorjson-nodename-iscsi-blockstats.json | 113 > ...qemumonitorjson-nodename-iscsi-named-nodes.json | 114 > + > .../qemumonitorjson-nodename-iscsi.result | 13 +++ > tests/qemumonito

Re: [libvirt] [PATCH 23/24] tests: qemumonitorjson: Test extraction of LUKS node names

2017-07-26 Thread Eric Blake
On 07/26/2017 05:00 AM, Peter Krempa wrote: > --- > .../qemumonitorjson-nodename-luks-blockstats.json | 58 +++ > .../qemumonitorjson-nodename-luks-named-nodes.json | 109 > + > .../qemumonitorjson-nodename-luks.result | 6 ++ > tests/qemumonitorjsontest.

Re: [libvirt] [PATCH 22/24] tests: qemumonitorjson: Old and empty test case for node name detection

2017-07-26 Thread Eric Blake
On 07/26/2017 05:00 AM, Peter Krempa wrote: > Prior to qemu 2.5 the node names would not be generated, thus would be > missing from 'query-blockstats' and 'query-named-block-nodes'. Test that > the code correctly detects nothing. > > Additionally make sure that a VM without disks does not cause pr

Re: [libvirt] [PATCH 21/24] tests: qemumonitorjson: Add test case for node name detection with blockjob

2017-07-26 Thread Eric Blake
On 07/26/2017 05:00 AM, Peter Krempa wrote: > qemu 2.9 returns an extra layer in the backing data if a block job is > active. Add a test case to see whether our code properly detects and > ignores such layer. > --- > ...mumonitorjson-nodename-blockjob-blockstats.json | 301 + > ...umonitor

Re: [libvirt] [PATCH 20/24] tests: qemumonitorjson: Fix 'gluster' node name detection test case

2017-07-26 Thread Eric Blake
On 07/26/2017 05:00 AM, Peter Krempa wrote: > Add the blockstats data and fix the expected output. > --- > ...emumonitorjson-nodename-gluster-blockstats.json | 111 > + > ...mumonitorjson-nodename-gluster-named-nodes.json | 90 - > .../qemumonitorjson-nodename

Re: [libvirt] [PATCH 19/24] tests: qemumonitorjson: Fix 'relative' node name detection test case

2017-07-26 Thread Eric Blake
On 07/26/2017 05:00 AM, Peter Krempa wrote: > Add the blockstats data and fix the expected output. > --- > ...mumonitorjson-nodename-relative-blockstats.json | 329 > + > ...umonitorjson-nodename-relative-named-nodes.json | 26 +- > .../qemumonitorjson-nodename-relative.resul

Re: [libvirt] [PATCH 18/24] tests: qemumonitorjson: Add data and fix 'same-backing' node detection case

2017-07-26 Thread Eric Blake
On 07/26/2017 05:00 AM, Peter Krempa wrote: > With the new approach we are actually able to correctly detect node > names for the two instances of the same backing file. > --- > ...nitorjson-nodename-same-backing-blockstats.json | 221 > + > ...itorjson-nodename-same-backing-n

Re: [libvirt] [PATCH 17/24] qemu: block: store and test driver names for detected storage nodes

2017-07-26 Thread Eric Blake
On 07/26/2017 05:00 AM, Peter Krempa wrote: > Store the 'drv' field both for the storage node and for the format node > and format them in the test case. > --- > src/qemu/qemu_block.c | 14 > +++--- > src/qemu/qemu_block.h

Re: [libvirt] [PATCH 16/24] tests: qemumonitorjson: Simplify node name detection test

2017-07-26 Thread Eric Blake
On 07/26/2017 05:00 AM, Peter Krempa wrote: > We can now iterate the hash table and print all detected backing chains. > This simplifies calling of the test cases. > --- > .../qemumonitorjson-nodename-basic.result | 1 + > tests/qemumonitorjsontest.c| 55 > ++

Re: [libvirt] [PATCH 15/24] tests: Extract mock library for making hash table deterministic

2017-07-26 Thread Eric Blake
On 07/26/2017 05:00 AM, Peter Krempa wrote: > virHashNew calls virRandomBits to initialize seed for the hashing > function. If a test uses iteration through the hash table to produce > results they may/will be non-deterministic. Extract the mock library > which was used for mac address mapping to b

Re: [libvirt] [PATCH 14/24] qemu: block: Refactor node name detection code

2017-07-26 Thread Eric Blake
On 07/26/2017 05:00 AM, Peter Krempa wrote: > Remove the complex and unreliable code which inferred the node name > hierarchy only from data returned by 'query-named-block-nodes'. It turns > out that query-blockstats contain the full hierarchy of nodes as > perceived by qemu so the inference code i

[libvirt] [PATCH v4] qemu: Check for existence of provided *_tls_x509_cert_dir

2017-07-26 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1458630 Introduce virQEMUDriverConfigTLSDirResetDefaults in order to check if the defaultTLSx509certdir was changed, then change the default for any other *TLSx509certdir that was not set to the default default. Introduce virQEMUDriverConfigValidate to

Re: [libvirt] [PATCH 13/24] util: storagefile: rename 'nodebacking' to 'nodestorage' in virStorageSource

2017-07-26 Thread Eric Blake
On 07/26/2017 05:00 AM, Peter Krempa wrote: > Make it less confusing by naming the field which refers to the storage > object as 'nodestorage'. > --- > src/qemu/qemu_block.c | 10 +- > src/qemu/qemu_driver.c| 10 +- > src/util/virstoragefile.c | 6 +++--- > src/util/virsto

Re: [libvirt] [PATCH 12/24] qemu: block: Rename qemuBlockFillNodeData and move it to the top

2017-07-26 Thread Eric Blake
On 07/26/2017 05:00 AM, Peter Krempa wrote: > The same operation will become useful in other places so rename the > function to be more generic and move it to the top so that it can be > reused earlier in the file. > --- > src/qemu/qemu_block.c | 38 +++--- > 1 file

Re: [libvirt] Plans for next release

2017-07-26 Thread Peter Krempa
On Tue, Jul 25, 2017 at 23:47:12 +0800, Daniel Veillard wrote: > The end of the month is next week, so if we want to release around > Aug 1st, I think we should enter freeze on Thursday morning, then > I could make rc2 on Saturday and we could have the release on the Tuesday > or Wed. > Usually

[libvirt] [PATCH RFC 1/2] make: Drop building without driver modules

2017-07-26 Thread Peter Krempa
Driver modules proved to be reliable for a long time. Since support for not building modules complicates the code and makefiles drop the support for not building drivers as modules. --- Notes: This was suggested a while ago by Dan: https://www.redhat.com/archives/libvir-list/2017-Marc

[libvirt] [PATCH 0/2] Resolve linking issue of storage driver to apparmor helper

2017-07-26 Thread Peter Krempa
Also drop support for building without loadable modules. Peter Krempa (2): make: Drop building without driver modules security: apparmor: load the storage driver dynamically daemon/Makefile.am| 57 --- daemon/libvirtd.c | 54 +- m4/virt-drive

[libvirt] [PATCH 2/2] security: apparmor: load the storage driver dynamically

2017-07-26 Thread Peter Krempa
In commit 5e515b542d I've attempted to fix the inability to access storage from the apparmor helper program by linking with the storage driver. By linking with the .so the linker complains that it's not portable. Fix this by loading the module dynamically as we are supposed to do. --- Notes: T

[libvirt] [PATCH 06/12] docs: remove use of — entity

2017-07-26 Thread Daniel P. Berrange
A handful of places in the docs choose to use — instead of '-' for no clear reason. Remove this inconsistency. Signed-off-by: Daniel P. Berrange --- docs/formatdomain.html.in | 34 +- docs/formatnetwork.html.in | 2 +- 2 files changed, 18 insertions(+), 18 delet

[libvirt] [PATCH 12/12] docs: add full set of "favicon" files to support modern clients

2017-07-26 Thread Daniel P. Berrange
Use of the relation "shortcut" for a favicon was an Internet Explorer only feature. Other browsers just require "icon". The new icons & metadata are generated using https://realfavicongenerator.net/ which is user tested to work well across all modern clients Signed-off-by: Daniel P. Berrange

[libvirt] [PATCH 04/12] docs: fix typo s/∧/&/

2017-07-26 Thread Daniel P. Berrange
Signed-off-by: Daniel P. Berrange --- docs/hooks.html.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hooks.html.in b/docs/hooks.html.in index 7a04ac198..6cc47a6c5 100644 --- a/docs/hooks.html.in +++ b/docs/hooks.html.in @@ -289,7 +289,7 @@ Since 1.2.2, before a

[libvirt] [PATCH 09/12] docs: generate pretty indented HTML for API docs

2017-07-26 Thread Daniel P. Berrange
Signed-off-by: Daniel P. Berrange --- docs/newapi.xsl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/newapi.xsl b/docs/newapi.xsl index a55736d32..a2f0e0714 100644 --- a/docs/newapi.xsl +++ b/docs/newapi.xsl @@ -814,6 +814,7 @@ @@ -828,6 +829,7 @@

[libvirt] [PATCH 11/12] docs: explicitly declare pages as being UTF-8 format

2017-07-26 Thread Daniel P. Berrange
Signed-off-by: Daniel P. Berrange --- docs/page.xsl | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/page.xsl b/docs/page.xsl index 4d49be085..d9be66b93 100644 --- a/docs/page.xsl +++ b/docs/page.xsl @@ -83,6 +83,7 @@ Do not edit this file. Changes will be lost. +

[libvirt] [PATCH 03/12] docs: make xmllint & xsltproc compulsory

2017-07-26 Thread Daniel P. Berrange
We already require libxml to be installed, so it is not unreasonable to require xmllint and xsltproc to be installed too - any platform with the former will have the latter too. Signed-off-by: Daniel P. Berrange --- docs/Makefile.am | 44 +++-

[libvirt] [PATCH 02/12] docs: drop XHTML 1.0 validation of website

2017-07-26 Thread Daniel P. Berrange
The HTML pages are currently validated against an XHTML 1.0 DTD. This makes it impossible to take advantage of features that are introduced in HTML 5, because they'll fail validation. There is intentionally no DTD defined for HTML 5, so there's no alternative to XHTML 1.0 DTD that we could switch

[libvirt] [PATCH 07/12] docs: use UTF-8 instead of HTML entities for decorated letters

2017-07-26 Thread Daniel P. Berrange
We have files which use HTML entities for decorating letters with unlauts, accents, etc. Other files just use UTF-8 characters directly for this. Remove the HTML entities since they have no benefit and use UTF-8 instead. Signed-off-by: Daniel P. Berrange --- docs/apps.html.in | 2 +- docs/csha

[libvirt] [PATCH 10/12] docs: remove bogus 'shape' attribute on links

2017-07-26 Thread Daniel P. Berrange
The 'shape' attribute on is used together with a 'coords' attribute to create hot-zones in image maps. We're not using image maps so our inclusion of a 'shape' attribute is bogus. Furthermore this is forbidden in HTML5. Signed-off-by: Daniel P. Berrange --- docs/apps.html.in | 4 ++-- doc

[libvirt] [PATCH 05/12] docs: remove use of   in docs

2017-07-26 Thread Daniel P. Berrange
Some docs pages were using   to add arbitrary whitespace in the page. This is something that should be done by CSS if needed, but it is not needed here, so delete it. There was also use of   which adds no value at all when we have CSS to prettify tables. Signed-off-by: Daniel P. Berrange --- do

[libvirt] [PATCH 00/12] Cleanup website generation & add favicons

2017-07-26 Thread Daniel P. Berrange
This started as an attempt to add modern favicon support to the website. This requires use of HTML5 only syntax, which lead to the massive cleanup to stop using XHTML 1.0, which forms all of this series except the last patch Daniel P. Berrange (12): docs: switch to using 'id' attribute instead o

Re: [libvirt] [RFC]Add new mdev interface for QoS

2017-07-26 Thread Alex Williamson
[cc +libvir-list] On Wed, 26 Jul 2017 21:16:59 +0800 "Gao, Ping A" wrote: > The vfio-mdev provide the capability to let different guest share the > same physical device through mediate sharing, as result it bring a > requirement about how to control the device sharing, we need a QoS > related in

Re: [libvirt] [PATCH 2/2] conf: Introduce the virDomainNetModel enumeration

2017-07-26 Thread Peter Krempa
On Wed, Jul 26, 2017 at 14:20:05 +0200, Andrea Bolognani wrote: > Up until now, we have stored the model name for network > interfaces as raw strings in virDomainNetDef: this is > suboptimal for a number of reasons, such as having to > perform relatively expensive string allocations and > compariso

Re: [libvirt] [PATCH 11/24] tests: qemumontitorjson: temporarily disable node name detection tests

2017-07-26 Thread Eric Blake
On 07/26/2017 05:00 AM, Peter Krempa wrote: > To simplify the refactoring patches disable the tests. This will allow > to add test data later. s/to add/adding/ ("allow to VERB" is not idiomatic English; it's either "allow WHO to VERB", or the shorter "allow VERBing") > --- > tests/qemumonitorjso

Re: [libvirt] [PATCH 10/24] tests: qemumonitorjson: simplify path handling in testBlockNodeNameDetect

2017-07-26 Thread Eric Blake
On 07/26/2017 05:00 AM, Peter Krempa wrote: > Extract the test prefix path into a variable and reuse > virTestLoadFileJSON to load the sample json files rather than doing it > manually. > --- > tests/qemumonitorjsontest.c | 19 +-- > 1 file changed, 5 insertions(+), 14 deletions(-)

[libvirt] [PATCH] build: Distribute tests/{qemucpumock.c, testutilshostcpus.h}

2017-07-26 Thread Martin Kletzander
Missed by 13554a9e7f4e. Signed-off-by: Martin Kletzander --- Pushed under the build-breaker rule. tests/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index 562c1c77178e..11a380163177 100644 --- a/tests/Makefile.am +++ b

Re: [libvirt] [PATCH 07/24] tests: utils: Add virTestLoadFilePath helper

2017-07-26 Thread Eric Blake
On 07/26/2017 08:39 AM, Eric Blake wrote: > On 07/26/2017 05:00 AM, Peter Krempa wrote: >> This new helper loads and returns a file from 'abs_srcdir'. By using >> variable arguments for the function, it's not necessary to format the >> path separately in the test cases. >> --- >> tests/testutils.c

Re: [libvirt] [PATCH 09/24] tests: utils: Add virTestLoadFileJSON helper

2017-07-26 Thread Eric Blake
On 07/26/2017 05:00 AM, Peter Krempa wrote: > This new helper loads, parses and returns a JSON file from 'abs_srcdir' > By using variable arguments for the function, it's not necessary to > format the path separately in the test cases. > --- > tests/testutils.c | 34 +++

Re: [libvirt] [PATCH 15/16] network: Modify naming for virNetworkObjList* fetching APIs

2017-07-26 Thread Pavel Hrdina
On Wed, Jul 26, 2017 at 10:57:30AM -0400, John Ferlan wrote: > > > On 07/24/2017 07:49 AM, Pavel Hrdina wrote: > > On Fri, May 19, 2017 at 09:03:23AM -0400, John Ferlan wrote: > >> Use the structure names in the @data setup - makes it easier that going > >> back to find the struct. > >> > >> Use

Re: [libvirt] [PATCH] docs: Add build timestamps to generated html/php pages

2017-07-26 Thread Daniel P. Berrange
On Wed, Jul 26, 2017 at 05:13:08PM +0200, Martin Kletzander wrote: > In order not to make the build even less reproducible, honour > SOURCE_DATE_EPOCH environment variable as specified: > > https://reproducible-builds.org/specs/source-date-epoch/ > > Signed-off-by: Martin Kletzander > --- > d

[libvirt] [PATCH] docs: Add build timestamps to generated html/php pages

2017-07-26 Thread Martin Kletzander
In order not to make the build even less reproducible, honour SOURCE_DATE_EPOCH environment variable as specified: https://reproducible-builds.org/specs/source-date-epoch/ Signed-off-by: Martin Kletzander --- docs/Makefile.am | 13 + docs/newapi.xsl | 2 ++ docs/page.xsl| 4

[libvirt] [PATCH v2 20/20] network: Privatize virNetworkObj

2017-07-26 Thread John Ferlan
Move from virnetworkobj.h into virnetworkobj.c Signed-off-by: John Ferlan --- src/conf/virnetworkobj.c | 21 + src/conf/virnetworkobj.h | 20 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/src/conf/virnetworkobj.c b/src/conf/virnetworkob

[libvirt] [PATCH v2 17/20] network: Use @maxnames instead of @nnames

2017-07-26 Thread John Ferlan
To be consistent with the API definition, use the @maxnames instead of @nnames when describing/comparing against the maximum names to be provided for the *ConnectList[Defined]Networks APIs. Signed-off-by: John Ferlan --- src/conf/virnetworkobj.c| 10 +- src/conf/virnetworkobj.h|

[libvirt] [PATCH v2 18/20] network: Rename @filter to @aclfilter

2017-07-26 Thread John Ferlan
Rename the virNetworkObjListFilter to be virNetworkObjListACLFilter since that's more representative of what it is. Also modify the variable @filter to be @aclfilter. In the future adding the ability to describe a generic @filter routine for the Export functions could be a useful thing. Signed-off

[libvirt] [PATCH v2 14/20] network: Consistent use of @obj for virnetworkobj

2017-07-26 Thread John Ferlan
Consistently use @obj for a virNetworkObjPtr. Signed-off-by: John Ferlan --- src/conf/virnetworkobj.c | 333 +++ 1 file changed, 166 insertions(+), 167 deletions(-) diff --git a/src/conf/virnetworkobj.c b/src/conf/virnetworkobj.c index 37b76e5..edea6f

[libvirt] [PATCH v2 16/20] network: Move virObjectRef during AssignDef processing

2017-07-26 Thread John Ferlan
Move the virObjectRef in virNetworkObjAssignDefLocked to after the virHashAddEntry to make it "clearer" why the @ref is being incremented. Upon return from the ObjNew we will have 1 ref on the object already, adding it to the hash table requires the increment. Signed-off-by: John Ferlan --- src/

[libvirt] [PATCH v2 19/20] network: Modify naming for virNetworkObjList* fetching APIs

2017-07-26 Thread John Ferlan
Use the structure names in the @data setup - makes it easier than going back to find the struct fields to make sure the order of the data is correct. Signed-off-by: John Ferlan --- src/conf/virnetworkobj.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/conf

[libvirt] [PATCH v2 13/20] network: Introduce virNetworkObjIsPersistent

2017-07-26 Thread John Ferlan
In preparation to privatize the virNetworkObj - create an accessor function to get the current @persistent value. Also change the value to a bool rather than an unsigned int (since that's how it's generated anyway). Signed-off-by: John Ferlan --- src/conf/virnetworkobj.c| 7 +++ src/con

[libvirt] [PATCH v2 12/20] network: Introduce virNetworkObj{Is|Set}Active

2017-07-26 Thread John Ferlan
In order to privatize the virNetworkObj create accessors in virnetworkobj in order to handle the get/set of the active value. Also rather than an unsigned int, convert it to a boolean to match other drivers representation and the reality of what it is. Signed-off-by: John Ferlan --- src/conf/vi

[libvirt] [PATCH v2 15/20] network: Have virNetworkObjNew lock the returned object

2017-07-26 Thread John Ferlan
Forces callers to use the virNetworkObjEndAPI properly. Signed-off-by: John Ferlan --- src/conf/virnetworkobj.c| 4 ++-- tests/networkxml2conftest.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/conf/virnetworkobj.c b/src/conf/virnetworkobj.c index edea6f5..03718

[libvirt] [PATCH v2 11/20] network: Introduce virNetworkObj{Get|Set}Autostart

2017-07-26 Thread John Ferlan
In preparation for privatizing the virNetworkObj structure, create accessors for the obj->autostart. Signed-off-by: John Ferlan --- src/conf/virnetworkobj.c| 15 +++ src/conf/virnetworkobj.h| 9 - src/libvirt_private.syms| 2 ++ src/network/bridge_driver.c | 20

[libvirt] [PATCH v2 07/20] network: Alter virNetworkObj @class_id to be @classIdMap

2017-07-26 Thread John Ferlan
Change the variable name to be a bit more descriptive and less confusing when used with the data.network.actual->class_id. Signed-off-by: John Ferlan --- src/conf/virnetworkobj.c| 39 --- src/conf/virnetworkobj.h| 2 +- src/network/bridge_driver.c | 1

[libvirt] [PATCH v2 10/20] network: Add virNetworkObj Get/Set API's for @def and @newDef

2017-07-26 Thread John Ferlan
In preparation for making the object private, create a couple of API's to get the obj->def & obj->newDef and set the obj->def. While altering networkxml2conftest.c to use the virNetworkObjSetDef API, fix the name of the variable from @dev to @def Signed-off-by: John Ferlan --- src/conf/virnetwo

[libvirt] [PATCH v2 00/20] Make the virNetworkObjPtr private

2017-07-26 Thread John Ferlan
v1: https://www.redhat.com/archives/libvir-list/2017-May/msg00701.html (but reviewed much more recently) NOTE from v1: Patches 1-3 already pushed Former patch 4: * Patch 1 (NEW) - splits out the formatting change in bridge_driver.h * Patch 2 - Remainder of the change for consistent naming NB:

[libvirt] [PATCH v2 04/20] network: Move macmap mgmt from bridge_driver to virnetworkobj

2017-07-26 Thread John Ferlan
In preparation for having a private virNetworkObj - let's create/move some API's that handle the obj->macmap. The API's will be renamed to have a virNetworkObj prefix to follow conventions and the arguments slightly modified to accept what's necessary to complete their task. Signed-off-by: John Fe

[libvirt] [PATCH v2 01/20] network: Perform some formatting cleanup in bridge_driver.h

2017-07-26 Thread John Ferlan
Alter prototypes to utilize some more recent guidelines. Signed-off-by: John Ferlan --- src/network/bridge_driver.h | 50 - 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/src/network/bridge_driver.h b/src/network/bridge_driver.h index

[libvirt] [PATCH v2 03/20] network: Move and rename networkMacMgrFileName

2017-07-26 Thread John Ferlan
Move networkMacMgrFileName into src/util/virmacmap.c and rename to virMacMapFileName. We're about to move some more MacMgr processing files into virnetworkobj and it doesn't make sense to have this helper in the driver or in virnetworkobj. Signed-off-by: John Ferlan --- src/libvirt_private.syms

[libvirt] [PATCH v2 05/20] network: Unconditionally initialize macmap when stopping virtual network

2017-07-26 Thread John Ferlan
Since we can only ever have one reference to obj->macmap, rather than only clearing obj->macmap during virNetworkObjUnrefMacMap (e.g. virtual network from networkShutdownNetwork), let's just unconditionally clear the obj->macmap to ensure that some future change that created it's own reference to o

[libvirt] [PATCH v2 06/20] network: Add virNetworkObj Get/Set API's for @dnsmasqPid and @radvdPid

2017-07-26 Thread John Ferlan
In preparation for making the object private, create/use a couple of API's to get/set the obj->dnsmasqPid and obj->radvdPid. NB: Since the pid's can sometimes changed based on intervening functions, be sure to always fetch the latest value. Signed-off-by: John Ferlan --- src/conf/virnetworkobj.

[libvirt] [PATCH v2 02/20] network: Use consistent naming in bridge_driver for virNetwork objects

2017-07-26 Thread John Ferlan
Use @obj for a virNetworkObjPtr Use @net for a virNetworkPtr Signed-off-by: John Ferlan --- src/network/bridge_driver.c | 966 ++-- src/network/bridge_driver.h | 2 +- 2 files changed, 481 insertions(+), 487 deletions(-) diff --git a/src/network/bridge

[libvirt] [PATCH v2 09/20] network: Add virNetworkObj Get/Set API's for @floor_sum

2017-07-26 Thread John Ferlan
In preparation for making the object private, create a couple of API's to get/set the obj->floor_sum. Signed-off-by: John Ferlan --- src/conf/virnetworkobj.c| 15 +++ src/conf/virnetworkobj.h| 7 +++ src/libvirt_private.syms| 2 ++ src/network/bridge_driver.c | 35 +

[libvirt] [PATCH v2 08/20] network: Introduce virNetworkObjGetClassIdMap

2017-07-26 Thread John Ferlan
In preparation for privatizing virNetworkObj, create accessor function to fetch the @classIdMap. Signed-off-by: John Ferlan --- src/conf/virnetworkobj.c| 7 +++ src/conf/virnetworkobj.h| 3 +++ src/libvirt_private.syms| 1 + src/network/bridge_driver.c | 13 - 4 fi

Re: [libvirt] [PATCH 1/2] tests: Prepare for stricter NIC model validation

2017-07-26 Thread Ján Tomko
On Wed, Jul 26, 2017 at 02:20:04PM +0200, Andrea Bolognani wrote: While using "definitely-not-virtio" as a model name is very cute, ◕‿◕ it will also cause the relevant test to fail once we introduce stricter validation. Use "e1000", which is definitely not virtio but also a valid model name,

Re: [libvirt] [PATCH 15/16] network: Modify naming for virNetworkObjList* fetching APIs

2017-07-26 Thread John Ferlan
On 07/24/2017 07:49 AM, Pavel Hrdina wrote: > On Fri, May 19, 2017 at 09:03:23AM -0400, John Ferlan wrote: >> Use the structure names in the @data setup - makes it easier that going >> back to find the struct. >> >> Use the @maxnames instead of @nnames since that's what it is. > > Please use cam

Re: [libvirt] [PATCH 0/3] properly handle '=' in the VNC socket path

2017-07-26 Thread Pavel Hrdina
On Wed, Jul 26, 2017 at 03:41:13PM +0200, Ján Tomko wrote: > On Fri, Jul 21, 2017 at 08:11:28PM +0200, Pavel Hrdina wrote: > >Pavel Hrdina (3): > > qemu: capabilities: introduce QEMU_CAPS_VNC_MULTI_SERVERS > > qemu: properly handle '=' in the VNC socket path > > tests: add test case for VNC unix

Re: [libvirt] [PATCH] docs: Fix documentation related to memory locking

2017-07-26 Thread Ján Tomko
On Wed, Jul 26, 2017 at 03:24:25PM +0530, Nitesh Konkar wrote: Signed-off-by: Nitesh Konkar --- docs/formatdomain.html.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ACK and pushed with slight commit summary tuning. Jan signature.asc Description: Digital signature -- libvir-list m

Re: [libvirt] [PATCH] qemu_cgroup: Remove unnecessary virQEMUDriverPtr arguments

2017-07-26 Thread Ján Tomko
On Tue, Jul 25, 2017 at 05:49:43PM +0200, Martin Kletzander wrote: Since commit 2e6ecba1bcac, the pointer to the qemu driver is saved in domain object's private data and hence does not have to be passed as yet another parameter if domain object is already one of them. This is a first (example) p

Re: [libvirt] [PATCH v3] qemu: Check for existence of provided *_tls_x509_cert_dir

2017-07-26 Thread Ján Tomko
On Fri, Jul 21, 2017 at 02:23:25PM -0400, John Ferlan wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1458630 Introduce virQEMUDriverConfigTLSDirValidateResetDefault to validate that if any of the *_tls_x509_cert_dir values were set properly and reset the default value if the default_tls_x509

Re: [libvirt] [PATCH v2 7/7] qemu: privatize _virQEMUCapsCachePriv struct

2017-07-26 Thread Pavel Hrdina
On Wed, Jul 26, 2017 at 02:33:15PM +0200, Jiri Denemark wrote: > On Fri, Jul 21, 2017 at 15:30:15 +0200, Pavel Hrdina wrote: > > Signed-off-by: Pavel Hrdina > > --- > > > > Notes: > > Changes in v2: > > - the body of structure was changed > > > > src/qemu/qemu_capabilities.c | 10 ++

Re: [libvirt] [PATCH 0/3] properly handle '=' in the VNC socket path

2017-07-26 Thread Ján Tomko
On Fri, Jul 21, 2017 at 08:11:28PM +0200, Pavel Hrdina wrote: Pavel Hrdina (3): qemu: capabilities: introduce QEMU_CAPS_VNC_MULTI_SERVERS qemu: properly handle '=' in the VNC socket path tests: add test case for VNC unix path with '=' ACK series Jan signature.asc Description: Digital sig

Re: [libvirt] [PATCH 08/24] tests: qemuhelp: convert to virTestLoadFilePath

2017-07-26 Thread Eric Blake
On 07/26/2017 05:00 AM, Peter Krempa wrote: > As a sample usage of the new helper convert the calls in qemuhelptest to > the new helper. > --- > tests/qemuhelptest.c | 14 ++ > 1 file changed, 2 insertions(+), 12 deletions(-) > Nice! Reviewed-by: Eric Blake > +if (!(help = virT

Re: [libvirt] [PATCH 07/24] tests: utils: Add virTestLoadFilePath helper

2017-07-26 Thread Eric Blake
On 07/26/2017 05:00 AM, Peter Krempa wrote: > This new helper loads and returns a file from 'abs_srcdir'. By using > variable arguments for the function, it's not necessary to format the > path separately in the test cases. > --- > tests/testutils.c | 51 +++

Re: [libvirt] [PATCH 06/24] util: buffer: Add virBufferStrcatVArgs

2017-07-26 Thread Eric Blake
On 07/26/2017 05:00 AM, Peter Krempa wrote: > Split out the worker loop into a separate function and export it. > --- > src/libvirt_private.syms | 1 + > src/util/virbuffer.c | 27 +-- > src/util/virbuffer.h | 2 ++ > 3 files changed, 24 insertions(+), 6 deletions

[libvirt] [PATCH 7/8] conf: check for buffer errors before virBufferUse

2017-07-26 Thread Ján Tomko
After an OOM error, virBuffer* APIs set buf->use to zero. Adding a buffer to the parent buffer only if use is non-zero would quitely drop data on error. Check the error beforehand to make sure buf->use is zero because we have not attempted to add anything to it. --- src/conf/capabilities.c | 5 +

Re: [libvirt] [PATCH 05/24] tests: utils: Don't calculate file size in virTestLoadFile

2017-07-26 Thread Eric Blake
On 07/26/2017 05:00 AM, Peter Krempa wrote: > The callers don't use it so don't waste a strlen(). Also fix the comment > for the function. > --- > tests/testutils.c | 16 > 1 file changed, 12 insertions(+), 4 deletions(-) > > diff --git a/tests/testutils.c b/tests/testutils.c > i

[libvirt] [PATCH 8/8] Turn virDomainDeviceInfoFormat into void

2017-07-26 Thread Ján Tomko
The rombar attribute was already validated at the time of parsing the XML. --- src/conf/domain_conf.c | 94 -- 1 file changed, 30 insertions(+), 64 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 4dc49fdb0..460776ec6

[libvirt] [PATCH 6/8] Use a separate buffer for subelements

2017-07-26 Thread Ján Tomko
Switch virDomainHubDefFormat to use a separate buffer for subelements. --- src/conf/domain_conf.c | 34 +++--- 1 file changed, 11 insertions(+), 23 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index fdac0e0ba..7728321cb 100644 --- a/src/con

[libvirt] [PATCH 4/8] Use a separate buffer for subelements

2017-07-26 Thread Ján Tomko
Convert virDomainSoundDefFormat to use a separate buffer for subelements. --- src/conf/domain_conf.c | 34 ++ 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index ead94976d..6c4f2f398 100644 --- a/src/

[libvirt] [PATCH 5/8] Use a separate buffer for subelements

2017-07-26 Thread Ján Tomko
Convert virDomainWatchdogDefFormat to use a separate buffer for subelements. --- src/conf/domain_conf.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 6c4f2f398..fdac0e0ba 100644 --- a/src/conf/domain_conf

[libvirt] [PATCH 3/8] Use a separate buffer for subelements

2017-07-26 Thread Ján Tomko
Convert virDomainSmartcardDefFormat to use a separate buffer for possible subelements, to avoid the need for duplicated formatting logic in virDomainDeviceInfoNeedsFormat. --- src/conf/domain_conf.c | 39 +++ 1 file changed, 23 insertions(+), 16 deletions(-) di

[libvirt] [PATCH 2/8] virDomainDeviceInfoFormat: delete outdated comments

2017-07-26 Thread Ján Tomko
This function has grown to format more than just the address. Delete the comment completely to avoid failing to update it in the future. Also, the indentation is now handled by the virBuffer APIs, so the comment about indentation no longer makes sense. --- src/conf/domain_conf.c | 4 1 file

[libvirt] [PATCH 1/8] Remove superfluous usage of virDomainDeviceInfoNeedsFormat

2017-07-26 Thread Ján Tomko
This function returns false if virDomainDeviceInfoFormat would not format anything. Using it as the sole condition to decide whether to call virDomainDeviceInfoFormat or not is pointless, since the conditions are repeated in virDomainDeviceInfoFormat. --- src/conf/domain_conf.c | 33 +++--

[libvirt] [PATCH 0/8] Delete a function

2017-07-26 Thread Ján Tomko
*** BLURB HERE *** Ján Tomko (8): Remove superfluous usage of virDomainDeviceInfoNeedsFormat virDomainDeviceInfoFormat: delete outdated comments Use a separate buffer for subelements Use a separate buffer for subelements Use a separate buffer for subelements Use a separate buffer fo

Re: [libvirt] [PATCH v2 6/7] qemu: switch QEMU capabilities to use virFileCache

2017-07-26 Thread Jiri Denemark
On Fri, Jul 21, 2017 at 15:30:14 +0200, Pavel Hrdina wrote: > The switch contains considerable amount of changes: > > virQEMUCapsRememberCached() is removed because this is now handled > by virFileCacheSave(). > > virQEMUCapsInitCached() is removed because this is now handled by > virFile

Re: [libvirt] [PATCH 04/24] tests: qemumonitorjson: Drop redundant data from testBlockNodeNameDetectFormat

2017-07-26 Thread Eric Blake
On 07/26/2017 05:00 AM, Peter Krempa wrote: > The node name and backing file name can be inferred from the hierarchy. > This will also help when converting to detect node names using > query-blockstats data. > --- > .../qemumonitorjson-nodename-basic.result| 6 -- > .../qe

[libvirt] [PATCH] docs: Fix documentation related to memory locking

2017-07-26 Thread Nitesh Konkar
Signed-off-by: Nitesh Konkar --- docs/formatdomain.html.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index bceddd2..91195be 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -964,7 +964,7 @@

Re: [libvirt] [PATCH] nodedev: Fix double unlock of the driver on udevEnumerateDevices failure

2017-07-26 Thread Erik Skultety
On Wed, Jul 26, 2017 at 08:36:04AM -0400, John Ferlan wrote: > > > On 07/26/2017 04:45 AM, Erik Skultety wrote: > > Commit @4cb719b2dc moved the driver locks around since these have become > > unnecessary at spots where the code handles now self-lockable object > > list, but missed the possible dou

Re: [libvirt] [PATCH 03/24] tests: qemumonitor: Prepare for more test data in testBlockNodeNameDetect

2017-07-26 Thread Eric Blake
On 07/26/2017 05:00 AM, Peter Krempa wrote: > Rename 'json' and related variables to 'nodeNameJson'. Also rename the > test files along. This is a preparation for modifying how we detect node > names which will require also data from 'query-blockstats'. s/require also/also require/ > --- > ...em

Re: [libvirt] [PATCH] nodedev: Fix double unlock of the driver on udevEnumerateDevices failure

2017-07-26 Thread John Ferlan
On 07/26/2017 04:45 AM, Erik Skultety wrote: > Commit @4cb719b2dc moved the driver locks around since these have become > unnecessary at spots where the code handles now self-lockable object > list, but missed the possible double unlock if udevEnumerateDevices > fails, because at that point the d

Re: [libvirt] [PATCH v2 7/7] qemu: privatize _virQEMUCapsCachePriv struct

2017-07-26 Thread Jiri Denemark
On Fri, Jul 21, 2017 at 15:30:15 +0200, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- > > Notes: > Changes in v2: > - the body of structure was changed > > src/qemu/qemu_capabilities.c | 10 ++ > src/qemu/qemu_capspriv.h | 12 > 2 files changed, 10

Re: [libvirt] [PATCH v2 5/7] qemu: pass only host arch instead of the whole virCaps

2017-07-26 Thread Jiri Denemark
On Fri, Jul 21, 2017 at 15:30:13 +0200, Pavel Hrdina wrote: > This is a preparation for following patches where we switch to > virFileCache for QEMU capabilities cache > > The host arch will always remain the same but virCaps may change. Now > the host arch is stored while creating new qemu capab

Re: [libvirt] [PATCH 02/24] tests: qemumonitorjson: Consolidate basic node name detection test cases

2017-07-26 Thread Eric Blake
On 07/26/2017 05:00 AM, Peter Krempa wrote: > Test cases named '1' and '2' differed only in the length of the backing > chain, so remove test case '2' and rename test '1' to 'basic'. > --- > .../qemumonitorjson-nodename-2.json| 2270 > > .../qemumonitorjson-no

Re: [libvirt] [PATCH v2 4/7] tests: rewrite host CPU mocking

2017-07-26 Thread Jiri Denemark
On Fri, Jul 21, 2017 at 15:30:12 +0200, Pavel Hrdina wrote: > Move all the host CPU data into a separate file and rewrite qemucpumock > to not use passed @caps. This is preparation for following patch which > will replace virCaps argument with virArch. > > Signed-off-by: Pavel Hrdina > --- > >

[libvirt] [PATCH 2/2] conf: Introduce the virDomainNetModel enumeration

2017-07-26 Thread Andrea Bolognani
Up until now, we have stored the model name for network interfaces as raw strings in virDomainNetDef: this is suboptimal for a number of reasons, such as having to perform relatively expensive string allocations and comparisons all the time and not giving the compiler the opportunity to have our ba

[libvirt] [PATCH 1/2] tests: Prepare for stricter NIC model validation

2017-07-26 Thread Andrea Bolognani
While using "definitely-not-virtio" as a model name is very cute, it will also cause the relevant test to fail once we introduce stricter validation. Use "e1000", which is definitely not virtio but also a valid model name, instead. Signed-off-by: Andrea Bolognani --- tests/qemuxml2argvdata/qemu

[libvirt] [PATCH 0/2] Introduce the virDomainNetModel enumeration

2017-07-26 Thread Andrea Bolognani
More information in the commit message for patch 2/2. Nobody reads cover letters anyway. Andrea Bolognani (2): tests: Prepare for stricter NIC model validation conf: Introduce the virDomainNetModel enumeration src/bhyve/bhyve_command.c | 6 +-- src/bhyve/bhyve_parse

  1   2   >