Re: [libvirt] Waiting for review of [PATCH v2 2/21] hyperv: implementation of virConnectGetVersion
by Yves Vinter
No answer ???
What does it mean :
- you don't have a window for the review ?
- you are not interested in getting these developments ?
- you don't agree with the delivery process I proposed ?
- you prefer getting the whole set of the v2 versions before reviewing ?
Please, just let me know...
Thanks,
Yves.
De : Yves Vinter
Envoyé : mardi 25 novembre 2014 10:10
À : libvir-list(a)redhat.com
Objet : Waiting for review of [libvirt] [PATCH v2 2/21] hyperv: implementation of virConnectGetVersion
Hi All,
As I described the 27th of October in the following thread:
https://www.redhat.com/archives/libvir-list/2014-October/msg00840.html
[libvirt] [PATCH v2 0/21] hyperv: hyperv: set of new functionalities
new functionalities has been implemented in the libvirt hyperv driver as a set of 21 patches.
PATCH 01/21: hyperv: avoid query memleaks on failure
PATCH 02/21: hyperv: implementation of virConnectGetVersion
PATCH 03/21: hyperv: implementation of virConnectGetCapabilities
PATCH 04/21: hyperv: implementation of virDomainGetVcpus and virConnectGetMaxVcpus
PATCH 05/21: hyperv: implementation of virNodeGetFreeMemory
PATCH 06/21: hyperv: implementation of virDomainShutdown and virDomainShutdownFlags
PATCH 07/21: hyperv: implementation of virDomainGetSchedulerType and virDomainGetSchedulerParameters
PATCH 08/21: hyperv: implementation of virNetworkLookupByName
PATCH 09/21: hyperv: implementation of virNetworkGetXMLDesc
PATCH 10/21: hyperv: implementation of virConnectNumOfNetworks and virConnectListNetworks
PATCH 11/21: hyperv: implementation of virConnectNumOfDefinedNetworks and virConnectListDefinedNetworks
PATCH 12/21: hyperv: implementation of hypervInvokeMethod to handle complex parameters
PATCH 13/21: hyperv: implementation of virDomainSetAutostart and virDomainGetAutostart
PATCH 14/21: hyperv: implementation of virDomainSetMaxMemory
PATCH 15/21: hyperv: implementation of virDomainSetMemory and virDomainSetMemoryFlags
PATCH 16/21: hyperv: implementation of virDomainSetVcpus and virDomainSetVcpusFlags
PATCH 17/21: hyperv: implementation of virDomainUndefine and virDomainUndefineFlags
PATCH 18/21: hyperv: implementation of internal function hypervDomainAttachDisk
PATCH 19/21: hyperv: implementation of internal function hypervDomainAttachNetwork
PATCH 20/21: hyperv: implementation of virDomainAttachDevice and virDomainAttachDeviceFlags
PATCH 21/21: hyperv: implementation of virDomainDefineXML and virDomainCreateXML
A first version of this set has been submitted the 8th of October.
The first 3 patches have been already reviewed by Eric and the first patch has been pushed in the main stream.
Based on the remarks after this 3 reviews, I will produce a V2 for the whole set of patches.
It will be more convenient for me to submit V2 versions patch after patch, only after the previous one has been approved and pushed in the main branch.
The V2 of patch 02/21 has been submitted the 27th of October here:
https://www.redhat.com/archives/libvir-list/2014-October/msg00824.html
[libvirt] [PATCH v2 2/21] hyperv: implementation of virConnectGetVersion
I've not received any feedback since, and it has not been pushed in the main stream.
Is there any issue?
I'm still waiting for its approval before submitting the next patch...
Thanks for you answer,
Yves.
9 years, 11 months
[libvirt] [PATCH] docs: Correct invalid hyperlinks
by Martin Kletzander
Since libvirt.h was split into multiple files and similarly
docs/libvirt-libvirt.html, docs/hvsupport.html have bad hyperlinks. The
same happens for all the html.in files that used <code class='docref'>
tag, because page.xsl has no idea where to point the link that's found.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
docs/Makefile.am | 4 +-
docs/acl.html.in | 2 +-
docs/api.html.in | 224 ++++++++++++++++++++++++++++++++++--------
docs/errors.html.in | 4 +-
docs/formatdomain.html.in | 15 ++-
docs/formatdomaincaps.html.in | 17 ++--
docs/hvsupport.pl | 79 ++++++++++-----
docs/java.html.in | 6 +-
docs/page.xsl | 5 -
docs/python.html.in | 8 +-
docs/uri.html.in | 12 ++-
11 files changed, 278 insertions(+), 98 deletions(-)
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 5485ee9..684687d 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -1,6 +1,6 @@
## Process this file with automake to produce Makefile.in
-## Copyright (C) 2005-2013 Red Hat, Inc.
+## Copyright (C) 2005-2014 Red Hat, Inc.
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public
@@ -195,7 +195,7 @@ todo:
hvsupport.html:: $(srcdir)/hvsupport.html.in
-$(srcdir)/hvsupport.html.in: $(srcdir)/hvsupport.pl \
+$(srcdir)/hvsupport.html.in: $(srcdir)/hvsupport.pl $(api_DATA) \
$(srcdir)/../src/libvirt_public.syms \
$(srcdir)/../src/libvirt_qemu.syms $(srcdir)/../src/libvirt_lxc.syms \
$(srcdir)/../src/driver.h
diff --git a/docs/acl.html.in b/docs/acl.html.in
index 2d228e2..6d280c1 100644
--- a/docs/acl.html.in
+++ b/docs/acl.html.in
@@ -90,7 +90,7 @@
types in its API. Each object type, in turn, has a set
of permissions defined. To determine what permissions
are checked for specific API call, consult the
- <a href="html/libvirt-libvirt.html">API reference manual</a>
+ <a href="html/index.html">API reference manual</a>
documentation for the API in question.
</p>
diff --git a/docs/api.html.in b/docs/api.html.in
index 68ffa0b..5c64db1 100644
--- a/docs/api.html.in
+++ b/docs/api.html.in
@@ -16,7 +16,7 @@
manipulated through the API is the <code>virConnectPtr</code>, which
represents the connection to a hypervisor. Any application using libvirt
is likely to start using the
- API by calling one of <a href="html/libvirt-libvirt.html#virConnectOpen"
+ API by calling one of <a href="html/libvirt-libvirt-host.html#virConnectOpen"
>the virConnectOpen functions</a>. You will note that those functions take
a name argument which is actually a <a href="uri.html">connection URI</a>
to select the right hypervisor to open.
@@ -26,7 +26,10 @@
name will default to a preselected hypervisor, but it's probably not a
wise thing to do in most cases. See the <a href="uri.html">connection
URI</a> page for a full descriptions of the values allowed.</p>
- <p> Once the application obtains a <code class='docref'>virConnectPtr</code>
+ <p> OnDevice the application obtains a
+ <a href="/html/libvirt-libvirt-host.html#virConnectPtr">
+ <code>virConnectPtr</code>
+ </a>
connection to the hypervisor it can then use it to manage the hypervisor's
available domains and related virtualization
resources, such as storage and networking. All those are
@@ -38,33 +41,61 @@
</p>
<p> The figure above shows the five main objects exported by the API:</p>
<ul>
- <li><code class='docref'>virConnectPtr</code>
+ <li>
+ <a href="html/libvirt-libvirt-host.html#virConnectPtr">
+ <code>virConnectPtr</code>
+ </a>
<p>Represents the connection to a hypervisor. Use one of the
- <a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a>
+ <a href="html/libvirt-libvirt-host.html#virConnectOpen">virConnectOpen</a>
functions to obtain connection to the hypervisor which is then used
as a parameter to other connection API's.</p></li>
- <li><code class='docref'>virDomainPtr</code>
+ <li>
+ <a href="html/libvirt-libvirt-domain.html#virDomainPtr">
+ <code>virDomainPtr</code>
+ </a>
<p>Represents one domain either active or defined (i.e. existing as
permanent config file and storage but not currently running on that
- node). The function <code class='docref'>virConnectListAllDomains</code>
+ node). The function
+ <a href="html/libvirt-libvirt-domain.html#virConnectListAllDomains">
+ <code>virConnectListAllDomains</code>
+ </a>
lists all the domains for the hypervisor.</p></li>
- <li><code class='docref'>virNetworkPtr</code>
+ <li>
+ <a href="html/libvirt-libvirt-network.html#virNetworkPtr">
+ <code>virNetworkPtr</code>
+ </a>
<p>Represents one network either active or defined (i.e. existing
as permanent config file and storage but not currently activated).
- The function <code class='docref'>virConnectListAllNetworks</code>
+ The function
+ <a href="html/libvirt-libvirt-network.html#virConnectListAllNetworks">
+ <code>virConnectListAllNetworks</code>
+ </a>
lists all the virtualization networks for the hypervisor.</p></li>
- <li><code class='docref'>virStorageVolPtr</code>
+ <li>
+ <a href="html/libvirt-libvirt-storage.html#virStorageVolPtr">
+ <code>virStorageVolPtr</code>
+ </a>
<p>Represents one storage volume generally used
as a block device available to one of the domains. The function
- <code class="docref">virStorageVolLookupByPath</code> finds
- the storage volume object based on its path on the node.</p></li>
- <li><code class='docref'>virStoragePoolPtr</code>
+ <a href="html/libvirt-libvirt-storage.html#virStorageVolLookupByPath">
+ <code>virStorageVolLookupByPath</code>
+ </a>
+ finds the storage volume object based on its path on the node.</p></li>
+ <li>
+ <a href="html/libvirt-libvirt-storage.html#virStoragePoolPtr">
+ <code>virStoragePoolPtr</code>
+ </a>
<p>Represents a storage pool, which is a logical area
used to allocate and store storage volumes. The function
- <code class='docref'>virConnectListAllStoragePools</code> lists
- all of the virtualization storage pools on the hypervisor. The function
- <code class="docref">virStoragePoolLookupByVolume</code> finds
- the storage pool containing a given storage volume.</p></li>
+ <a href="html/libvirt-libvirt-storage.html#virConnectListAllStoragePools">
+ <code>virConnectListAllStoragePools</code>
+ </a>
+ lists all of the virtualization storage pools on the hypervisor.
+ The function
+ <a href="html/libvirt-libvirt-storage.html#virStoragePoolLookupByVolume">
+ <code>virStoragePoolLookupByVolume</code>
+ </a>
+ finds the storage pool containing a given storage volume.</p></li>
</ul>
<p> Most objects manipulated by the library can also be represented using
XML descriptions. This is used primarily to create those object, but is
@@ -101,42 +132,114 @@
<p>Used to perform lookups on objects by some type of identifier,
such as:</p>
<ul>
- <li><code class='docref'>virDomainLookupByID</code></li>
- <li><code class='docref'>virDomainLookupByName</code></li>
- <li><code class='docref'>virDomainLookupByUUID</code></li>
- <li><code class='docref'>virDomainLookupByUUIDString</code></li>
+ <li>
+ <a href="html/libvirt-libvirt-domain.html#virDomainLookupByID">
+ <code>virDomainLookupByID</code>
+ </a>
+ </li>
+ <li>
+ <a href="html/libvirt-libvirt-domain.html#virDomainLookupByName">
+ <code>virDomainLookupByName</code>
+ </a>
+ </li>
+ <li>
+ <a href="html/libvirt-libvirt-domain.html#virDomainLookupByUUID">
+ <code>virDomainLookupByUUID</code>
+ </a>
+ </li>
+ <li>
+ <a href="html/libvirt-libvirt-domain.html#virDomainLookupByUUIDString">
+ <code>virDomainLookupByUUIDString</code>
+ </a>
+ </li>
</ul>
</li>
<li><b>Enumeration</b> [virConnectList..., virConnectNumOf...]
<p>Used to enumerate a set of object available to an given
hypervisor connection such as:</p>
<ul>
- <li><code class='docref'>virConnectListDomains</code></li>
- <li><code class='docref'>virConnectNumOfDomains</code></li>
- <li><code class='docref'>virConnectListNetworks</code></li>
- <li><code class='docref'>virConnectListStoragePools</code></li>
+ <li>
+ <a href="html/libvirt-libvirt-domain.html#virConnectListDomains">
+ <code>virConnectListDomains</code>
+ </a>
+ </li>
+ <li>
+ <a href="html/libvirt-libvirt-domain.html#virConnectNumOfDomains">
+ <code>virConnectNumOfDomains</code>
+ </a>
+ </li>
+ <li>
+ <a href="html/libvirt-libvirt-network.html#virConnectListNetworks">
+ <code>virConnectListNetworks</code>
+ </a>
+ </li>
+ <li>
+ <a href="html/libvirt-libvirt-storage.html#virConnectListStoragePools">
+ <code>virConnectListStoragePools</code>
+ </a>
+ </li>
</ul>
</li>
<li><b>Description</b> [...GetInfo]
<p>Generic accessor providing a set of generic information about an
object, such as: </p>
<ul>
- <li><code class='docref'>virNodeGetInfo</code></li>
- <li><code class='docref'>virDomainGetInfo</code></li>
- <li><code class='docref'>virStoragePoolGetInfo</code></li>
- <li><code class='docref'>virStorageVolGetInfo</code></li>
+ <li>
+ <a href="html/libvirt-libvirt-host.html#virNodeGetInfo">
+ <code>virNodeGetInfo</code>
+ </a>
+ </li>
+ <li>
+ <a href="html/libvirt-libvirt-domain.html#virDomainGetInfo">
+ <code>virDomainGetInfo</code>
+ </a>
+ </li>
+ <li>
+ <a href="html/libvirt-libvirt-storage.html#virStoragePoolGetInfo">
+ <code>virStoragePoolGetInfo</code>
+ </a>
+ </li>
+ <li>
+ <a href="html/libvirt-libvirt-storage.html#virStorageVolGetInfo">
+ <code>virStorageVolGetInfo</code>
+ </a>
+ </li>
</ul>
</li>
<li><b>Accessors</b> [...Get..., ...Set...]
<p>Specific accessors used to query or modify data for the given object,
such as: </p>
<ul>
- <li><code class='docref'>virConnectGetType</code></li>
- <li><code class='docref'>virDomainGetMaxMemory</code></li>
- <li><code class='docref'>virDomainSetMemory</code></li>
- <li><code class='docref'>virDomainGetVcpus</code></li>
- <li><code class='docref'>virStoragePoolSetAutostart</code></li>
- <li><code class='docref'>virNetworkGetBridgeName</code></li>
+ <li>
+ <a href="html/libvirt-libvirt-host.html#virConnectGetType">
+ <code>virConnectGetType</code>
+ </a>
+ </li>
+ <li>
+ <a href="html/libvirt-libvirt-domain.html#virDomainGetMaxMemory">
+ <code>virDomainGetMaxMemory</code>
+ </a>
+ </li>
+ <li>
+ <a href="html/libvirt-libvirt-domain.html#virDomainSetMemory">
+ <code>virDomainSetMemory</code>
+ </a>
+ </li>
+ <li>
+ <a href="html/libvirt-libvirt-domain.html#virDomainGetVcpus">
+ <code>virDomainGetVcpus</code>
+ </a>
+ </li>
+ <li>
+ <a href="html/libvirt-libvirt-storage.html#virStoragePoolSetAutostart">
+ <code>virStoragePoolSetAutostart</code>
+ </a>
+ </li>
+ <li>
+ <a href="html/libvirt-libvirt-network.html#virNetworkGetBridgeName">
+ <code>virNetworkGetBridgeName</code>
+ </a>
+ </li>
</ul>
</li>
<li><b>Creation</b> [...Create, ...CreateXML]
@@ -144,18 +247,46 @@
the object based on an XML description, while the ...Create APIs will
create the object based on existing object pointer, such as: </p>
<ul>
- <li><code class='docref'>virDomainCreate</code></li>
- <li><code class='docref'>virDomainCreateXML</code></li>
- <li><code class='docref'>virNetworkCreate</code></li>
- <li><code class='docref'>virNetworkCreateXML</code></li>
+ <li>
+ <a href="html/libvirt-libvirt-domain.html#virDomainCreate">
+ <code>virDomainCreate</code>
+ </a>
+ </li>
+ <li>
+ <a href="html/libvirt-libvirt-domain.html#virDomainCreateXML">
+ <code>virDomainCreateXML</code>
+ </a>
+ </li>
+ <li>
+ <a href="html/libvirt-libvirt-network.html#virNetworkCreate">
+ <code>virNetworkCreate</code>
+ </a>
+ </li>
+ <li>
+ <a href="html/libvirt-libvirt-network.html#virNetworkCreateXML">
+ <code>virNetworkCreateXML</code>
+ </a>
+ </li>
</ul>
</li>
<li><b>Destruction</b> [...Destroy]
<p>Used to shutdown or deactivate and destroy objects, such as: </p>
<ul>
- <li><code class='docref'>virDomainDestroy</code></li>
- <li><code class='docref'>virNetworkDestroy</code></li>
- <li><code class='docref'>virStoragePoolDestroy</code></li>
+ <li>
+ <a href="html/libvirt-libvirt-domain.html#virDomainDestroy">
+ <code>virDomainDestroy</code>
+ </a>
+ </li>
+ <li>
+ <a href="html/libvirt-libvirt-network.html#virNetworkDestroy">
+ <code>virNetworkDestroy</code>
+ </a>
+ </li>
+ <li>
+ <a href="html/libvirt-libvirt-storage.html#virStoragePoolDestroy">
+ <code>virStoragePoolDestroy</code>
+ </a>
+ </li>
</ul>
</li>
</ul>
@@ -170,7 +301,11 @@
<p>Drivers are the basic building block for libvirt functionality
to support the capability to handle specific hypervisor driver calls.
Drivers are discovered and registered during connection processing as
- part of the <code class='docref'>virInitialize</code> API. Each driver
+ part of the
+ <a href="html/libvirt-libvirt-host.html#virInitialize">
+ <code>virInitialize</code>
+ </a>
+ API. Each driver
has a registration API which loads up the driver specific function
references for the libvirt APIs to call. The following is a simplistic
view of the hypervisor driver mechanism. Consider the stacked list of
@@ -199,7 +334,10 @@
The libvirtd daemon service is started on the host at system boot
time and can also be restarted at any time by a properly privileged
user, such as root. The libvirtd daemon uses the same libvirt API
- <code class='docref'>virInitialize</code> sequence as applications
+ <a href="html/libvirt-libvirt-host.html#virInitialize">
+ <code>virInitialize</code>
+ </a>
+ sequence as applications
for client-side driver registrations, but then extends the registered
driver list to encompass all known drivers supported for all driver
types supported on the host. </p>
diff --git a/docs/errors.html.in b/docs/errors.html.in
index df9aa7c..668d280 100644
--- a/docs/errors.html.in
+++ b/docs/errors.html.in
@@ -46,9 +46,9 @@ following fields:</p>
<li>level: the error level, usually VIR_ERR_ERROR, though there is room for
warnings like VIR_ERR_WARNING</li>
<li>message: the full human-readable formatted string of the error</li>
- <li>conn: if available a pointer to the <a href="html/libvirt-libvirt.html#virConnectPtr">virConnectPtr</a>
+ <li>conn: if available a pointer to the <a href="html/libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a>
connection to the hypervisor where this happened</li>
- <li>dom: if available a pointer to the <a href="html/libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain
+ <li>dom: if available a pointer to the <a href="html/libvirt-libvirt-domain.html#virDomainPtr">virDomainPtr</a> domain
targeted in the operation</li>
</ul>
<p>and then extra raw information about the error which may be initialized
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index d05912e..8fcbd29 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -190,7 +190,7 @@
"emulate" (let the hypervisor generate all values), "host" (copy
all of Block 0 and Block 1, except for the UUID, from the host's
SMBIOS values;
- the <a href="html/libvirt-libvirt.html#virConnectGetSysinfo">
+ the <a href="html/libvirt-libvirt-host.html#virConnectGetSysinfo">
<code>virConnectGetSysinfo</code></a> call can be
used to see what values are copied), or "sysinfo" (use the values in
the <a href="#elementsSysinfo">sysinfo</a> element). If not
@@ -1196,9 +1196,16 @@
It is sometimes necessary to override the default actions taken
on various events. Not all hypervisors support all events and actions.
The actions may be taken as a result of calls to libvirt APIs
- <code class='docref'>virDomainReboot</code>,
- <code class='docref'>virDomainShutdown</code>, or
- <code class='docref'>virDomainShutdownFlags</code>.
+ <a href="html/libvirt-libvirt-domain.html#virDomainReboot">
+ <code>virDomainReboot</code>
+ </a>,
+ <a href="html/libvirt-libvirt-domain.html#virDomainShutdown">
+ <code>virDomainShutdown</code>
+ </a>,
+ or
+ <a href="html/libvirt-libvirt-domain.html#virDomainShutdownFlags">
+ <code>virDomainShutdownFlags</code>
+ </a>.
Using <code>virsh reboot</code> or <code>virsh shutdown</code> would
also trigger the event.
</p>
diff --git a/docs/formatdomaincaps.html.in b/docs/formatdomaincaps.html.in
index 6959dfe..7beb5a4 100644
--- a/docs/formatdomaincaps.html.in
+++ b/docs/formatdomaincaps.html.in
@@ -16,11 +16,14 @@
then it needs to be more recent to support VFIO, while legacy KVM is
achievable just fine with older qemus.</p>
- <p>The main difference between <code
- class="docref">virConnectGetCapabilities</code> and the emulator
- capabilities API is, the former one aims more on the host capabilities
- (e.g. NUMA topology, security models in effect, etc.) while the latter one
- specializes on the hypervisor capabilities.</p>
+ <p>The main difference between
+ <a href="/html/libvirt-libvirt-host.html#virConnectGetCapabilities">
+ <code>virConnectGetCapabilities</code>
+ </a>
+ and the emulator capabilities API is, the former one aims more on
+ the host capabilities (e.g. NUMA topology, security models in
+ effect, etc.) while the latter one specializes on the hypervisor
+ capabilities.</p>
<p>While the <a href="formatcaps.html">Driver Capabilities</a> provides the
host capabilities (e.g NUMA topology, security models in effect, etc.), the
@@ -41,7 +44,9 @@
1.2.7</span>):</p>
<pre>
- <code class="docref">virConnectGetDomainCapabilities</code>
+ <a href="/html/libvirt-libvirt-domain.html#virConnectGetDomainCapabilities">
+ <code>virConnectGetDomainCapabilities</code>
+ </a>
</pre>
<p>The root element that emulator capability XML document starts with has
diff --git a/docs/hvsupport.pl b/docs/hvsupport.pl
index 6bbd44a..44a30ce 100755
--- a/docs/hvsupport.pl
+++ b/docs/hvsupport.pl
@@ -4,6 +4,8 @@ use strict;
use warnings;
use File::Find;
+use XML::XPath;
+use XML::XPath::XMLParser;
die "syntax: $0 SRCDIR\n" unless int(@ARGV) == 1;
@@ -52,6 +54,7 @@ open FILE, "<$symslibvirt"
my $vers;
my $prevvers;
+my $apixpath = XML::XPath->new(filename => "$srcdir/../docs/libvirt-api.xml");
while (defined($line = <FILE>)) {
chomp $line;
next if $line =~ /^\s*#/;
@@ -75,7 +78,10 @@ while (defined($line = <FILE>)) {
$prevvers = $vers;
$vers = undef;
} elsif ($line =~ /\s*(\w+)\s*;\s*$/) {
- $apis{$1} = $vers;
+ my $file = $apixpath->find("/api/symbols/function[\@name='$1']/\@file");
+ $apis{$1} = {};
+ $apis{$1}->{vers} = $vers;
+ $apis{$1}->{file} = $file;
} else {
die "unexpected data $line\n";
}
@@ -91,6 +97,7 @@ open FILE, "<$symsqemu"
$prevvers = undef;
$vers = undef;
+$apixpath = XML::XPath->new(filename => "$srcdir/../docs/libvirt-qemu-api.xml");
while (defined($line = <FILE>)) {
chomp $line;
next if $line =~ /^\s*#/;
@@ -114,7 +121,10 @@ while (defined($line = <FILE>)) {
$prevvers = $vers;
$vers = undef;
} elsif ($line =~ /\s*(\w+)\s*;\s*$/) {
- $apis{$1} = $vers;
+ my $file = $apixpath->find("/api/symbols/function[\@name='$1']/\@file");
+ $apis{$1} = {};
+ $apis{$1}->{vers} = $vers;
+ $apis{$1}->{file} = $file;
} else {
die "unexpected data $line\n";
}
@@ -130,6 +140,7 @@ open FILE, "<$symslxc"
$prevvers = undef;
$vers = undef;
+$apixpath = XML::XPath->new(filename => "$srcdir/../docs/libvirt-lxc-api.xml");
while (defined($line = <FILE>)) {
chomp $line;
next if $line =~ /^\s*#/;
@@ -153,7 +164,10 @@ while (defined($line = <FILE>)) {
$prevvers = $vers;
$vers = undef;
} elsif ($line =~ /\s*(\w+)\s*;\s*$/) {
- $apis{$1} = $vers;
+ my $file = $apixpath->find("/api/symbols/function[\@name='$1']/\@file");
+ $apis{$1} = {};
+ $apis{$1}->{vers} = $vers;
+ $apis{$1}->{file} = $file;
} else {
die "unexpected data $line\n";
}
@@ -164,27 +178,27 @@ close FILE;
# Some special things which aren't public APIs,
# but we want to report
-$apis{virConnectSupportsFeature} = "0.3.2";
-$apis{virDomainMigratePrepare} = "0.3.2";
-$apis{virDomainMigratePerform} = "0.3.2";
-$apis{virDomainMigrateFinish} = "0.3.2";
-$apis{virDomainMigratePrepare2} = "0.5.0";
-$apis{virDomainMigrateFinish2} = "0.5.0";
-$apis{virDomainMigratePrepareTunnel} = "0.7.2";
-
-$apis{virDomainMigrateBegin3} = "0.9.2";
-$apis{virDomainMigratePrepare3} = "0.9.2";
-$apis{virDomainMigratePrepareTunnel3} = "0.9.2";
-$apis{virDomainMigratePerform3} = "0.9.2";
-$apis{virDomainMigrateFinish3} = "0.9.2";
-$apis{virDomainMigrateConfirm3} = "0.9.2";
-
-$apis{virDomainMigrateBegin3Params} = "1.1.0";
-$apis{virDomainMigratePrepare3Params} = "1.1.0";
-$apis{virDomainMigratePrepareTunnel3Params} = "1.1.0";
-$apis{virDomainMigratePerform3Params} = "1.1.0";
-$apis{virDomainMigrateFinish3Params} = "1.1.0";
-$apis{virDomainMigrateConfirm3Params} = "1.1.0";
+$apis{virConnectSupportsFeature}->{vers} = "0.3.2";
+$apis{virDomainMigratePrepare}->{vers} = "0.3.2";
+$apis{virDomainMigratePerform}->{vers} = "0.3.2";
+$apis{virDomainMigrateFinish}->{vers} = "0.3.2";
+$apis{virDomainMigratePrepare2}->{vers} = "0.5.0";
+$apis{virDomainMigrateFinish2}->{vers} = "0.5.0";
+$apis{virDomainMigratePrepareTunnel}->{vers} = "0.7.2";
+
+$apis{virDomainMigrateBegin3}->{vers} = "0.9.2";
+$apis{virDomainMigratePrepare3}->{vers} = "0.9.2";
+$apis{virDomainMigratePrepareTunnel3}->{vers} = "0.9.2";
+$apis{virDomainMigratePerform3}->{vers} = "0.9.2";
+$apis{virDomainMigrateFinish3}->{vers} = "0.9.2";
+$apis{virDomainMigrateConfirm3}->{vers} = "0.9.2";
+
+$apis{virDomainMigrateBegin3Params}->{vers} = "1.1.0";
+$apis{virDomainMigratePrepare3Params}->{vers} = "1.1.0";
+$apis{virDomainMigratePrepareTunnel3Params}->{vers} = "1.1.0";
+$apis{virDomainMigratePerform3Params}->{vers} = "1.1.0";
+$apis{virDomainMigrateFinish3Params}->{vers} = "1.1.0";
+$apis{virDomainMigrateConfirm3Params}->{vers} = "1.1.0";
@@ -406,10 +420,23 @@ EOF
$groups{$grp}->{apis}->{$b}
} keys %{$groups{$grp}->{apis}}) {
my $api = $groups{$grp}->{apis}->{$field};
- my $vers = $apis{$api};
+ my $vers = $apis{$api}->{vers};
+ my $htmlgrp = $apis{$api}->{file};
print <<EOF;
<tr>
-<td><a href=\"html/libvirt-libvirt.html#$api\">$api</a></td>
+<td>
+EOF
+
+ if (defined $htmlgrp) {
+ print <<EOF;
+<a href=\"html/libvirt-$htmlgrp.html#$api\">$api</a>
+EOF
+
+ } else {
+ print $api;
+ }
+ print <<EOF;
+</td>
<td>$vers</td>
EOF
diff --git a/docs/java.html.in b/docs/java.html.in
index daa7b76..659c0b9 100644
--- a/docs/java.html.in
+++ b/docs/java.html.in
@@ -98,18 +98,18 @@ the code you can build the code with</p>
<p>The bindings are articulated around a few
classes in the <code>org/libvirt</code> package, notably the
<code>Connect</code>, <code>Domain</code> and <code>Network</code>
-ones. Functions in the <a href="html/libvirt-libvirt.html">C API</a>
+ones. Functions in the <a href="html/index.html">C API</a>
taking <code>virConnectPtr</code>, <code>virDomainPtr</code> or
<code>virNetworkPtr</code> as their first argument usually become
methods for the classes, their name is just stripped from the
virConnect or virDomain(Get) prefix and the first letter gets converted to
lower case, for example the C functions:</p>
<p>
- <code>int <a href="html/libvirt-libvirt.html#virConnectNumOfDomains">virConnectNumOfDomains</a>
+ <code>int <a href="html/libvirt-libvirt-domain.html#virConnectNumOfDomains">virConnectNumOfDomains</a>
(virConnectPtr conn);</code>
</p>
<p>
- <code>int <a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a>
+ <code>int <a href="html/libvirt-libvirt-domain.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a>
(virDomainPtr domain, unsigned long memory);</code>
</p>
<p>become</p>
diff --git a/docs/page.xsl b/docs/page.xsl
index 7de238e..80164dd 100644
--- a/docs/page.xsl
+++ b/docs/page.xsl
@@ -10,11 +10,6 @@
<!-- The sitemap.html.in page contains the master navigation structure -->
<xsl:variable name="sitemap" select="document('sitemap.html.in')/html:html/html:body/html:div[@id='sitemap']"/>
- <xsl:template match="html:code[@class='docref']" mode="content">
- <xsl:variable name="name"><xsl:value-of select="."/></xsl:variable>
- <a href="html/libvirt-libvirt.html#{$name}"><code><xsl:value-of select="$name"/></code></a>
- </xsl:template>
-
<xsl:template match="node() | @*" mode="content">
<xsl:copy>
<xsl:apply-templates select="node() | @*" mode="content"/>
diff --git a/docs/python.html.in b/docs/python.html.in
index 3033337..36517fe 100644
--- a/docs/python.html.in
+++ b/docs/python.html.in
@@ -12,11 +12,11 @@ becomes methods for the classes, their name is just stripped from the
virConnect or virDomain(Get) prefix and the first letter gets converted to
lower case, for example the C functions:</p>
<p>
- <code>int <a href="html/libvirt-libvirt.html#virConnectNumOfDomains">virConnectNumOfDomains</a>
+ <code>int <a href="html/libvirt-libvirt-domain.html#virConnectNumOfDomains">virConnectNumOfDomains</a>
(virConnectPtr conn);</code>
</p>
<p>
- <code>int <a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a>
+ <code>int <a href="html/libvirt-libvirt-domain.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a>
(virDomainPtr domain, unsigned long memory);</code>
</p>
<p>become</p>
@@ -31,10 +31,10 @@ in the file libvirtclass.txt present in the python dir or in the docs.There
is a couple of function who don't map directly to their C counterparts due to
specificities in their argument conversions:</p>
<ul>
- <li><code><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a></code>
+ <li><code><a href="html/libvirt-libvirt-domain.html#virConnectListDomains">virConnectListDomains</a></code>
is replaced by <code>virDomain::listDomainsID(self)</code> which returns
a list of the integer ID for the currently running domains</li>
- <li><code><a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a></code>
+ <li><code><a href="html/libvirt-libvirt-domain.html#virDomainGetInfo">virDomainGetInfo</a></code>
is replaced by <code>virDomain::info()</code> which returns a list of
<ol><li>state: one of the state values (virDomainState)</li><li>maxMemory: the maximum memory used by the domain</li><li>memory: the current amount of memory used by the domain</li><li>nbVirtCPU: the number of virtual CPU</li><li>cpuTime: the time used by the domain in nanoseconds</li></ol></li>
</ul>
diff --git a/docs/uri.html.in b/docs/uri.html.in
index 73c3e88..7702ccc 100644
--- a/docs/uri.html.in
+++ b/docs/uri.html.in
@@ -19,7 +19,15 @@ documents libvirt URIs.
<h2><a name="URI_libvirt">Specifying URIs to libvirt</a></h2>
<p>
-The URI is passed as the <code>name</code> parameter to <a href="html/libvirt-libvirt.html#virConnectOpen"><code>virConnectOpen</code></a> or <a href="html/libvirt-libvirt.html#virConnectOpenReadOnly"><code>virConnectOpenReadOnly</code></a>. For example:
+ The URI is passed as the <code>name</code> parameter to
+ <a href="html/libvirt-libvirt-host.html#virConnectOpen">
+ <code>virConnectOpen</code>
+ </a>
+ or
+ <a href="html/libvirt-libvirt-host.html#virConnectOpenReadOnly">
+ <code>virConnectOpenReadOnly</code>
+ </a>.
+ For example:
</p>
<pre>
virConnectPtr conn = virConnectOpenReadOnly (<b>"test:///default"</b>);
@@ -291,7 +299,7 @@ Notes:
<ol>
<li> The HTTP client does not fully support IPv6. </li>
<li> Many features do not work as expected across HTTP connections, in
- particular, <a href="html/libvirt-libvirt.html#virConnectGetCapabilities">virConnectGetCapabilities</a>.
+ particular, <a href="html/libvirt-libvirt-host.html#virConnectGetCapabilities">virConnectGetCapabilities</a>.
The <a href="remote.html">remote support</a> however does work
correctly. </li>
<li> XenD's new-style XMLRPC interface is not supported by
--
2.1.3
9 years, 11 months
[libvirt] [PATCH] maint: update to latest gnulib
by Eric Blake
Several portability changes, but the one we are most interested in
is the improvement to bootstrap to detect perl modules.
This patch doesn't actually change our bootstrap requirements
(that will be a separate patch), but sets the stage for it.
* .gnulib: Update to latest, for bootstrap improvements.
* bootstrap: Regenerate from upstream.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
Upstream gnulib is still working out an issue with modern mingw
supporting %lld in printf by default; until that is sorted, we do
not want to pick up gnulib cf88e56 in isolation.
Pushing under the gnulib maintenance rule, before we freeze.
* .gnulib 9565c3b...3914f31 (67):
> bootstrap: Allow perl modules in $buildreq
> apply _GL_ATTRIBUTE_PURE to some inline functions
> vasnprintf: fix potential incorrect errno
> vasnprintf: fix potential use after free
> autoupdate
> filevercmp, posixtm: avoid compiler warnings with -O3
> Fix LDBL80_WORDS macro on big endian platforms.
> autoupdate
> git-version-gen: do not print new line characters
> gnulib-tool: recognize x:* as an absolute path
> argp: avoid extraneous translation and mem leak with empty pre doc
> autoupdate
> doc: mention that _BSD_SOURCE is deprecated for _DEFAULT_SOURCE
> uniname/uniname-tests: skip if system's libunistring is used
> printf: fix configure check on big endian systems
> pipe-filter-gi, pipe-filter-ii: port to AIX
> gitlog-to-changelog: add --until
> update from texinfo
> extern-inline: update commentary about GCC bugs
> gen-uni-tables: untabify
> gen-uni-tables: check out-of-range values added to 3-level tables
> gen-uni-tables: utilize 'assert'
> gen-uni-tables: cosmetic improvements
> fcntl-h-tests: port to PA-RISC GNU/Linux
> fts: port to C89
> unistd: port to iOS
> obstack: do not reject malloc-style obstack_chunkfun, obstack_freefun
> autoupdate
> update from texinfo
> obstack: avoid potentially-nonportable function casts
> obstack: fix macro return values
> obstack: do not assume system-supplied obstack is size_t safe
> obstack: port to platforms that #define __alignof__
> linkat: don't unconditionally replace on GNU/Linux
> linkat: wrap to handle symlinks on OS X 10.10
> open, openat: document nonstandard FreeBSD, NetBSD O_NOFOLLOW errno
> obstack: add NEWS entry for recent incompatible changes
> mountlist: don't use libmount to decide on dummy/remote
> maint: add missing ChangeLog entries for Modra's obstack changes
> obstack: prefer __alignof__ to alignof
> obstack: prefer alignof to calculating alignments by hand
> obstack: use size_t alignments and check for overflow
> obstack: 64-bit obstack support, part 3
> obstack: 64-bit obstack support, part 2
> obstack: 64-bit obstack support, part 1
> obstack: tidy part 2
> obstack: tidy part 1
> socketlib, sockets, sys_socket: Use AC_REQUIRE to pacify autoconf.
> iconv: avoid false detection of non-working iconv
> bootstrap: print more diagnostics for missing programs
> bootstrap: only update the gnulib submodule
> symlinkat: port to AIX 7.1
> readlinkat: port to AIX 7.1
> remove spurious {
> modules/fcntl: fix error reporting by dupfd
> basename, dirname: Improve documentation.
> exclude: declare exclude_patopts static
> autoupdate
> dirname: support compilation with C++
> qsort_r: include <config.h>
> avltree-list: avoid compiler warnings
> qsort_r: new module, for GNU-style qsort_r
> strerror_r-posix: support compilation with C++
> fcntl-h: fix compilation with Intel C++ compiler
> autoupdate
> mountlist: use /proc/self/mountinfo when available
> users.txt: add cmogstored
---
.gnulib | 2 +-
bootstrap | 42 ++++++++++++++++++++++++++++++++++--------
2 files changed, 35 insertions(+), 9 deletions(-)
diff --git a/.gnulib b/.gnulib
index 9565c3b..3914f31 160000
--- a/.gnulib
+++ b/.gnulib
@@ -1 +1 @@
-Subproject commit 9565c3be73eb6d76b7b42a21d68d2e00a62abb6d
+Subproject commit 3914f3153576e9a5ba4002bde27de05211b5a79c
diff --git a/bootstrap b/bootstrap
index ce90bc4..e0c4ec2 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,6 +1,6 @@
#! /bin/sh
# Print a version string.
-scriptversion=2013-12-05.23; # UTC
+scriptversion=2014-12-08.12; # UTC
# Bootstrap this package from checked-out sources.
@@ -42,6 +42,9 @@ export LC_ALL
local_gl_dir=gl
+# Honour $PERL, but work even if there is none
+PERL="${PERL-perl}"
+
me=$0
usage() {
@@ -210,7 +213,17 @@ bootstrap_sync=false
use_git=true
check_exists() {
- ($1 --version </dev/null) >/dev/null 2>&1
+ if test "$1" = "--verbose"; then
+ ($2 --version </dev/null) >/dev/null 2>&1
+ if test $? -ge 126; then
+ # If not found, run with diagnostics as one may be
+ # presented with env variables to set to find the right version
+ ($2 --version </dev/null)
+ fi
+ else
+ ($1 --version </dev/null) >/dev/null 2>&1
+ fi
+
test $? -lt 126
}
@@ -408,7 +421,7 @@ sort_ver() { # sort -V is not generally available
get_version() {
app=$1
- $app --version >/dev/null 2>&1 || return 1
+ $app --version >/dev/null 2>&1 || { $app --version; return 1; }
$app --version 2>&1 |
sed -n '# Move version to start of line.
@@ -446,6 +459,7 @@ check_versions() {
test "$appvar" = TAR && appvar=AMTAR
case $appvar in
GZIP) ;; # Do not use $GZIP: it contains gzip options.
+ PERL::*) ;; # Keep perl modules as-is
*) eval "app=\${$appvar-$app}" ;;
esac
@@ -463,11 +477,22 @@ check_versions() {
ret=1
continue
} ;;
+ # Another check is for perl modules. These can be written as
+ # e.g. perl::XML::XPath in case of XML::XPath module, etc.
+ perl::*)
+ # Extract module name
+ app="${app#perl::}"
+ if ! $PERL -m"$app" -e 'exit 0' >/dev/null 2>&1; then
+ warn_ "Error: perl module '$app' not found"
+ ret=1
+ fi
+ continue
+ ;;
esac
if [ "$req_ver" = "-" ]; then
# Merely require app to exist; not all prereq apps are well-behaved
# so we have to rely on $? rather than get_version.
- if ! check_exists $app; then
+ if ! check_exists --verbose $app; then
warn_ "Error: '$app' not found"
ret=1
fi
@@ -598,8 +623,8 @@ case ${GNULIB_SRCDIR--} in
# Note that $use_git is necessarily true in this case.
if git_modules_config submodule.gnulib.url >/dev/null; then
echo "$0: getting gnulib files..."
- git submodule init || exit $?
- git submodule update || exit $?
+ git submodule init -- "$gnulib_path" || exit $?
+ git submodule update -- "$gnulib_path" || exit $?
elif [ ! -d "$gnulib_path" ]; then
echo "$0: getting gnulib files..."
@@ -628,13 +653,14 @@ case ${GNULIB_SRCDIR--} in
# This fallback allows at least git 1.5.5.
if test -f "$gnulib_path"/gnulib-tool; then
# Since file already exists, assume submodule init already complete.
- git submodule update || exit $?
+ git submodule update -- "$gnulib_path" || exit $?
else
# Older git can't clone into an empty directory.
rmdir "$gnulib_path" 2>/dev/null
git clone --reference "$GNULIB_SRCDIR" \
"$(git_modules_config submodule.gnulib.url)" "$gnulib_path" \
- && git submodule init && git submodule update \
+ && git submodule init -- "$gnulib_path" \
+ && git submodule update -- "$gnulib_path" \
|| exit $?
fi
fi
--
1.9.3
9 years, 11 months
[libvirt] [PATCH v3 0/2] Create TAP devices for ethernet vNICs
by Michal Privoznik
This is a 3rd version of v2:
https://www.redhat.com/archives/libvir-list/2014-November/msg01066.html
Michal Privoznik (1):
qemuxml2argvtest: Load virSecurityDriverNop
Vasiliy Tolstov (1):
qemu: Automaticly create tap device for VIR_DOMAIN_NET_TYPE_ETHERNET
src/qemu/qemu_command.c | 86 ++++++++++++++--------
src/qemu/qemu_hotplug.c | 10 +--
src/qemu/qemu_process.c | 4 +
.../qemuxml2argv-graphics-spice-timeout.args | 2 +-
.../qemuxml2argv-net-eth-names.args | 7 +-
tests/qemuxml2argvdata/qemuxml2argv-net-eth.args | 4 +-
tests/qemuxml2argvmock.c | 28 +++++++
tests/qemuxml2argvtest.c | 7 ++
8 files changed, 104 insertions(+), 44 deletions(-)
--
2.0.4
9 years, 11 months
[libvirt] [PATCH] build: fix mingw printing of pid
by Eric Blake
Commit c75425734 introduced a compilation failure:
../../src/access/viraccessdriverpolkit.c: In function 'virAccessDriverPolkitCheck':
../../src/access/viraccessdriverpolkit.c:137:5: error: format '%d' expects argument of type 'int', but argument 9 has type 'pid_t' [-Werror=format=]
VIR_DEBUG("Check action '%s' for process '%d' time %lld uid %d",
^
Since mingw pid_t is 64 bits, it's easier to just follow what we've
done elsewhere and cast to a large enough type when printing pids.
* src/access/viraccessdriverpolkit.c (virAccessDriverPolkitCheck):
Add cast.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
Pushing under the build-breaker rule.
src/access/viraccessdriverpolkit.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/access/viraccessdriverpolkit.c b/src/access/viraccessdriverpolkit.c
index 3136be7..89bc890 100644
--- a/src/access/viraccessdriverpolkit.c
+++ b/src/access/viraccessdriverpolkit.c
@@ -1,5 +1,5 @@
/*
- * viraccessdriverpolkit.c: polkited access control driver
+ * viraccessdriverpolkit.c: polkitd access control driver
*
* Copyright (C) 2012, 2014 Red Hat, Inc.
*
@@ -134,8 +134,8 @@ virAccessDriverPolkitCheck(virAccessManagerPtr manager ATTRIBUTE_UNUSED,
&uid) < 0)
goto cleanup;
- VIR_DEBUG("Check action '%s' for process '%d' time %lld uid %d",
- actionid, pid, startTime, uid);
+ VIR_DEBUG("Check action '%s' for process '%lld' time %lld uid %d",
+ actionid, (long long) pid, startTime, uid);
rv = virPolkitCheckAuth(actionid,
pid,
--
1.9.3
9 years, 11 months
[libvirt] [PATCH] build: fix unused variable in mingw
by Eric Blake
util/virnetdevbridge.c: In function 'virNetDevBridgePortSetLearning':
util/virnetdevbridge.c:359:38: error: unused parameter 'enable' [-Werror=unused-parameter]
bool enable)
^
* src/util/virnetdevbridge.c (virNetDevBridgePortSetLearning): Mark
unused variable.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
Pushing under the build-breaker rule.
src/util/virnetdevbridge.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/virnetdevbridge.c b/src/util/virnetdevbridge.c
index 78c4a25..73ec40b 100644
--- a/src/util/virnetdevbridge.c
+++ b/src/util/virnetdevbridge.c
@@ -356,7 +356,7 @@ virNetDevBridgePortGetLearning(const char *brname ATTRIBUTE_UNUSED,
int
virNetDevBridgePortSetLearning(const char *brname ATTRIBUTE_UNUSED,
const char *ifname ATTRIBUTE_UNUSED,
- bool enable)
+ bool enable ATTRIBUTE_UNUSED)
{
virReportSystemError(ENOSYS, "%s",
_("Unable to set bridge port learning on this platform"));
--
1.9.3
9 years, 11 months
[libvirt] [RESEND PATCH] network: don't allow multiple dhcp sections
by Kyle DeFrancia
This resolves: https://bugzilla.redhat.com/show_bug.cgi?id=907779
A <dhcp> element can exist in only one IPv4 address and one IPv6
address per network. This patch enforces that in virNetworkUpdate.
---
Rebased to latest master, hopefully this works better.
My original message:
https://www.redhat.com/archives/libvir-list/2014-November/msg00989.html
src/conf/network_conf.c | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c
index 97719ed..92aa9d5 100644
--- a/src/conf/network_conf.c
+++ b/src/conf/network_conf.c
@@ -3480,6 +3480,31 @@ virNetworkIpDefByIndex(virNetworkDefPtr def, int
parentIndex) }
static int
+virNetworkDefUpdateCheckMultiDHCP(virNetworkDefPtr def,
+ virNetworkIpDefPtr ipdef)
+{
+ int family = VIR_SOCKET_ADDR_FAMILY(&ipdef->address);
+ size_t i;
+ virNetworkIpDefPtr ip;
+
+ for (i = 0;
+ (ip = virNetworkDefGetIpByIndex(def, family, i));
+ i++) {
+ if (ip != ipdef) {
+ if (ip->nranges || ip->nhosts) {
+ virReportError(VIR_ERR_OPERATION_INVALID,
+ _("dhcp is supported only for a "
+ "single %s address on each network"),
+ (family == AF_INET) ? "IPv4" : "IPv6");
+ return -1;
+ }
+ }
+ }
+
+ return 0;
+}
+
+static int
virNetworkDefUpdateIPDHCPHost(virNetworkDefPtr def,
unsigned int command,
int parentIndex,
@@ -3544,6 +3569,9 @@ virNetworkDefUpdateIPDHCPHost(virNetworkDefPtr
def, } else if ((command == VIR_NETWORK_UPDATE_COMMAND_ADD_FIRST) ||
(command == VIR_NETWORK_UPDATE_COMMAND_ADD_LAST)) {
+ if (virNetworkDefUpdateCheckMultiDHCP(def, ipdef) < 0)
+ goto cleanup;
+
/* log error if an entry with same name/address/ip already
exists */ for (i = 0; i < ipdef->nhosts; i++) {
if ((host.mac &&
@@ -3651,6 +3679,9 @@ virNetworkDefUpdateIPDHCPRange(virNetworkDefPtr
def, if ((command == VIR_NETWORK_UPDATE_COMMAND_ADD_FIRST) ||
(command == VIR_NETWORK_UPDATE_COMMAND_ADD_LAST)) {
+ if (virNetworkDefUpdateCheckMultiDHCP(def, ipdef) < 0)
+ goto cleanup;
+
if (i < ipdef->nranges) {
char *startip = virSocketAddrFormat(&range.start);
char *endip = virSocketAddrFormat(&range.end);
--
2.1.0
9 years, 11 months
[libvirt] [PATCHv3 0/9] Let libvirt manage a bridge's MAC table
by Laine Stump
The idea behind these patches is the following:
1) most virtual machines only have a single MAC address behind each
interface, and that MAC address is known by libvirt.
2) If we (i.e. libvirt) manually add an entry to the bridge's
forwarding database (fdb) for the MAC address associated with a port
on the bridge, we can turn off learning and unicast_flooding for that
port.
3) kernels starting with 3.15 (and actually working correctly starting
in kernel 3.17) will notice that all of a bridge's ports have flood
and learning turned off, and in that case will turn off promiscuous
mode on all ports. If all but one of the ports have flood/learning
turned off, then promiscuous will be turned off on that port (and left
on for all the other ports)
4) When (4) can be done, there is a measurable performance
advantage. It can also *kind of* help security, as it will prevent a
guest from doing anything useful if it changes its MAC address (but
won't prevent the guest from *sending* packets with a spoofed MAC
address).
NB: These only work with a fixed MAC address, and no vlan tags set in
the guest. Support for both of those will be coming.
This series is the same as V2, which was previously ACK (pending final determination of attribute name):
https://www.redhat.com/archives/libvir-list/2014-December/msg00173.html
but with the name of the attribute changed - in V2 it was:
fdb="learnWithFlooding|managed"
and it is now:
macTableManager="kernel|libvirt"
which more accurately reflects what is being controlled with the attribute.
Laine Stump (9):
util: new functions for setting bridge and bridge port attributes
util: functions to manage bridge fdb (forwarding database)
conf: new network bridge device attribute macTableManager
network: save bridge name in ActualNetDef when actualType==network too
network: store network macTableManager setting in NetDef actual object
network: setup bridge devices for macTableManager='libvirt'
qemu: setup tap devices for macTableManager='libvirt'
qemu: always use virDomainNetGetActualBridgeName to get interface's
bridge
lxc: always use virDomainNetGetActualBridgeName to get interface's
bridge
docs/formatnetwork.html.in | 50 ++-
docs/schemas/network.rng | 9 +
src/conf/domain_conf.c | 130 ++++---
src/conf/domain_conf.h | 2 +
src/conf/network_conf.c | 51 ++-
src/conf/network_conf.h | 11 +
src/libvirt_private.syms | 11 +
src/lxc/lxc_driver.c | 26 +-
src/lxc/lxc_process.c | 26 +-
src/network/bridge_driver.c | 78 +++++
src/qemu/qemu_command.c | 53 +--
src/qemu/qemu_hotplug.c | 54 +--
src/util/virnetdevbridge.c | 382 ++++++++++++++++++++-
src/util/virnetdevbridge.h | 44 ++-
tests/networkxml2xmlin/host-bridge-no-flood.xml | 6 +
.../nat-network-explicit-flood.xml | 21 ++
tests/networkxml2xmlout/host-bridge-no-flood.xml | 6 +
.../nat-network-explicit-flood.xml | 23 ++
tests/networkxml2xmltest.c | 2 +
19 files changed, 796 insertions(+), 189 deletions(-)
create mode 100644 tests/networkxml2xmlin/host-bridge-no-flood.xml
create mode 100644 tests/networkxml2xmlin/nat-network-explicit-flood.xml
create mode 100644 tests/networkxml2xmlout/host-bridge-no-flood.xml
create mode 100644 tests/networkxml2xmlout/nat-network-explicit-flood.xml
--
1.9.3
9 years, 11 months
[libvirt] [PATCH] qemu: migration: Unlock vm if ACL check in Finish phase of protocol v2 fails
by Peter Krempa
Avoid leaving the domain locked on a failed ACL check. Introduced in
commit abf75aea247e (Add ACL checks into the QEMU driver).
---
src/qemu/qemu_driver.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 8cec372..0a684e1 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -11447,41 +11447,43 @@ static virDomainPtr
qemuDomainMigrateFinish2(virConnectPtr dconn,
const char *dname,
const char *cookie ATTRIBUTE_UNUSED,
int cookielen ATTRIBUTE_UNUSED,
const char *uri ATTRIBUTE_UNUSED,
unsigned long flags,
int retcode)
{
virQEMUDriverPtr driver = dconn->privateData;
virDomainObjPtr vm;
virDomainPtr dom = NULL;
virCheckFlags(QEMU_MIGRATION_FLAGS, NULL);
vm = virDomainObjListFindByName(driver->domains, dname);
if (!vm) {
virReportError(VIR_ERR_NO_DOMAIN,
_("no domain with matching name '%s'"), dname);
goto cleanup;
}
- if (virDomainMigrateFinish2EnsureACL(dconn, vm->def) < 0)
+ if (virDomainMigrateFinish2EnsureACL(dconn, vm->def) < 0) {
+ virObjectUnlock(vm);
goto cleanup;
+ }
/* Do not use cookies in v2 protocol, since the cookie
* length was not sufficiently large, causing failures
* migrating between old & new libvirtd
*/
dom = qemuMigrationFinish(driver, dconn, vm,
NULL, 0, NULL, NULL, /* No cookies */
flags, retcode, false);
cleanup:
return dom;
}
/*******************************************************************
* Migration Protocol Version 3
*******************************************************************/
--
2.1.0
9 years, 11 months
[libvirt] [PATCH 00/12] more progress towards backing chain allocation stats
by Eric Blake
This is in response to my earlier v2 patch attempt at exposing
qcow2 allocation watermarks during a block commit (although that
series attempted to expand virDomainGetXMLDesc, while this one
expands virDomainListGetStats instead):
https://www.redhat.com/archives/libvir-list/2014-November/msg00589.html
It is also a followup to my preliminiaries (where I had review
comments to split patch 2/2, now 3 separate patches in this series):
https://www.redhat.com/archives/libvir-list/2014-November/msg00932.html
There's enough new content here that I didn't know whether to call
this a v3 of the original approach, but as the original approach was
rejected on design without much review, it feels like this is a new
series, even if a couple of patches from the v2 series ended up in
this series in a slightly different form.
See patch 12 for a sample of the planned output; I still have a few
more patches to polish to properly get qemu JSON output wired into
the command for correct values, but this should at least be sufficient
to write up client code that interacts with the interface.
The patches can also be grabbed from:
git fetch git://repo.or.cz/libvirt/ericb.git getstats
or browsed at:
http://repo.or.cz/w/libvirt/ericb.git/tree/refs/heads/getstats
Eric Blake (12):
getstats: avoid memory leak on OOM
getstats: improve documentation
qemu: refactor blockinfo job handling
qemu: let blockinfo reuse virStorageSource
qemu: refactor blockinfo data gathering
getstats: start giving offline block stats
getstats: report block sizes for offline domains
getstats: add block.n.path stat
getstats: prepare for dynamic block.count stat
getstats: add new flag for block backing chain
getstats: split block stats reporting for easier recursion
getstats: start crawling backing chain for qemu
include/libvirt/libvirt-domain.h | 1 +
src/libvirt-domain.c | 24 ++-
src/qemu/qemu_driver.c | 415 ++++++++++++++++++++++++++-------------
src/util/virstoragefile.h | 3 +-
tools/virsh-domain-monitor.c | 7 +
tools/virsh.pod | 10 +-
6 files changed, 315 insertions(+), 145 deletions(-)
--
1.9.3
9 years, 11 months