Coverity complained that 4 out of 5 callers to virJSONValueObjectGetBoolean
checked for errors. But we documented that we don't care in this case.
* src/qemu/qemu_monitor_json.c (qemuMonitorJSONGetBlockInfo): Use
ignore_value.
---
Pushing under the trivial rule.
src/qemu/qemu_monitor_json.c |
Detected by Coverity. We want to increment the size_t counter,
not the pointer to the counter.
* src/lxc/lxc_controller.c (lxcSetupLoopDevices): Use correct
precedence.
---
Pushing under the trivial rule.
src/lxc/lxc_controller.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
dif
Counterpart to --roots.
* include/libvirt/libvirt.h.in (VIR_DOMAIN_SNAPSHOT_LIST_LEAVES):
New flag.
* src/libvirt.c (virDomainSnapshotNum, virDomainSnapshotListNames)
(virDomainSnapshotNumChildren)
(virDomainSnapshotListChildrenNames): Document it.
* tools/virsh.c (cmdSnapshotList): Expose it.
* t
Relatively straight-forward filtering.
* src/esx/esx_vi.h (esxVI_GetNumberOfSnapshotTrees)
(esxVI_GetSnapshotTreeNames): Add parameter.
* src/esx/esx_vi.c (esxVI_GetNumberOfSnapshotTrees)
(esxVI_GetSnapshotTreeNames): Allow leaf filtering.
* src/esx/esx_driver.c (esxDomainSnapshotNum)
(esxDomainSn
With the recent refactoring of qemu snapshot relationships, it
is now trivial to filter on leaves.
* src/conf/domain_conf.c (virDomainSnapshotObjListCount)
(virDomainSnapshotObjListCopyNames): Handle new flag.
* src/qemu/qemu_driver.c (qemuDomainSnapshotListNames)
(qemuDomainSnapshotNum, qemuDomai
Previously, we could filter 'virsh snapshot-list --roots' to show
just snapshots lacking parents, which is good for top-down algorithms.
But sometimes you want just snapshots lacking children, for
bottom-up algorithms - this implements that.
Once again, I can only compile-test esx. Also, I haven'
Hi,
> Thanks. This is a bit long, so I shortened it to:
>
> diff --git a/tools/virsh.c b/tools/virsh.c
> index 3da8bc5..9532bc3 100644
> --- a/tools/virsh.c
> +++ b/tools/virsh.c
> @@ -1897,8 +1897,9 @@ cmdDefine(vshControl *ctl, const vshCmd *cmd)
> * "undefine" command
> */
> static const
On 10/07/2011 06:05 PM, Eric Blake wrote:
After working with ESX and VBox, I realized that a tweak to how
snapshot relationships are stored would speed things up from O(n^2)
to O(n). The hash table must be kept for name lookup, but the
speedup comes by tracking relationships with each snapshot r
The previous optimizations lead to some follow-on cleanups.
* src/conf/domain_conf.c (virDomainSnapshotForEachChild)
(virDomainSnapshotForEachDescendant): Drop dead parameter.
(virDomainSnapshotActOnDescendant)
(virDomainSnapshotObjListNumFrom)
(virDomainSnapshotObjListGetNamesFrom): Update caller
Maintain the parent/child relationships of all qemu snapshots.
* src/qemu/qemu_driver.c (qemuDomainSnapshotLoad): Populate
relationships after loading.
(qemuDomainSnapshotCreateXML): Set relations on creation; tweak
redefinition to reuse existing object.
(qemuDomainSnapshotReparentChildren, qemuDo
No one was using virDomainSnapshotHasChildren, but that was an
O(n) function. Exposing and tracking a bit more metadata for each
snapshot will allow the same query to be made with an O(1) query
of the member field. For single snapshot operations (create,
delete), callers can be trusted to maintai
Among other improvements, virDomainSnapshotForEachDescendant is
changed from iterative O(n^2) to recursive O(n). A bit better
than the O(n^3) implementation in virsh snapshot-list!
* src/conf/domain_conf.c (virDomainSnapshotObjListNum)
(virDomainSnapshotObjListNumFrom)
(virDomainSnapshotObjeListG
After working with ESX and VBox, I realized that a tweak to how
snapshot relationships are stored would speed things up from O(n^2)
to O(n). The hash table must be kept for name lookup, but the
speedup comes by tracking relationships with each snapshot rather
than crawling the entire hash table re
I was a bit surprised that 'virsh snapshot-edit dom name' silently
allowed me to clone things, while still telling me the old name,
especially since other commands like 'virsh edit dom' reject rename
attempts (*). This fixes things to be more explicit.
(*) Technically, 'virsh edit dom' relies on
Otherwise, the results are not repeatable.
* tools/virsh.c (cmdSnapshotList): Print tree in predictable order.
---
tools/virsh.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/virsh.c b/tools/virsh.c
index 9532bc3..20b3dc5 100644
--- a/tools/virsh.c
+++ b/tools/
This patch is a hack at the moment and would need code refactoring to
split-out the defaults for x86 and powerpc. Libvirt chooses a set of
default options such as disk controller, network specific options, etc
which are suitable for a x86 host. These defaults are arch specific
and hence libvirt n
This patch has a small parser which correctly interprets
qemu-system-ppc64 output for a specific query.
This code is independent for powerpc and largely does not interfere
with x86 implementation.
---
src/qemu/qemu_capabilities.c | 64 ++
1 files changed
This part of code primarily compares host and guest CPUs of a given
architecture for feature compatibility. x86 makes this choice based on
CPUID comparison.
Presently the PowerPC code has stubs to just get a 'pseries' guest to
boot. It would be augmented going forward, to do a detailed feature
comp
Libvirt presently depends on /proc/cpuinfo to gather information about
the x86 host. Parsing of /proc/cpuinfo is arch-specific; the
information fields are also not consistent.
A cleaner way would be to use Sysfs. Both x86 and PowerPC specific
information can be obtained from sysfs with different ar
Recent development in KVM for 64-bit Power ISA Book3S machines, allows
users to run multiple KVM guest instances on POWER7 and PPC970
processor based systems. Also qemu-system-ppc64 has been enhanced to
support a new machine type "pseries" suitable for Power Book3S machines.
This addition effectiv
On 10/07/2011 09:56 AM, Daniel P. Berrange wrote:
From: "Daniel P. Berrange"
This removes the old example for legacy probes and adds two
new scripts demonstrating many of the new probe point facilities.
The rpc-monitor.stp script will print out friendly detaisl of all
s/detaisl/details/
RPC
On 10/07/2011 09:56 AM, Daniel P. Berrange wrote:
From: "Daniel P. Berrange"
The libvirtd daemon had a few crude system tap probes. Some of
these were broken during the RPC rewrite. The new modular RPC
code is structured in a way that allows much more effective
tracing. Instead of trying to hook
On 10/07/2011 09:56 AM, Daniel P. Berrange wrote:
From: "Daniel P. Berrange"
Pull the call to gnutls_x509_crt_get_dn up into a higher function
so that the 'dname' variable will be available for probe points
* src/rpc/virnettlscontext.c: Pull gnutls_x509_crt_get_dn up
one level
---
src/rpc/
On 10/07/2011 09:56 AM, Daniel P. Berrange wrote:
From: "Daniel P. Berrange"
The virNetTLSContextRef API forgot to acquire/release the lock
while changing ctxt->refs
* src/rpc/virnettlscontext.c: Add lock calls
---
src/rpc/virnettlscontext.c |2 ++
1 files changed, 2 insertions(+), 0 del
On 10/07/2011 09:56 AM, Daniel P. Berrange wrote:
From: "Daniel P. Berrange"
Instead of directly manipulating sock->refs, add a virSocketRef
API
* src/rpc/virnetsocket.c, src/rpc/virnetsocket.h: Add virSocketRef
---
src/rpc/virnetsocket.c | 13 +++--
src/rpc/virnetsocket.h |1 +
On 10/07/2011 09:56 AM, Daniel P. Berrange wrote:
From: "Daniel P. Berrange"
If we receive an error on the stream, set the EOF marker so
that any further (bogus) incoming data is dropped.
* src/rpc/virnetclientstream.c: Set EOF on stream
---
src/rpc/virnetclientstream.c |3 +++
1 files c
On 10/07/2011 09:56 AM, Daniel P. Berrange wrote:
From: "Daniel P. Berrange"
To avoid static linking libvirtd to the RPC server code, which
then prevents sane introduction of DTrace probes, put it all
in the libvirt.so, and export it
* daemon/Makefile.am: Don't link to RPC libraries
* src/Makef
On 10/07/2011 09:56 AM, Daniel P. Berrange wrote:
When looking at the keep alive code I needed an easy way to
monitor the RPC messages being sent/received. I toyed with
writing a WireShark plugin, but this seemed very hard work.
So instead I wrote a handy set of DTrace probes for the RPC
layer
A
From: "Daniel P. Berrange"
The virNetTLSContextRef API forgot to acquire/release the lock
while changing ctxt->refs
* src/rpc/virnettlscontext.c: Add lock calls
---
src/rpc/virnettlscontext.c |2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/rpc/virnettlscontext.c b/
From: "Daniel P. Berrange"
To avoid static linking libvirtd to the RPC server code, which
then prevents sane introduction of DTrace probes, put it all
in the libvirt.so, and export it
* daemon/Makefile.am: Don't link to RPC libraries
* src/Makefile.am: Link all RPC libraries to libvirt.so
* src/
From: "Daniel P. Berrange"
This removes the old example for legacy probes and adds two
new scripts demonstrating many of the new probe point facilities.
The rpc-monitor.stp script will print out friendly detaisl of all
RPC traffic between a libvirt client/server. This is incredibly
useful in see
From: "Daniel P. Berrange"
The libvirtd daemon had a few crude system tap probes. Some of
these were broken during the RPC rewrite. The new modular RPC
code is structured in a way that allows much more effective
tracing. Instead of trying to hook up the original probes,
define a new set of probes
From: "Daniel P. Berrange"
Pull the call to gnutls_x509_crt_get_dn up into a higher function
so that the 'dname' variable will be available for probe points
* src/rpc/virnettlscontext.c: Pull gnutls_x509_crt_get_dn up
one level
---
src/rpc/virnettlscontext.c | 34 +--
From: "Daniel P. Berrange"
If we receive an error on the stream, set the EOF marker so
that any further (bogus) incoming data is dropped.
* src/rpc/virnetclientstream.c: Set EOF on stream
---
src/rpc/virnetclientstream.c |3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a
From: "Daniel P. Berrange"
Instead of directly manipulating sock->refs, add a virSocketRef
API
* src/rpc/virnetsocket.c, src/rpc/virnetsocket.h: Add virSocketRef
---
src/rpc/virnetsocket.c | 13 +++--
src/rpc/virnetsocket.h |1 +
2 files changed, 12 insertions(+), 2 deletions(-)
When looking at the keep alive code I needed an easy way to
monitor the RPC messages being sent/received. I toyed with
writing a WireShark plugin, but this seemed very hard work.
So instead I wrote a handy set of DTrace probes for the RPC
layer
At the same time I also needed to track a bug in the
On 10/07/2011 03:34 AM, tangchen wrote:
virsh undefine command can now undefine an active guest, but the help
information is still the old.
This patch modifies it and make it coincident to the manpage of virsh.
Signed-off-by: tangchen
---
tools/virsh.c |6 --
1 files changed, 4 inser
On Fri, Oct 07, 2011 at 08:51:47AM -0600, Eric Blake wrote:
> On 10/07/2011 08:35 AM, Guido Günther wrote:
> >Hi,
> >attached patch is needed to properly skip the SELinux tests if SELinux
> >isn't enabled.
> >Cheers,
> > -- Guido
> >
>
> ACK.
Pushed. Thanks,
-- Guido
--
libvir-list mailing list
On 10/07/2011 08:35 AM, Guido Günther wrote:
Hi,
attached patch is needed to properly skip the SELinux tests if SELinux
isn't enabled.
Cheers,
-- Guido
ACK.
--
Eric Blake ebl...@redhat.com+1-801-349-2682
Libvirt virtualization library http://libvirt.org
--
libvir-list mailing list
li
Hi,
attached patch is needed to properly skip the SELinux tests if SELinux
isn't enabled.
Cheers,
-- Guido
>From 8647fef32cdc13636ee86a937f854cdb931added Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Guido=20G=C3=BCnther?=
Date: Fri, 7 Oct 2011 16:31:42 +0200
Subject: [PATCH] Use SKIP instead of SELIN
On 10/07/2011 08:13 AM, Daniel Veillard wrote:
On Thu, Oct 06, 2011 at 05:18:33PM -0600, Eric Blake wrote:
It was impossible for 'virsh snapshot-current dom name' to set name
as the current snapshot, if name is a disk-only snapshot.
Using strstr rather than full-blown xml parsing is safe, since
On Thu, Oct 06, 2011 at 05:18:33PM -0600, Eric Blake wrote:
> It was impossible for 'virsh snapshot-current dom name' to set name
> as the current snapshot, if name is a disk-only snapshot.
>
> Using strstr rather than full-blown xml parsing is safe, since the
> xml is assumed to be well-formed co
On Thu, Oct 06, 2011 at 05:18:34PM -0600, Eric Blake wrote:
> Redefining disk-only snapshot xml should work even if the user
> did not explicitly pass VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLY;
> the flag is only required for conditions where the
> subelement is not already present in parsing (that is,
* tools/virsh.c (cmdSnapshotList): Spell exclusive correctly.
---
Pushing under the trivial rule.
tools/virsh.c |6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/virsh.c b/tools/virsh.c
index 48f2b8a..62581f6 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -13
On Fri, Oct 07, 2011 at 01:39:50PM +0200, Wido den Hollander wrote:
> Hi,
>
> On Mon, 2011-09-19 at 21:13 -0700, Sage Weil wrote:
> > The current support for qemu and Ceph RBD (rados block device) has two
> > main deficiencies: authentication doesn't work, and it relies on
> > environment variab
On Fri, Oct 7, 2011 at 12:40 PM, Christophe Fergeau wrote:
> Hi,
Hello,
> While writing this code, there were at least 2 questions that arose,
> some input would be welcome :)
>
> * I don't know how to handle XMLs where the same node appears multiple
> times (eg "name"). If it's the latest na
Hi,
On Mon, 2011-09-19 at 21:13 -0700, Sage Weil wrote:
> The current support for qemu and Ceph RBD (rados block device) has two
> main deficiencies: authentication doesn't work, and it relies on
> environment variables (which don't work with latest upstream). This
> patch set addresses both th
VirtFS allows the user to choose between local/handle for fs driver.
As of now, libvirt hardcode to use local driver only. This patch provides a
solution to allow user to choose between local/handle as fs driver.
Sample:
Signed-off-by: Harsh Prateek Bora
---
docs
On Thu, Oct 06, 2011 at 04:33:49PM -0600, Eric Blake wrote:
> On 10/06/2011 11:36 AM, Guido Günther wrote:
> >>These three errors should probably all be changed away from
> >>VIR_ERR_INTERNAL_ERROR into something more useful, but I'm not sure
> >>whether that would be VIR_ERR_CONF_SYNTAX,
> >>VIR_E
Now that the parsing is done before creating the object, this
member is no longer useful. Moreover, it's redundant with the ::node
member. Remove it and rely on always having an xmlNodePtr available
to represent the config object.
---
libvirt-gconfig/libvirt-gconfig-object.c | 30 ---
These functions now create empty config objects to be consistent
with what gvir_config_domain_new does.
---
libvirt-gconfig/libvirt-gconfig-capabilities.c| 10 --
libvirt-gconfig/libvirt-gconfig-capabilities.h|2 +-
libvirt-gconfig/libvirt-gconfig-domain-snapshot.c |9 +++
s/gvir_config_object_get_doc/gvir_config_object_to_xml/
Prefer gvir_config_object_to_xml over gvir_config_object_get_doc
since the latter will be removed soon.
---
libvirt-gobject/libvirt-gobject-connection.c |2 +-
libvirt-gobject/libvirt-gobject-storage-pool.c |2 +-
2 files changed,
Add a call to gvir_config_object_validate in test-domain-parse.c
However at the moment this call is purely informative since none
of the tests is a valid domain XML description.
---
libvirt-gconfig/tests/test-domain-parse.c |6 ++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --gi
---
libvirt-gconfig/libvirt-gconfig-domain.c | 71
libvirt-gconfig/libvirt-gconfig-domain.h |4 ++
libvirt-gconfig/libvirt-gconfig.sym|2 +
libvirt-gconfig/tests/test-domain-create.c | 12 +
libvirt-gconfig/tests/test-domain-parse.c |7
It's used to set the content of a node in a GVirConfigObject to
a given value, and will replace any existing node with the same
value.
---
libvirt-gconfig/libvirt-gconfig-domain.c | 22 ++
libvirt-gconfig/libvirt-gconfig-object.c | 30 ++
libvirt
---
libvirt-gconfig/libvirt-gconfig-domain.c | 29 +
libvirt-gconfig/libvirt-gconfig-domain.h |2 +
libvirt-gconfig/libvirt-gconfig-object.c | 32
libvirt-gconfig/libvirt-gconfig-object.h |5
libvirt-gconfig/libvirt-gcon
---
libvirt-gconfig/libvirt-gconfig-domain.c | 19 ++-
1 files changed, 18 insertions(+), 1 deletions(-)
diff --git a/libvirt-gconfig/libvirt-gconfig-domain.c
b/libvirt-gconfig/libvirt-gconfig-domain.c
index 06fc3fa..00cab80 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain.c
GVirConfigObject also contains an xmlNodePtr which is more useful
since it indicates the position of the current config object in
the source XML file. Since xmlNode has a 'doc' member, having
both an xmlNodePtr and an xmlDocPtr in GVirConfigObject is
redundant.
---
libvirt-gconfig/libvirt-gconfig-
Since this function no longer tries to do XML parsing, there is
no error to report.
---
libvirt-gconfig/libvirt-gconfig-domain.c |5 ++---
libvirt-gconfig/libvirt-gconfig-object.c |7 +++
libvirt-gconfig/libvirt-gconfig-object.h |2 +-
3 files changed, 6 insertions(+), 8 deletions(
This commit changes gvir_config_domain_new_from_xml not to operate
on an existing object. This makes it possible to call it to create
an appropriate xmlNodePtr object which can then be used to construct
an object derived from GVirConfigObject. This will also makes it
possible to remove GVirConfigOb
Rename it to gvir_config_domain_new_from_xml since it takes an
XML string as input. gvir_config_domain_new will be used to create
a new empty domain.
---
libvirt-gconfig/libvirt-gconfig-domain.c |2 +-
libvirt-gconfig/libvirt-gconfig-domain.h |2 +-
libvirt-gconfig/libvirt-gconfig.sym
There will be quite a few getter functions returning a string
contained in one of the nodes of a GVirConfigObject, so better to
make it a one-liner to achieve this.
---
libvirt-gconfig/libvirt-gconfig-domain.c |9 ++---
libvirt-gconfig/libvirt-gconfig-object.c | 12
libvirt-
This test has 3 duplicate "name" nodes in the domain XML, I don't
know what the right behaviour is in this case :)
---
libvirt-gconfig/tests/test-domain-duplicate.xml |7 +++
1 files changed, 7 insertions(+), 0 deletions(-)
create mode 100644 libvirt-gconfig/tests/test-domain-duplicate.xm
---
configure.ac |1 +
libvirt-gconfig/Makefile.am |1 +
libvirt-gconfig/tests/Makefile.am | 16 ++
libvirt-gconfig/tests/test-domain-create.c| 53 +++
libvirt-gconfig/tests/test-domain-invalid.xml |
---
libvirt-gconfig/libvirt-gconfig-domain.c | 12
libvirt-gconfig/libvirt-gconfig-domain.h |1 +
libvirt-gconfig/libvirt-gconfig.sym |1 +
3 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/libvirt-gconfig/libvirt-gconfig-domain.c
b/libvirt-gconfig/libvir
These helper functions will be useful later on.
---
examples/Makefile.am |1 +
libvirt-gconfig/Makefile.am |3 +
libvirt-gconfig/libvirt-gconfig-helpers.c | 179 +
libvirt-gconfig/libvirt-gconfig-helpers.h | 48
lib
Report an error when trying to parse the current XML document
associated with the GVirConfig object when no document has been
set.
---
libvirt-gconfig/libvirt-gconfig-object.c |8
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/libvirt-gconfig/libvirt-gconfig-object.c
For now, it's read-only, but is exposed as a gobject property too.
---
libvirt-gconfig/libvirt-gconfig-domain.c | 50 ++
libvirt-gconfig/libvirt-gconfig-domain.h |2 +
libvirt-gconfig/libvirt-gconfig.sym |1 +
3 files changed, 53 insertions(+), 0 deletion
Hi,
Here is a set of patches which start to implement functionality to
libvirt-gconfig. The end result is that the "name", "memory" and
"features" properties are implemented for the Domain class. Most of
the work is about reworking the low-level plumbing to make the
implementation as easy as possi
They will be useful in subclasses to access the parsed document,
and to external users needing to directly interact with the
generated XML.
---
libvirt-gconfig/libvirt-gconfig-object.c | 18 ++
libvirt-gconfig/libvirt-gconfig-object.h |2 ++
libvirt-gconfig/libvirt-gconfig.sy
---
libvirt-gconfig/libvirt-gconfig-object.c | 19 +++
libvirt-gconfig/libvirt-gconfig-object.h |2 ++
libvirt-gconfig/libvirt-gconfig.sym |1 +
3 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/libvirt-gconfig/libvirt-gconfig-object.c
b/libvirt-gconfi
---
libvirt-gconfig/libvirt-gconfig-domain.c | 27 +++
libvirt-gconfig/libvirt-gconfig-domain.h |1 +
libvirt-gconfig/libvirt-gconfig.sym |1 +
3 files changed, 29 insertions(+), 0 deletions(-)
diff --git a/libvirt-gconfig/libvirt-gconfig-domain.c
b/libvirt
This property stores the XML node corresponding to the current
configuration object in the XML tree. When creating configuration
objects from a XML string, the XML file will be lazily loaded, and
this property will be set.
---
libvirt-gconfig/libvirt-gconfig-object.c | 35 +++
virsh undefine command can now undefine an active guest, but the help
information is still the old.
This patch modifies it and make it coincident to the manpage of virsh.
Signed-off-by: tangchen
---
tools/virsh.c |6 --
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/tool
On Thu, Oct 06, 2011 at 08:24:10PM +0200, Christophe Fergeau wrote:
> After testing that 'message' is NULL, gvir_error_new_literal
> is using it to build a GError. What was meant was to use
> verr->message.
> ---
> libvirt-glib/libvirt-glib-error.c |2 +-
> 1 files changed, 1 insertions(+), 1
2011/10/7 Eric Blake :
> Adding this for VBox was a bit harder than for ESX, but the same
> principles apply for starting the traversal at a known point
> rather than covering the entire hierarchy.
>
> * src/vbox/vbox_tmpl.c (vboxCountDescendants)
> (vboxDomainSnapshotNumChildren)
> (vboxDomainSnap
On 06.10.2011 20:43, Eric Blake wrote:
> On 10/06/2011 07:41 AM, Michal Privoznik wrote:
>> Don't xdr_free event data as they are freed by our caller
>> virNetClientProgramDispatch.
>> ---
>> src/remote/remote_driver.c |1 -
>> 1 files changed, 0 insertions(+), 1 deletions(-)
>>
>> diff --gi
77 matches
Mail list logo