[libvirt] [PATCH] build: fix build on 32-bit hosts

2014-02-21 Thread Eric Blake
vircgrouptest.c: In function 'testCgroupGetPercpuStats': vircgrouptest.c:543: warning: integer constatnt is too large for 'long' type Signed-off-by: Eric Blake --- Pushing under the build-breaker rule. tests/vircgrouptest.c | 16 1 file changed, 8 insertions(+), 8 deletions(-)

[libvirt] [PATCH] maint: update to latest gnulib, for older autoconf

2014-02-21 Thread Eric Blake
Based on a report from Pavel Hrdina, gnulib was fixed to support AC_PROG_SED even when using ancient autoconf 2.59 of RHEL 5. * .gnulib: Update to latest, to fix build on RHEL 5. Signed-off-by: Eric Blake --- Pushing under the build-breaker rule. * .gnulib 3f51bf4...72fb907 (3): > m4: fix gl

[libvirt] [PATCH 1/2] virsh: use more compact VIR_ENUM_IMPL

2014-02-21 Thread Eric Blake
Dan Berrange suggested that using VIR_ENUM_IMPL is more compact than open-coding switch statements, and still just as forceful at making us remember to update lists if we add enum values in the future. Make this change throughout virsh. Sure enough, doing this change caught that we missed at leas

[libvirt] [PATCH 2/2] virsh: kill over-engineered asprintf failure recovery

2014-02-21 Thread Eric Blake
I noticed this while shortning switch statements via VIR_ENUM. Basically, the only ways virAsprintf can fail are if we pass a bogus format string (but we're not THAT bad) or if we run out of memory (but it already warns on our behalf in that case). Throw away the cruft that tries too hard to diagno

[libvirt] [PATCH 0/2] virsh cleanups

2014-02-21 Thread Eric Blake
Followups written based on review to my 'virsh event' addition. Eric Blake (2): virsh: use more compact VIR_ENUM_IMPL virsh: kill over-engineered asprintf failure recovery tools/virsh-domain-monitor.c | 280 +++--- tools/virsh-domain.c | 347 ++

Re: [libvirt] [PATCH 0/4] Improve logging when QEMU caps fails

2014-02-21 Thread Eric Blake
On 02/21/2014 10:31 AM, Daniel P. Berrange wrote: > This improves the logging when we have a failure to probe > QEMU capabilities for any binary. > > Daniel P. Berrange (4): > Send virLogMetadata fields onto the journal > Include error domain and code in log messages from errors > Add commen

Re: [libvirt] [PATCH 4/4] Generate a unique journald log for QEMU capabilities failure

2014-02-21 Thread Eric Blake
On 02/21/2014 10:31 AM, Daniel P. Berrange wrote: > When probing QEMU capabilities fails for a binary generate a > log message with MESSAGE_ID==8ae2f3fb-2dbe-498e-8fbd-012d40afa361. I'd expect this value to be documented somewhere in the html pages. > > Signed-off-by: Daniel P. Berrange > --- >

Re: [libvirt] [PATCH 3/4] Add comments describing the different log sources

2014-02-21 Thread Eric Blake
On 02/21/2014 10:31 AM, Daniel P. Berrange wrote: > Signed-off-by: Daniel P. Berrange > --- > src/util/virlog.h | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) ACK > > diff --git a/src/util/virlog.h b/src/util/virlog.h > index f400824..6ba2daa 100644 > --- a/src/util/virlog.

Re: [libvirt] [PATCH 1/4] Send virLogMetadata fields onto the journal

2014-02-21 Thread Eric Blake
On 02/21/2014 10:31 AM, Daniel P. Berrange wrote: > The systemd journal accepts arbitrary user specified log > fields. These can be passed into virLogMessage via the > virLogMetadata structure. Allow upto 5 custom fields to s/upto/up to/ > be reported by libvirt callers. > > Signed-off-by: Danie

[libvirt] [PATCH 1/4] Send virLogMetadata fields onto the journal

2014-02-21 Thread Daniel P. Berrange
The systemd journal accepts arbitrary user specified log fields. These can be passed into virLogMessage via the virLogMetadata structure. Allow upto 5 custom fields to be reported by libvirt callers. Signed-off-by: Daniel P. Berrange --- src/util/virlog.c | 18 -- 1 file changed,

[libvirt] [PATCH 0/4] Improve logging when QEMU caps fails

2014-02-21 Thread Daniel P. Berrange
This improves the logging when we have a failure to probe QEMU capabilities for any binary. Daniel P. Berrange (4): Send virLogMetadata fields onto the journal Include error domain and code in log messages from errors Add comments describing the different log sources Generate a unique jour

[libvirt] [PATCH 4/4] Generate a unique journald log for QEMU capabilities failure

2014-02-21 Thread Daniel P. Berrange
When probing QEMU capabilities fails for a binary generate a log message with MESSAGE_ID==8ae2f3fb-2dbe-498e-8fbd-012d40afa361. This can be directly queried from journald based on the UUID instead of needing string grep. This lets tools like libguestfs' bug reporting tool trivially do automated sa

[libvirt] [PATCH 2/4] Include error domain and code in log messages from errors

2014-02-21 Thread Daniel P. Berrange
When a virError is raised, pass the error domain and code onto the systemd journald using metadata fields. This allows error messages to be queried by code eg $ journalctl LIBVIRT_CODE=43 Signed-off-by: Daniel P. Berrange --- src/util/virerror.c | 8 +++- 1 file changed, 7 insertions(+),

[libvirt] [PATCH 3/4] Add comments describing the different log sources

2014-02-21 Thread Daniel P. Berrange
Signed-off-by: Daniel P. Berrange --- src/util/virlog.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/util/virlog.h b/src/util/virlog.h index f400824..6ba2daa 100644 --- a/src/util/virlog.h +++ b/src/util/virlog.h @@ -45,11 +45,11 @@ typedef enum { } virLogDe

Re: [libvirt] [PATCH 2/3] libvirt-guests: Wait for libirtd to initialize

2014-02-21 Thread Eric Blake
On 02/21/2014 05:32 AM, Michal Privoznik wrote: s/libirtd/libvirtd/ in subject > I've noticed that in some cases systemd was quick enough and even > if libvirt-guests.service is marked to be started after the > libvirtd.service my guests were not resumed as > libvirt-guests.sh failed to connect.

Re: [libvirt] [PATCH] XML: Escape double-hyphens in XML comment

2014-02-21 Thread Eric Blake
On 02/21/2014 02:01 AM, Philipp Hahn wrote: > To quote : >> For compatibility, the string "--" (double-hyphen) must not occur within >> comments. > > > +/* > + * Break sequence of hyphens by inserting (arbitrarily chosen) backslashes. > + *

Re: [libvirt] [PATCH 01/10] nwfilter: don't ignore child process failures

2014-02-21 Thread Eric Blake
On 02/21/2014 04:20 AM, Laine Stump wrote: > On 02/20/2014 07:13 AM, Eric Blake wrote: >> While auditing all callers of virCommandRun, I noticed that nwfilter >> code never paid attention to commands with a non-zero status. >> In the cases where status was captured, either the callers required >> t

[libvirt] [PATCHv2 5/7] conf: new function virDomainActualNetDefContentsFormat

2014-02-21 Thread Laine Stump
This function is currently only called from one place, but in a subsequent patch will be called from a 2nd place. The new function exactly replicates the original behavior of the part of virDomainActualNetDefFormat() that it replaces, but takes a virDomainNetDefPtr instead of virDomainActualNetDef

[libvirt] [PATCHv2 6/7] conf: output actual netdev status in XML

2014-02-21 Thread Laine Stump
Until now, the "live" XML status of an device would always show the network information, rather than the exact hardware device that was used. It would also show the name any portgroup the interface belonged to, rather than providing the configuration that was derived from the portgroup. As an exam

[libvirt] ANNOUNCE: libvirt-glib release 0.1.8

2014-02-21 Thread Daniel P. Berrange
I am pleased to announce that a new release of the libvirt-glib package, version 0.1.8, is now available from ftp://libvirt.org/libvirt/glib/ The packages are GPG signed with Key fingerprint: DAF3 A6FD B26B 6291 2D0E 8E3F BE86 EBB4 1510 4FDF (4096R) Changes in this release: - Add gett

Re: [libvirt] Question about building libvirt.so

2014-02-21 Thread Vikhyath Reddy
Thanks for the reply Cedric, wrappers is a dir that I made similar to examples which wraps the libvirt c code. The reason why I am doing this is to simplify the usage of virConnectOpenAuth - it's arguments and callbacks from JavaScript. Using ffi, I am unable to create the right callbacks and h

Re: [libvirt] [PATCH 3/5] Set default lxc security_driver to none

2014-02-21 Thread Cedric Bosdonnat
On Fri, 2014-02-21 at 14:23 +, Daniel P. Berrange wrote: > On Fri, Feb 21, 2014 at 02:57:28PM +0100, Cédric Bosdonnat wrote: > > No security_driver value could cause weird behavior, like using > > apparmor even though we don't want it. > > --- > > src/lxc/lxc.conf | 2 ++ > > 1 file changed, 2

[libvirt] [PATCH 3/5] Set default lxc security_driver to none

2014-02-21 Thread Cédric Bosdonnat
No security_driver value could cause weird behavior, like using apparmor even though we don't want it. --- src/lxc/lxc.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lxc/lxc.conf b/src/lxc/lxc.conf index 8df4601..5eb0122 100644 --- a/src/lxc/lxc.conf +++ b/src/lxc/lxc.conf @@ -20,6

Re: [libvirt] [libvirt-java] [PATCH 45/65] events: handle registration of domain lifecycle events

2014-02-21 Thread Claudio Bley
At Fri, 21 Feb 2014 11:10:22 +, Daniel P. Berrange wrote: > > On Thu, Feb 13, 2014 at 04:22:53PM +0100, Claudio Bley wrote: > > Add LifecycleListener interface which needs to be implemented > > when the user wishes to receive lifecycle change events on domains. > > > > The DomainEvent class r

Re: [libvirt] [PATCH 3/5] Set default lxc security_driver to none

2014-02-21 Thread Daniel P. Berrange
On Fri, Feb 21, 2014 at 02:57:28PM +0100, Cédric Bosdonnat wrote: > No security_driver value could cause weird behavior, like using > apparmor even though we don't want it. > --- > src/lxc/lxc.conf | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/src/lxc/lxc.conf b/src/lxc/lxc.conf > in

[libvirt] [PATCH 5/5] add support for apparmor in lxc-enter-namespace

2014-02-21 Thread Cédric Bosdonnat
--- examples/apparmor/libvirt-lxc | 7 +++ src/libvirt-lxc.c | 13 + 2 files changed, 20 insertions(+) diff --git a/examples/apparmor/libvirt-lxc b/examples/apparmor/libvirt-lxc index 47f27b1..d404328 100644 --- a/examples/apparmor/libvirt-lxc +++ b/examples/apparmor/

[libvirt] [PATCH 0/5] Get AppArmor to work for LXC containers

2014-02-21 Thread Cédric Bosdonnat
This patch series, implements the AppArmor support for LXC containers. examples/apparmor/libvirt-lxc only allows the minimum, users will be able to add more in the generated profile. Cédric Bosdonnat (5): LXC driver: generate apparmor profiles for guests Make sure apparmor is started before li

[libvirt] [PATCH 2/5] Make sure apparmor is started before libvirtd

2014-02-21 Thread Cédric Bosdonnat
If apparmor security driver is enabled in either qemu or lxc driver configuration and libvirtd starts before AppArmor, it will fail. --- daemon/libvirtd.service.in | 1 + 1 file changed, 1 insertion(+) diff --git a/daemon/libvirtd.service.in b/daemon/libvirtd.service.in index dc2433a..b50fca0 100

[libvirt] [PATCH 6/7] conf: output actual netdev status in XML

2014-02-21 Thread Laine Stump
Until now, the "live" XML status of an device would always show the network information, rather than the exact hardware device that was used. It would also show the name any portgroup the interface belonged to, rather than providing the configuration that was derived from the portgroup. As an exam

Re: [libvirt] [PATCH 2/3] rbd: Simplify opening RADOS IoCTX

2014-02-21 Thread Ján Tomko
On 02/12/2014 03:11 PM, Wido den Hollander wrote: > Reduces code and brings logging back to one function. > --- > src/storage/storage_backend_rbd.c | 43 > ++--- > 1 file changed, 16 insertions(+), 27 deletions(-) > > diff --git a/src/storage/storage_backend_rbd

[libvirt] [PATCH 1/5] LXC driver: generate apparmor profiles for guests

2014-02-21 Thread Cédric Bosdonnat
From: Cédric Bosdonnat use_apparmor() was first designed to be called from withing libvirtd, but libvirt_lxc also uses it. in libvirt_lxc, there is no need to check whether to use apparmor or not: just use it if possible. --- examples/apparmor/Makefile.am| 2 ++ examples/apparmor/TEMPLATE

[libvirt] [PATCH 3/7] conf: make virDomainNetDefFormat a public function

2014-02-21 Thread Laine Stump
We will need to call virDomainNetDefFormat() from the network hook (in the network driver). --- src/conf/domain_conf.c | 2 +- src/conf/domain_conf.h | 4 src/libvirt_private.syms | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain

[libvirt] [PATCH 7/7] network: include plugged interface XML in "plugged" network hook

2014-02-21 Thread Laine Stump
The network hook script gets called whenever an interface is plugged into or unplugged from a network, but even though the full XML of both the network and the domain is included, there is no reasonable way to determine what exact resources the plugged interface is using: 1) Prior to a recent patc

[libvirt] [PATCH 4/5] apparmor: add debug traces when changing profile.

2014-02-21 Thread Cédric Bosdonnat
The reason for these is that aa-status doesn't show the process using the profile as they are in another namespace. --- src/security/security_apparmor.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/security/security_apparmor.c b/src/security/security_apparmor.c index 14dc707..1c1b1

[libvirt] [PATCH 0/7] network: include plugged interface XML in "plugged" network hook

2014-02-21 Thread Laine Stump
Although the immediate reason for all these patches is $subject, it really is something that should have been done a long time ago (I just hadn't convinced myself it was the right thing to do). These patches will allow a management application to easily learn exactly what physical hardware is being

[libvirt] [PATCH 4/7] conf: re-situate element in

2014-02-21 Thread Laine Stump
This moves the call to virNetDevBandwidthFormat() in virDomainNetDefFormat() to be called right after the call to virNetDevVPortProfileFormat(), so that a single chunk of that function can be placed inside an if that conditionally calls virDomainActualNetDefContentsFormat() instead (next patch). Th

[libvirt] [PATCH 5/7] conf: new function virDomainActualNetDefContentsFormat

2014-02-21 Thread Laine Stump
This function is currently only called from one place, but in a subsequent patch will be called from a 2nd place. The new function exactly replicates the original behavior of the part of virDomainActualNetDefFormat() that it replaces, but takes a virDomainNetDefPtr instead of virDomainActualNetDef

[libvirt] [PATCH 2/7] conf: handle null pointer in virNetDevVlanFormat

2014-02-21 Thread Laine Stump
Other *Format() functions (e.g. virNetDevBandwidthFormat()) return with no action when called with a NULL *Def pointer. This makes virNetDevVlanFormat() consistent with that behavior. --- src/conf/netdev_vlan_conf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf/n

[libvirt] [PATCH 1/7] conf: clarify what is returned for actual bandwidth and vlan

2014-02-21 Thread Laine Stump
In practice, if a virDomainNetDef has a virDomainActualNetDef allocated, the ActualNetDef will *always* contain the bandwidth and vlan data from the NetDef (unless there was also a portgroup involved - see networkAllocateActualDevice()). However, virDomainNetGetActual(Bandwidth|Vlan)() were coded

Re: [libvirt] [libvirt-java] [PATCH 10/65] Fix wrapping of native size_t data type

2014-02-21 Thread Claudio Bley
At Fri, 21 Feb 2014 10:37:36 +, Daniel P. Berrange wrote: > > On Thu, Feb 13, 2014 at 04:22:18PM +0100, Claudio Bley wrote: > > Libvirt function parameters having type (pointer to) size_t were > > wrapped via JNA using int, long or even NativeLong. Alas, none of > > these is actually correct a

Re: [libvirt] [libvirt-java] [PATCH 07/65] Ignore editor backup files

2014-02-21 Thread Claudio Bley
At Fri, 14 Feb 2014 11:06:12 +0100, Guido Günther wrote: > > On Thu, Feb 13, 2014 at 04:22:15PM +0100, Claudio Bley wrote: > > > > Signed-off-by: Claudio Bley > > --- > > .gitignore |2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/.gitignore b/.gitignore > > index b02fd55..2

Re: [libvirt] [libvirt-java] [PATCH 00/65]

2014-02-21 Thread Claudio Bley
At Fri, 21 Feb 2014 11:19:23 +, Daniel P. Berrange wrote: > > On Thu, Feb 13, 2014 at 04:22:08PM +0100, Claudio Bley wrote: > > Hi. > > > > Here are a few patches that piled up in my local branch. Some of them > > I already submitted to this list, but there has been no reponse to > > them. >

Re: [libvirt] [PATCH 2/3] libvirt-guests: Wait for libirtd to initialize

2014-02-21 Thread Ján Tomko
s/libirtd/libvirtd/ in the subject Jan signature.asc Description: OpenPGP digital signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 2/3] libvirt-guests: Wait for libirtd to initialize

2014-02-21 Thread Daniel P. Berrange
On Fri, Feb 21, 2014 at 02:25:24PM +0100, Michal Privoznik wrote: > On 21.02.2014 13:50, Daniel P. Berrange wrote: > >On Fri, Feb 21, 2014 at 01:32:36PM +0100, Michal Privoznik wrote: > >>I've noticed that in some cases systemd was quick enough and even > >>if libvirt-guests.service is marked to be

Re: [libvirt] [PATCH 2/3] libvirt-guests: Wait for libirtd to initialize

2014-02-21 Thread Michal Privoznik
On 21.02.2014 13:50, Daniel P. Berrange wrote: On Fri, Feb 21, 2014 at 01:32:36PM +0100, Michal Privoznik wrote: I've noticed that in some cases systemd was quick enough and even if libvirt-guests.service is marked to be started after the libvirtd.service my guests were not resumed as libvirt-gu

Re: [libvirt] [PATCH 3/3] virNetServerRun: Notify systemd that we're accepting clients

2014-02-21 Thread Daniel P. Berrange
On Fri, Feb 21, 2014 at 01:32:37PM +0100, Michal Privoznik wrote: > Systemd does not forget about the cases, where client service needs to > wait for daemon service to initialize and start accepting new clients. > Setting a dependency in client is not enough as systemd doesn't know > when the daemo

Re: [libvirt] [PATCH 1/3] virSystemdCreateMachine: Set dependencies for slices

2014-02-21 Thread Daniel P. Berrange
On Fri, Feb 21, 2014 at 01:32:35PM +0100, Michal Privoznik wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1031696 > > When creating a new domain, we let systemd know about it by calling > CreateMachine() function via dbus. Systemd then creates a scope and > places domain into it. However, la

Re: [libvirt] [PATCH 2/3] libvirt-guests: Wait for libirtd to initialize

2014-02-21 Thread Daniel P. Berrange
On Fri, Feb 21, 2014 at 01:32:36PM +0100, Michal Privoznik wrote: > I've noticed that in some cases systemd was quick enough and even > if libvirt-guests.service is marked to be started after the > libvirtd.service my guests were not resumed as > libvirt-guests.sh failed to connect. This is because

[libvirt] [PATCH 3/3] virNetServerRun: Notify systemd that we're accepting clients

2014-02-21 Thread Michal Privoznik
Systemd does not forget about the cases, where client service needs to wait for daemon service to initialize and start accepting new clients. Setting a dependency in client is not enough as systemd doesn't know when the daemon has initialized itself and started accepting new clients. However, it of

[libvirt] [PATCH 2/3] libvirt-guests: Wait for libirtd to initialize

2014-02-21 Thread Michal Privoznik
I've noticed that in some cases systemd was quick enough and even if libvirt-guests.service is marked to be started after the libvirtd.service my guests were not resumed as libvirt-guests.sh failed to connect. This is because of a simple fact: systemd correctly starts libvirt-guests after it execs

[libvirt] [PATCH 0/3] Couple of libvirt-guests fixes

2014-02-21 Thread Michal Privoznik
*** BLURB HERE *** Michal Privoznik (3): virSystemdCreateMachine: Set dependencies for slices libvirt-guests: Wait for libirtd to initialize virNetServerRun: Notify systemd that we're accepting clients configure.ac | 2 ++ daemon/libvirtd.service.in | 1 + m4/virt-systemd-d

[libvirt] [PATCH 1/3] virSystemdCreateMachine: Set dependencies for slices

2014-02-21 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1031696 When creating a new domain, we let systemd know about it by calling CreateMachine() function via dbus. Systemd then creates a scope and places domain into it. However, later when the host is shutting down, systemd computes the shutdown order to s

Re: [libvirt] [libvirt-java] [PATCH 21/65] Remove processError method from NetworkFilter class

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:22:29PM +0100, Claudio Bley wrote: > Wrap any fallible libvirt function in a call to > ErrorHandler.processError(..). > > Also correct wrong javadoc comments stating that methods would return > a value in case an error occurs. > > Signed-off-by: Claudio Bley > --- > s

Re: [libvirt] [libvirt-java] [PATCH 22/65] Remove processError method from Secret class

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:22:30PM +0100, Claudio Bley wrote: > Wrap any fallible libvirt function in a call to > ErrorHandler.processError(..). > > Also correct wrong javadoc comments stating that methods would return > a value in case an error occurs. > > Signed-off-by: Claudio Bley > --- > s

Re: [libvirt] [PATCH glib] Disable test suite unless glib >= 2.38

2014-02-21 Thread Pavel Hrdina
On 20.2.2014 17:24, Daniel P. Berrange wrote: The TAP harness for glib only works with version 2.38 or later, so must be disabled for earlier versions Signed-off-by: Daniel P. Berrange --- ACK Pavel -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/l

Re: [libvirt] [PATCH v2 glib] gobject-stream: fix issue found by coverity

2014-02-21 Thread Pavel Hrdina
On 21.2.2014 12:24, Daniel P. Berrange wrote: On Thu, Feb 20, 2014 at 04:58:21PM +0100, Pavel Hrdina wrote: The coverity server found issue in gvir_stream_close function that we ignore return values of g_input_stream_close and g_output_stream_close, but we also ignore the error message and we as

Re: [libvirt] [PATCH 01/10] nwfilter: don't ignore child process failures

2014-02-21 Thread Laine Stump
On 02/20/2014 07:13 AM, Eric Blake wrote: > While auditing all callers of virCommandRun, I noticed that nwfilter > code never paid attention to commands with a non-zero status. > In the cases where status was captured, either the callers required > that the status was 0, or they discarded any failu

Re: [libvirt] [libvirt-java] [PATCH 00/65]

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:22:08PM +0100, Claudio Bley wrote: > Hi. > > Here are a few patches that piled up in my local branch. Some of them > I already submitted to this list, but there has been no reponse to > them. > > Included are a few trivial fixes as well as memory leak fixes and > additi

Re: [libvirt] [libvirt-java] [PATCH 65/65] Deprecate Connect.getHypervisorVersion

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:23:13PM +0100, Claudio Bley wrote: > In libvirt 0.9.3 this has been changed to simply return the libvirt > version number. > > Signed-off-by: Claudio Bley > --- > src/main/java/org/libvirt/Connect.java | 11 --- > 1 file changed, 8 insertions(+), 3 deletions(

Re: [libvirt] [libvirt-java] [PATCH 56/65] Implement Domain.PMwakeup

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:23:04PM +0100, Claudio Bley wrote: > This wraps the virDomainPMWakeup libvirt function available since > version 0.9.11. > > Signed-off-by: Claudio Bley > --- > src/main/java/org/libvirt/Domain.java| 27 > ++ > src/main/java/org/libvi

Re: [libvirt] [PATCH] XML: Escape double-hyphens in XML comment

2014-02-21 Thread Philipp Hahn
On 21.02.2014 12:18, Ján Tomko wrote: > This no longer reproduces with current master, it has been fixed by either of: > commit 0b121614a2086a8e66ae1f004fe912ba7c1d8a75 > Author: Ján Tomko > CommitDate: 2012-10-29 14:38:43 +0100 > > xml: print uuids in the warning > > commit 9b704ab8235a

Re: [libvirt] [libvirt-java] [PATCH 51/65] Implement Domain.blockPeek

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:22:59PM +0100, Claudio Bley wrote: > This wraps the virDomainBlockPeek libvirt function, available since > version 0.4.5. > > Signed-off-by: Claudio Bley > --- > src/main/java/org/libvirt/Domain.java | 53 > > src/main/java/org/libv

Re: [libvirt] [PATCH v12 01/11] change used_by: specify both driver and domain

2014-02-21 Thread Daniel P. Berrange
On Mon, Feb 17, 2014 at 09:31:36AM +0100, Cedric Bosdonnat wrote: > > diff --git a/src/util/virpci.c b/src/util/virpci.c > > index 00d1064..4ea2bcf 100644 > > --- a/src/util/virpci.c > > +++ b/src/util/virpci.c > > @@ -59,7 +59,10 @@ struct _virPCIDevice { > > char name[PCI_ADDR_LEN];

Re: [libvirt] [libvirt-java] [PATCH 00/65]

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:22:08PM +0100, Claudio Bley wrote: > Hi. > > Here are a few patches that piled up in my local branch. Some of them > I already submitted to this list, but there has been no reponse to > them. > > Included are a few trivial fixes as well as memory leak fixes and > additi

Re: [libvirt] [libvirt-java] [PATCH 57/65] Implement Domain.sendKey

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:23:05PM +0100, Claudio Bley wrote: > This wraps the virDomainSendKey libvirt function available since version > 0.9.3. > > Signed-off-by: Claudio Bley > --- > src/main/java/org/libvirt/Domain.java | 12 > src/main/java/org/libvirt/KeycodeSet.java | 4

Re: [libvirt] [libvirt-java] [PATCH 61/65] Add helper for handling bit-flags

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:23:09PM +0100, Claudio Bley wrote: > > Signed-off-by: Claudio Bley > --- > src/main/java/org/libvirt/BitFlags.java | 18 ++ > 1 file changed, 18 insertions(+) > create mode 100644 src/main/java/org/libvirt/BitFlags.java ACK Regards, Daniel -- |: ht

Re: [libvirt] [PATCH v2 glib] gobject-stream: fix issue found by coverity

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 20, 2014 at 04:58:21PM +0100, Pavel Hrdina wrote: > The coverity server found issue in gvir_stream_close function that > we ignore return values of g_input_stream_close and > g_output_stream_close, but we also ignore the error message and we > assume that it's closed without error. > >

Re: [libvirt] [libvirt-java] [PATCH 64/65] Replace static connectionVersion method with getLibVersion

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:23:12PM +0100, Claudio Bley wrote: > Since the libvirt version information is a property of an *instance* of a > connnection, the method to retrieve this information should not be static. > > Deprecate its use and recommend using aConnect.getLibVersion instead. > > Sign

Re: [libvirt] [libvirt-java] [PATCH 37/65] Implement Connect.isAlive

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:22:45PM +0100, Claudio Bley wrote: > This wraps the virConnectIsAlive libvirt function available since > version 0.9.8. > > Signed-off-by: Claudio Bley > --- > src/main/java/org/libvirt/Connect.java | 12 > src/main/java/org/libvirt/jna/Libvirt.

Re: [libvirt] [libvirt-java] [PATCH 63/65] Replace Connect.getLibVirVersion method with Library.getVersion

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:23:11PM +0100, Claudio Bley wrote: > It should not be necessary to create a Connect object in order to > determine the version of the libvirt library. > > Introduce Library.getVersion which returns this information. > > Deprecate Connect.getLibVirVersion but keep it for

Re: [libvirt] [PATCH] XML: Escape double-hyphens in XML comment

2014-02-21 Thread Ján Tomko
On 02/21/2014 10:01 AM, Philipp Hahn wrote: > To quote : >> For compatibility, the string "--" (double-hyphen) must not occur within >> comments. > > For example this breaks creating snapshots: > $ virsh snapshot-create-as $VM "comment--bug" > $ xmllint

Re: [libvirt] [libvirt-java] [PATCH 62/65] Connect: add constructors using java.net.URI params

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:23:10PM +0100, Claudio Bley wrote: > Additionally, add an OpenFlags enum to the Connect classes which > implements the BitFlags interface. > > This should be used when creating a read-only connection or > to prevent using URI aliases. > > Signed-off-by: Claudio Bley >

Re: [libvirt] [libvirt-java] [PATCH 54/65] Implement Domain.isUpdated

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:23:02PM +0100, Claudio Bley wrote: > This wraps the virDomainIsUpdated libvirt function available since version > 0.8.6. > > Signed-off-by: Claudio Bley > --- > src/main/java/org/libvirt/Domain.java |8 > src/main/java/org/libvirt/jna/Libvirt.java |

Re: [libvirt] [libvirt-java] [PATCH 47/65] events: handle registration for PMWakeup events

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:22:55PM +0100, Claudio Bley wrote: > > Signed-off-by: Claudio Bley > --- > src/main/java/org/libvirt/Connect.java | 57 > > src/main/java/org/libvirt/Domain.java | 20 +++ > .../java/org/libvirt/event/PMWakeupListe

Re: [libvirt] [libvirt-java] [PATCH 58/65] Implement interface ByteChannel for Stream class

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:23:06PM +0100, Claudio Bley wrote: > This makes the Stream class a native citizen of the Java API. > > It can be used with the NIO Channel API, as well as (In,Out)putStream's > using the java.nio.channels.Channels convenience wrappers. > > Signed-off-by: Claudio Bley >

Re: [libvirt] [libvirt-java] [PATCH 42/65] Add constructIncRef factory method to Domain class

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:22:50PM +0100, Claudio Bley wrote: > This method constructs a new Domain class instance while > increasing the reference count on the virDomainPtr in > order to make sure the Domain object "owns" the given > virDomainPtr. > > Signed-off-by: Claudio Bley > --- > src/mai

Re: [libvirt] [libvirt-java] [PATCH 60/65] test: add testDomainScreenshot JUnit test

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:23:08PM +0100, Claudio Bley wrote: > > Signed-off-by: Claudio Bley > --- > src/test/java/org/libvirt/TestJavaBindings.java | 44 > +++ > 1 file changed, 44 insertions(+) ACK Regards, Daniel -- |: http://berrange.com -o-http://www.flic

Re: [libvirt] [libvirt-java] [PATCH 59/65] Implement Domain.screenshot

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:23:07PM +0100, Claudio Bley wrote: > This wraps the native virDomainScreenshot libvirt function available > since version 0.9.2. > > Signed-off-by: Claudio Bley > --- > src/main/java/org/libvirt/Domain.java | 10 ++ > src/main/java/org/libvirt/Stream.jav

Re: [libvirt] [libvirt-java] [PATCH 55/65] Implement Domain.reset

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:23:03PM +0100, Claudio Bley wrote: > This wraps the virDomainReset libvirt function available since > version 0.9.7. > > Signed-off-by: Claudio Bley > --- > src/main/java/org/libvirt/Domain.java |7 +++ > src/main/java/org/libvirt/jna/Libvirt.java |1 +

Re: [libvirt] [libvirt-java] [PATCH 52/65] Implement Domain.memoryPeek

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:23:00PM +0100, Claudio Bley wrote: > This wraps the virDomainMemoryPeek libvirt function, available since > version 0.4.5. > > Signed-off-by: Claudio Bley > --- > src/main/java/org/libvirt/Domain.java| 40 > ++ > src/main/java/org/lib

Re: [libvirt] [libvirt-java] [PATCH 50/65] Implement Connect.getSysinfo

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:22:58PM +0100, Claudio Bley wrote: > This wraps the virConnectGetSysinfo function available since libvirt > version 0.8.8. > > Signed-off-by: Claudio Bley > --- > src/main/java/org/libvirt/Connect.java | 21 + > src/main/java/org/libvirt/jna/L

Re: [libvirt] [libvirt-java] [PATCH 53/65] Implement Secret.getUsageType

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:23:01PM +0100, Claudio Bley wrote: > This wraps the virSecretGetUsageType libvirt function available since > version 0.7.1. > > Signed-off-by: Claudio Bley > --- > src/main/java/org/libvirt/Secret.java |5 + > src/main/java/org/libvirt/SecretUsageType.

Re: [libvirt] [libvirt-java] [PATCH 48/65] events: add support for PMSuspend events

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:22:56PM +0100, Claudio Bley wrote: > > Signed-off-by: Claudio Bley > --- > src/main/java/org/libvirt/Connect.java | 59 > > src/main/java/org/libvirt/Domain.java | 20 +++ > .../java/org/libvirt/event/PMSuspendList

Re: [libvirt] [libvirt-java] [PATCH 39/65] Introduce event loop support

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:22:47PM +0100, Claudio Bley wrote: > Add initEventLoop(), processEvent(), runEventLoop() and stopEventLoop() > static methods to the Library class. > > Signed-off-by: Claudio Bley > --- > src/main/java/org/libvirt/Library.java | 91 >

Re: [libvirt] [libvirt-java] [PATCH 45/65] events: handle registration of domain lifecycle events

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:22:53PM +0100, Claudio Bley wrote: > Add LifecycleListener interface which needs to be implemented > when the user wishes to receive lifecycle change events on domains. > > The DomainEvent class represents the kind of event that > occurred including details on that event

Re: [libvirt] [libvirt-java] [PATCH 46/65] test: add unit test for domain lifecycle events

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:22:54PM +0100, Claudio Bley wrote: > Signed-off-by: Claudio Bley > --- > src/test/java/org/libvirt/TestJavaBindings.java | 69 > +++ > 1 file changed, 69 insertions(+) ACK Regards, Daniel -- |: http://berrange.com -o-http://www.flickr.c

Re: [libvirt] [libvirt-java] [PATCH 49/65] Implement connection close callback support

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:22:57PM +0100, Claudio Bley wrote: > There can only be a single connection close listener registered > per connection object. > > Signed-off-by: Claudio Bley > --- > src/main/java/org/libvirt/Connect.java | 57 > > src/main/java/org/

Re: [libvirt] [libvirt-java] [PATCH 34/65] Fix memleak in StorageVol.getPath

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:22:42PM +0100, Claudio Bley wrote: > > Signed-off-by: Claudio Bley > --- > src/main/java/org/libvirt/StorageVol.java | 10 +- > src/main/java/org/libvirt/jna/Libvirt.java |2 +- > 2 files changed, 10 insertions(+), 2 deletions(-) ACK Regards, Daniel --

Re: [libvirt] [libvirt-java] [PATCH 44/65] events: handle registration for Reboot events

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:22:52PM +0100, Claudio Bley wrote: > Add RebootListener interface in package org.libvirt.event and > implement addRebootListener methods in classes Domain and Connect. > > Add removeRebootListener to Connect class. > > Signed-off-by: Claudio Bley > --- > src/main/java

Re: [libvirt] [libvirt-java] [PATCH 43/65] events: handle registration for IOError events

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:22:51PM +0100, Claudio Bley wrote: > Add IOErrorActionListener and IOErrorAction enum which is handed to the > onIOError callback method when an IO error event occurs. > > Signed-off-by: Claudio Bley > --- > src/main/java/org/libvirt/Connect.java | 59 >

Re: [libvirt] [libvirt-java] [PATCH 41/65] Prepare to define proper domain event callback support

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:22:49PM +0100, Claudio Bley wrote: > Remove the public domainEventRegisterAny and domainEventDeregisterAny > methods. These methods basically were of no use since the only thing you > could register was a "generic" callback. > > At runtime, you would have to provide a re

Re: [libvirt] [libvirt-java] [PATCH 36/65] jna: Wrap the virEvent(Add, Remove)Timeout libvirt functions

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:22:44PM +0100, Claudio Bley wrote: > These functions are not (yet) exposed in the public org.libvirt > package but only used internally. > > Signed-off-by: Claudio Bley > --- > src/main/java/org/libvirt/jna/Libvirt.java | 11 +++ > 1 file changed, 11 insertio

Re: [libvirt] [libvirt-java] [PATCH 33/65] Fix memleak in DomainSnapshot.getXMLDesc

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:22:41PM +0100, Claudio Bley wrote: > > Signed-off-by: Claudio Bley > --- > src/main/java/org/libvirt/DomainSnapshot.java | 10 +- > src/main/java/org/libvirt/jna/Libvirt.java|2 +- > 2 files changed, 10 insertions(+), 2 deletions(-) ACK Regards, Dan

Re: [libvirt] [libvirt-java] [PATCH 40/65] Add constants for enum virDomainEventID

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:22:48PM +0100, Claudio Bley wrote: > Note: these are only used internally. > > Signed-off-by: Claudio Bley > --- > src/main/java/org/libvirt/Connect.java | 20 > 1 file changed, 20 insertions(+) ACK Regards, Daniel -- |: http://berrange.com

Re: [libvirt] [libvirt-java] [PATCH 38/65] Implement Connect.setKeepAlive

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:22:46PM +0100, Claudio Bley wrote: > This wraps the virConnectSetKeepAlive libvirt function available since > version 0.9.8. > > Signed-off-by: Claudio Bley > --- > src/main/java/org/libvirt/Connect.java | 34 > > src/main/java/org/l

Re: [libvirt] [libvirt-java] [PATCH 31/65] Fix memleak in Domain.snapshotListNames

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:22:39PM +0100, Claudio Bley wrote: > We need to free the char* entries of the result array returned ourselves. > > Signed-off-by: Claudio Bley > --- > src/main/java/org/libvirt/Domain.java | 14 +++--- > src/main/java/org/libvirt/jna/Libvirt.java |2

Re: [libvirt] [libvirt-java] [PATCH 26/65] Remove processError method from Connect class

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:22:34PM +0100, Claudio Bley wrote: > Wrap any fallible libvirt function in a call to > ErrorHandler.processError(..) and remove calls to the deprecated > ErrorHandler.processError(Libvirt) method. > > Also correct wrong javadoc comments stating that methods would return

Re: [libvirt] [PATCH] make virDomainGetMaxVcpus work on inactive domains

2014-02-21 Thread Claudio Bley
At Thu, 20 Feb 2014 12:19:35 -0700, Jim Fehlig wrote: > > Claudio Bley wrote: > > Signed-off-by: Claudio Bley > > --- > > OK, how about this patch? > > > > While at it, should I convert the VIR_DOMAIN_VCPU_* instances to > > VIR_DOMAIN_AFFECT_* instances for consistency? > > > > src/esx/esx_driv

Re: [libvirt] [libvirt-java] [PATCH 35/65] Fix memleak in StorageVol.getXMLDesc

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:22:43PM +0100, Claudio Bley wrote: > > Signed-off-by: Claudio Bley > --- > src/main/java/org/libvirt/StorageVol.java |8 +++- > src/main/java/org/libvirt/jna/Libvirt.java |2 +- > 2 files changed, 8 insertions(+), 2 deletions(-) ACK Regards, Daniel -- |:

Re: [libvirt] [libvirt-java] [PATCH 32/65] Fix memleak in StoragePool.listVolumes

2014-02-21 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 04:22:40PM +0100, Claudio Bley wrote: > We need to free the char* entries of the result array returned > ourselves. > > Signed-off-by: Claudio Bley > --- > src/main/java/org/libvirt/StoragePool.java | 13 ++--- > src/main/java/org/libvirt/jna/Libvirt.java |2

  1   2   >