Re: [libvirt] [PATCH] qemu: escape ipv6 for rbd network disk hosts

2013-01-23 Thread Osier Yang
On 2013年01月24日 10:15, Josh Durgin wrote: Hosts for rbd are ceph monitor daemons. These have fixed IP addresses, so they are often referenced by IP rather than hostname for convenience, or to avoid relying on DNS. Using IPv4 addresses as the host name works already, but IPv6 addresses require rbd-

Re: [libvirt] [PATCH] qemu: don't share kerberos caches between domains

2013-01-23 Thread Osier Yang
On 2013年01月24日 09:26, Eric Blake wrote: https://bugzilla.redhat.com/show_bug.cgi?id=718377 complains that there were some SELinux AVCs when using vnc console over Kerberos. The root problem was that Kerberos tries to set up a cache file, and if we don't tell it where, then all domains use the sa

Re: [libvirt] [PATCH] snapshot: fix state after external snapshot of S3 domain

2013-01-23 Thread Osier Yang
On 2013年01月24日 07:27, Eric Blake wrote: https://bugzilla.redhat.com/show_bug.cgi?id=876829 complains that if a guest is put into S3 state (such as via virsh dompmsuspend) and then an external snapshot is taken, qemu forcefully transitions the domain to paused, but libvirt doesn't reflect that cha

Re: [libvirt] [PATCH] conf: avoid NULL deref for pmsuspended domain state

2013-01-23 Thread Osier Yang
On 2013年01月24日 08:12, Eric Blake wrote: While working with a pmsuspend vs. snapshot issue, I noticed that the state file in /var/run/libvirt/qemu/dom.xml contained a rather suspicious "(null)" string, which does not round-trip well through a libvirtd restart. Had I been on a platform other than

[libvirt] [PATCH] qemu: escape ipv6 for rbd network disk hosts

2013-01-23 Thread Josh Durgin
Hosts for rbd are ceph monitor daemons. These have fixed IP addresses, so they are often referenced by IP rather than hostname for convenience, or to avoid relying on DNS. Using IPv4 addresses as the host name works already, but IPv6 addresses require rbd-specific escaping because the colon is used

[libvirt] [PATCH] qemu: don't share kerberos caches between domains

2013-01-23 Thread Eric Blake
https://bugzilla.redhat.com/show_bug.cgi?id=718377 complains that there were some SELinux AVCs when using vnc console over Kerberos. The root problem was that Kerberos tries to set up a cache file, and if we don't tell it where, then all domains use the same cache file, which violates sVirt protec

[libvirt] [PATCH 2/1] maint: make it easier to sort syms files

2013-01-23 Thread Eric Blake
I got bit by 'make check' complaining that the sort order I got by emacs' sort-lines function differed from expectations. * src/libvirt_private.syms: Add emacs trailer. --- Okay to push this as well? My previous patch mistakenly did this: > +++ b/src/libvirt_private.syms > @@ -487,10 +487,12 @@

[libvirt] [PATCH 0/2] Resolve Coverity issues in vbox_tmpl.c

2013-01-23 Thread John Ferlan
This pair of patches resolves what amount to false positives in the vbox_tmpl.c code relating to attempts to dereference NULL in the 2002 VBOX_API_VERSION call to 'vboxIIDFromUUID()'. It also removes "false postives" from the various VBOX_UTF*_FREE() macros. Some code paths checked if the arg was v

[libvirt] [PATCH 2/2] vbox: Adjust the UTF FREE macros

2013-01-23 Thread John Ferlan
Adjust the macros to free memory allocated during various calls to perform the check if parameter is NULL prior to really freeing and to set the pointer to NULL after done freeing. --- src/vbox/vbox_tmpl.c | 76 +--- 1 file changed, 37 insertions(+),

[libvirt] [PATCH 1/2] vbox: Address false positive for NULL dereference

2013-01-23 Thread John Ferlan
Resolve a false positive from 'vboxIIDFromUUID_v2_x()'. The code sets 'iid->value = &iid->backing' unconditionally prior to calling 'nsIDFromChar()'. The 'vboxIIDUnalloc_v2_x()' checks iid->value to not be &iid->backing. The iid->backing is a static buffer within the initialized structure. --- src

Re: [libvirt] [PATCH] auto-create pci-bridge controller info

2013-01-23 Thread li guang
在 2013-01-23三的 10:05 +,Daniel P. Berrange写道: > On Wed, Jan 23, 2013 at 09:45:20AM +0800, liguang wrote: > > if some devices specify a pci bus number that > > haven't been defined by a pci-bridge controller > > then fill the required correct controller info > > silently. > > it based on previous

[libvirt] [PATCH] conf: avoid NULL deref for pmsuspended domain state

2013-01-23 Thread Eric Blake
While working with a pmsuspend vs. snapshot issue, I noticed that the state file in /var/run/libvirt/qemu/dom.xml contained a rather suspicious "(null)" string, which does not round-trip well through a libvirtd restart. Had I been on a platform other than glibc where printf("%s",NULL) crashes inst

[libvirt] [PATCH] snapshot: fix state after external snapshot of S3 domain

2013-01-23 Thread Eric Blake
https://bugzilla.redhat.com/show_bug.cgi?id=876829 complains that if a guest is put into S3 state (such as via virsh dompmsuspend) and then an external snapshot is taken, qemu forcefully transitions the domain to paused, but libvirt doesn't reflect that change internally. Thus, a user has to use '

Re: [libvirt] [PATCH] S390: Enhance memballoon handling for virtio-s390

2013-01-23 Thread Eric Blake
On 01/11/2013 08:30 AM, Viktor Mihajlovski wrote: > The way in that memory balloon suppression was handled for S390 > is flawed for a number or reasons. > 1. Just preventing the default balloon to be created in the case >of VIR_ARCH_S390[X] is not sufficient. An explicit memballoon >element

[libvirt] [PATCH 5/5] parallels_utils: Check return status properly from virCommandRun()

2013-01-23 Thread John Ferlan
--- src/parallels/parallels_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parallels/parallels_utils.c b/src/parallels/parallels_utils.c index dd2f0b7..171f5d0 100644 --- a/src/parallels/parallels_utils.c +++ b/src/parallels/parallels_utils.c @@ -42,7 +42,7 @@ para

[libvirt] [PATCH 2/5] security: Need to add virCommandFree()

2013-01-23 Thread John Ferlan
--- src/security/security_apparmor.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/security/security_apparmor.c b/src/security/security_apparmor.c index 7331c91..6dcf6be 100644 --- a/src/security/security_apparmor.c +++ b/src/security/security_apparmor.c @@ -201,6 +201,7 @@ load_profile(

[libvirt] [PATCH 1/5] parallels: Resolve some resource leaks

2013-01-23 Thread John Ferlan
Be sure to VIR_FREE(accel) and moved virDomainVideoDefFree() within no_memory label to be consistent Resolve resource leak in parallelsApplyIfaceParams() when the 'oldnet' is allocated locally. Also virCommandFree(cmd) as necessary. --- src/parallels/parallels_driver.c | 47 ++

[libvirt] [PATCH 0/5] Resolve parallels and virCommandPtr resource leaks

2013-01-23 Thread John Ferlan
This is v3 of the parallels_driver.c changes. The most recent review pointed out that virCommandPtr's need to be free'd. I found a few other instances where they weren't free'd. I also found a few instances where the status check from virCommandRun was not < 0 and cleaned them to be more consisten

Re: [libvirt] [PATCH] qemu: Move one misplaced driver unlock to the right function

2013-01-23 Thread Eric Blake
On 01/23/2013 06:24 AM, Viktor Mihajlovski wrote: > On 01/18/2013 06:21 PM, Eric Blake wrote: >>> Yuck. You _still_ haven't fixed DomainHasManagedSaveImage (which >>> 8c5d2ba claimed to fix), and we've found yet another bogus commit. We >>> need a v2 of this patch that scrubs ALL of the bugs at o

[libvirt] [PATCH 4/5] util: Need to add virCommandFree()

2013-01-23 Thread John Ferlan
--- src/util/virnetdevopenvswitch.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util/virnetdevopenvswitch.c b/src/util/virnetdevopenvswitch.c index 47c3db8..4fe077a 100644 --- a/src/util/virnetdevopenvswitch.c +++ b/src/util/virnetdevopenvswitch.c @@ -211,6 +211,7 @@ int virNetDevOpe

[libvirt] [PATCH 3/5] storage: Need to add virCommandFree()

2013-01-23 Thread John Ferlan
--- src/storage/storage_backend_fs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c index 21589a6..a582804 100644 --- a/src/storage/storage_backend_fs.c +++ b/src/storage/storage_backend_fs.c @@ -648,6 +648,8 @@ virStorageB

Re: [libvirt] [PATCHv2] qemu: Re-add driver unlock to qemuDomainSendKey

2013-01-23 Thread Eric Blake
On 01/23/2013 06:55 AM, Viktor Mihajlovski wrote: > Should have been done in commit 56fd513 already, but was missed > due to oversight: qemuDomainSendKey didn't release the driver lock > in its cleanup section. This fixes an issue introduced by commit > 8c5d2ba. > > Signed-off-by: Viktor Mihajlovs

Re: [libvirt] [PATCH v2] selinux: Only create the selabel_handle once.

2013-01-23 Thread Daniel P. Berrange
On Wed, Jan 23, 2013 at 08:39:05PM +, Richard W.M. Jones wrote: > On Wed, Jan 23, 2013 at 08:35:13PM +, Daniel P. Berrange wrote: > > On Wed, Jan 23, 2013 at 08:33:55PM +, Richard W.M. Jones wrote: > > > From: "Richard W.M. Jones" > > > > > > According to Eric Paris this is slightly m

Re: [libvirt] [PATCH v2] selinux: Only create the selabel_handle once.

2013-01-23 Thread Richard W.M. Jones
On Wed, Jan 23, 2013 at 08:35:13PM +, Daniel P. Berrange wrote: > On Wed, Jan 23, 2013 at 08:33:55PM +, Richard W.M. Jones wrote: > > From: "Richard W.M. Jones" > > > > According to Eric Paris this is slightly more efficient because it > > only loads the regular expressions in libselinux

Re: [libvirt] [PATCH v2] selinux: Only create the selabel_handle once.

2013-01-23 Thread Daniel P. Berrange
On Wed, Jan 23, 2013 at 08:33:55PM +, Richard W.M. Jones wrote: > From: "Richard W.M. Jones" > > According to Eric Paris this is slightly more efficient because it > only loads the regular expressions in libselinux once. > --- > src/security/security_selinux.c | 24 +--- >

Re: [libvirt] [PATCH] selinux: Only create the selabel_handle once.

2013-01-23 Thread Daniel P. Berrange
On Wed, Jan 23, 2013 at 08:12:25PM +, Richard W.M. Jones wrote: > From: "Richard W.M. Jones" > > According to Eric Paris this is slightly more efficient because it > only loads the regular expressions in libselinux once. > --- > src/security/security_selinux.c | 20 +--- > 1

[libvirt] [PATCH v2] selinux: Only create the selabel_handle once.

2013-01-23 Thread Richard W.M. Jones
From: "Richard W.M. Jones" According to Eric Paris this is slightly more efficient because it only loads the regular expressions in libselinux once. --- src/security/security_selinux.c | 24 +--- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/src/security/secu

Re: [libvirt] [PATCH] selinux: Only create the selabel_handle once.

2013-01-23 Thread Richard W.M. Jones
On Wed, Jan 23, 2013 at 01:20:48PM -0700, Eric Blake wrote: > On 01/23/2013 01:12 PM, Richard W.M. Jones wrote: > > +#if HAVE_SELINUX_LABEL_H > > +static struct selabel_handle *sehandle = NULL; > > +static virOnceControl sehandleonce = VIR_ONCE_CONTROL_INITIALIZER; > > Rather than open-coding thi

Re: [libvirt] [PATCH] selinux: Only create the selabel_handle once.

2013-01-23 Thread Eric Blake
On 01/23/2013 01:12 PM, Richard W.M. Jones wrote: > From: "Richard W.M. Jones" > > According to Eric Paris this is slightly more efficient because it > only loads the regular expressions in libselinux once. The idea seems reasonable, but I think the patch deserves a v2 for implementation reasons

[libvirt] Network stops with CentOS 6.3 guest on Ubuntu 12.10

2013-01-23 Thread Andy Howell
I'm still have not resolved this, any idea how to debug it? Thanks, Andy Hello, I'm trying to get CentOS 6.3 running under Ubuntu 12.10. When the interface comes up, I can ping another machine for 9 packets. After that it stops working. Bouncing the guest network interface gets it g

[libvirt] [PATCH] selinux: Only create the selabel_handle once.

2013-01-23 Thread Richard W.M. Jones
From: "Richard W.M. Jones" According to Eric Paris this is slightly more efficient because it only loads the regular expressions in libselinux once. --- src/security/security_selinux.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/security/security

Re: [libvirt] [PATCH] Ensure nodeinfo struct is initialized to zero

2013-01-23 Thread Daniel P. Berrange
On Wed, Jan 23, 2013 at 11:18:04AM -0700, Eric Blake wrote: > On 01/23/2013 11:13 AM, Daniel P. Berrange wrote: > > On Wed, Jan 23, 2013 at 11:12:03AM -0700, Eric Blake wrote: > >> On 01/23/2013 11:02 AM, Richard W.M. Jones wrote: > >>> On Wed, Jan 23, 2013 at 05:06:35PM +, Daniel P. Berrange w

Re: [libvirt] [PATCH] Ensure nodeinfo struct is initialized to zero

2013-01-23 Thread Eric Blake
On 01/23/2013 11:13 AM, Daniel P. Berrange wrote: > On Wed, Jan 23, 2013 at 11:12:03AM -0700, Eric Blake wrote: >> On 01/23/2013 11:02 AM, Richard W.M. Jones wrote: >>> On Wed, Jan 23, 2013 at 05:06:35PM +, Daniel P. Berrange wrote: > +memset(nodeinfo, 0, sizeof(nodeinfo)); > +

Re: [libvirt] [PATCH] Ensure nodeinfo struct is initialized to zero

2013-01-23 Thread Daniel P. Berrange
On Wed, Jan 23, 2013 at 11:12:03AM -0700, Eric Blake wrote: > On 01/23/2013 11:02 AM, Richard W.M. Jones wrote: > > On Wed, Jan 23, 2013 at 05:06:35PM +, Daniel P. Berrange wrote: > >>> +memset(nodeinfo, 0, sizeof(nodeinfo)); > >>> + > >> > >> Of course i meant sizeof(*nodeinfo) > > > >

Re: [libvirt] [PATCH] Ensure nodeinfo struct is initialized to zero

2013-01-23 Thread Eric Blake
On 01/23/2013 11:02 AM, Richard W.M. Jones wrote: > On Wed, Jan 23, 2013 at 05:06:35PM +, Daniel P. Berrange wrote: >>> +memset(nodeinfo, 0, sizeof(nodeinfo)); >>> + >> >> Of course i meant sizeof(*nodeinfo) > > Yikes. Doesn't libvirt have some type of VIR_* macro to either catch > that

Re: [libvirt] [PATCH] Ensure nodeinfo struct is initialized to zero

2013-01-23 Thread Daniel P. Berrange
On Wed, Jan 23, 2013 at 06:02:59PM +, Richard W.M. Jones wrote: > On Wed, Jan 23, 2013 at 05:06:35PM +, Daniel P. Berrange wrote: > > > +memset(nodeinfo, 0, sizeof(nodeinfo)); > > > + > > > > Of course i meant sizeof(*nodeinfo) > > Yikes. Doesn't libvirt have some type of VIR_* mac

Re: [libvirt] [PATCH] Avoid use of free'd memory in auto destroy callback

2013-01-23 Thread Richard W.M. Jones
On Wed, Jan 23, 2013 at 05:25:32PM +, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > The autodestroy callback code has the following function > called from a hash iterator > > qemuDriverCloseCallbackRun(void *payload, > const void *name, >

Re: [libvirt] [PATCH] Ensure nodeinfo struct is initialized to zero

2013-01-23 Thread Richard W.M. Jones
On Wed, Jan 23, 2013 at 05:06:35PM +, Daniel P. Berrange wrote: > > +memset(nodeinfo, 0, sizeof(nodeinfo)); > > + > > Of course i meant sizeof(*nodeinfo) Yikes. Doesn't libvirt have some type of VIR_* macro to either catch that error systematically or to allocate pre-cleared memory? R

Re: [libvirt] [PATCH] Fix leak of securityDriverNames

2013-01-23 Thread Eric Blake
On 01/23/2013 10:42 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > When shutting down, the QEMU driver forgot to free the > securityDriverNames string list > > Signed-off-by: Daniel P. Berrange > --- > src/qemu/qemu_driver.c | 3 +++ > 1 file changed, 3 insertions(+) ACK. >

Re: [libvirt] [PATCH] Avoid use of free'd memory in auto destroy callback

2013-01-23 Thread Eric Blake
On 01/23/2013 10:25 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > The autodestroy callback code has the following function > called from a hash iterator > > qemuDriverCloseCallbackRun(void *payload, > const void *name, >

[libvirt] [PATCH] Fix leak of securityDriverNames

2013-01-23 Thread Daniel P. Berrange
From: "Daniel P. Berrange" When shutting down, the QEMU driver forgot to free the securityDriverNames string list Signed-off-by: Daniel P. Berrange --- src/qemu/qemu_driver.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 72907d2..b

Re: [libvirt] ssh not working with libvirt

2013-01-23 Thread Eric Blake
On 01/23/2013 09:41 AM, varun bhatnagar wrote: > Hi, > > I am having issue while doing *ssh* to a virtual node through libvirt. The > nodes's ip address is 192.168.82.1. When I am giving the command it is > giving the following error message: > > *virsh# connect vbox+ssh://192.168.82.1/session* >

[libvirt] [PATCH] Avoid use of free'd memory in auto destroy callback

2013-01-23 Thread Daniel P. Berrange
From: "Daniel P. Berrange" The autodestroy callback code has the following function called from a hash iterator qemuDriverCloseCallbackRun(void *payload, const void *name, void *opaque) { ... char *uuidstr = name ...

Re: [libvirt] [PATCH] Ensure nodeinfo struct is initialized to zero

2013-01-23 Thread Daniel P. Berrange
On Wed, Jan 23, 2013 at 03:45:01PM +, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > When linuxNodeInfoCPUPopulate() method triggered use of an > uninitialize value, since it did not initialize the 'sockets' > field in the virNodeInfoPtr struct: > > ==30020== Conditional jump or

[libvirt] Non-blocking virStreamRecv always returns -2 (EAGAIN)?

2013-01-23 Thread John Eckersberg
I'm running the following test program, and it works as written with a blocking stream. Inside the guest I'm running: [root@f17-minimal ~]# socat /usr/share/dict/words /dev/virtio-ports/org.libguestfs.channel.0 As expected on the client side, I get all the words dumped. However if I swap the v

Re: [libvirt] [PATCH] Ensure nodeinfo struct is initialized to zero

2013-01-23 Thread Richard W.M. Jones
On Wed, Jan 23, 2013 at 03:45:01PM +, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > When linuxNodeInfoCPUPopulate() method triggered use of an > uninitialize value, since it did not initialize the 'sockets' > field in the virNodeInfoPtr struct: > > ==30020== Conditional jump or

Re: [libvirt] [PATCH] Ensure nodeinfo struct is initialized to zero

2013-01-23 Thread Peter Krempa
On 01/23/13 16:45, Daniel P. Berrange wrote: From: "Daniel P. Berrange" When linuxNodeInfoCPUPopulate() method triggered use of an uninitialize value, since it did not initialize the 'sockets' field in the virNodeInfoPtr struct: ==30020== Conditional jump or move depends on uninitialised value

[libvirt] [PATCH] Ensure nodeinfo struct is initialized to zero

2013-01-23 Thread Daniel P. Berrange
From: "Daniel P. Berrange" When linuxNodeInfoCPUPopulate() method triggered use of an uninitialize value, since it did not initialize the 'sockets' field in the virNodeInfoPtr struct: ==30020== Conditional jump or move depends on uninitialised value(s) ==30020==at 0x5125DBD: linuxNodeInfoCPU

Re: [libvirt] [PATCHv2 2/2] conf: Fix usage of virBitmapParse

2013-01-23 Thread Peter Krempa
On 01/23/13 16:04, Eric Blake wrote: On 01/23/2013 07:47 AM, Peter Krempa wrote: virNetworkObjUpdateParseFile used ',' as the termination character for virBitmapParse. This would break if an incontiguous range would be s/incontiguous/non-contiguous/ parsed. --- src/conf/network_conf.c | 2

Re: [libvirt] [PATCH 3/6] Introduce new XMLs to specify disk source using storage pool/vol

2013-01-23 Thread Osier Yang
On 2013年01月23日 22:58, Daniel P. Berrange wrote: On Wed, Jan 23, 2013 at 10:55:25PM +0800, Osier Yang wrote: On 2013年01月23日 22:18, Daniel P. Berrange wrote: On Wed, Jan 23, 2013 at 07:04:35PM +0800, Osier Yang wrote: With this patch, one can specify the disk source using storage pool/volume lik

Re: [libvirt] [libvirt-java] Add various block, snapshot and migrate methods

2013-01-23 Thread Wido den Hollander
Hello Claudio, On 01/23/2013 04:13 PM, Claudio Bley wrote: Hello Wido, At Sun, 13 Jan 2013 19:09:22 +0100, Wido den Hollander wrote: Hi, I've sent a series of patches like these about two weeks ago and got some great feedback from Claudio on those! The feedback from Claudio has been used fo

Re: [libvirt] [PATCH] Have a colorful nodedev.rng with vi

2013-01-23 Thread Osier Yang
On 2013年01月19日 00:56, Eric Blake wrote: On 01/18/2013 02:19 AM, Osier Yang wrote: Just add the head line to let vi known it's a XML document. s/known/know/ --- docs/schemas/nodedev.rng |1 + 1 files changed, 1 insertions(+), 0 deletions(-) ACK to the idea, but before you push...

Re: [libvirt] [libvirt-java] Add various block, snapshot and migrate methods

2013-01-23 Thread Claudio Bley
Hello Wido, At Sun, 13 Jan 2013 19:09:22 +0100, Wido den Hollander wrote: > > Hi, > > I've sent a series of patches like these about two weeks ago and got > some great feedback from Claudio on those! > > The feedback from Claudio has been used for writing this series of patches. > > Backwards

Re: [libvirt] [PATCHv2 2/2] conf: Fix usage of virBitmapParse

2013-01-23 Thread Eric Blake
On 01/23/2013 07:47 AM, Peter Krempa wrote: > virNetworkObjUpdateParseFile used ',' as the termination character for > virBitmapParse. This would break if an incontiguous range would be s/incontiguous/non-contiguous/ > parsed. > --- > src/conf/network_conf.c | 2 +- > 1 file changed, 1 insertion

Re: [libvirt] [PATCHv2 1/2] util: Fix docs for virBitmapParse

2013-01-23 Thread Eric Blake
On 01/23/2013 07:47 AM, Peter Krempa wrote: > This patch changes the name of the @sep argument to @terminator and > clarifies it's usage. This patch also explicitly documents that > whitespace can't be used as @terminator as it is skipped multiple times > in the implementation. > --- > src/util/vi

Re: [libvirt] [PATCH 3/6] Introduce new XMLs to specify disk source using storage pool/vol

2013-01-23 Thread Daniel P. Berrange
On Wed, Jan 23, 2013 at 10:55:25PM +0800, Osier Yang wrote: > On 2013年01月23日 22:18, Daniel P. Berrange wrote: > >On Wed, Jan 23, 2013 at 07:04:35PM +0800, Osier Yang wrote: > >>With this patch, one can specify the disk source using storage > >>pool/volume like: > >> > >> > >> > >> > >>

Re: [libvirt] [PATCH 3/6] Introduce new XMLs to specify disk source using storage pool/vol

2013-01-23 Thread Osier Yang
On 2013年01月23日 22:18, Daniel P. Berrange wrote: On Wed, Jan 23, 2013 at 07:04:35PM +0800, Osier Yang wrote: With this patch, one can specify the disk source using storage pool/volume like:

Re: [libvirt] [PATCH libvirt-java 7/7] Implement and use virDomainMigrateToURI2 by overloading migrateToUri

2013-01-23 Thread Claudio Bley
At Sun, 13 Jan 2013 19:09:29 +0100, Wido den Hollander wrote: > > The new migrateToUri method has the dxml argument which has been added > in virDomainMigrateToUri2. > > The original migrateToUri method still uses virDomainMigrateToUri to > be sure we don't break backwards compatibility. > > Sig

Re: [libvirt] [PATCH libvirt-java 6/7] Implement virDomainMigrate2 and use it for a new migrate method.

2013-01-23 Thread Claudio Bley
At Sun, 13 Jan 2013 19:09:28 +0100, Wido den Hollander wrote: > > virDomainMigrate2 adds the dxml argument which makes it possible > to alter host-specific portions of the domain XML that will be > used on the destination host. > > The original migrate method still uses virDomainMigrate for backw

Re: [libvirt] [PATCH libvirt-java 4/7] Overload Domain.snapshotListNames with a method that has an addition flags argument.

2013-01-23 Thread Claudio Bley
You're using tabs in the subject line. Is this intentional? In the subject: s/addition/additional/ At Sun, 13 Jan 2013 19:09:26 +0100, Wido den Hollander wrote: > > This commit also adds virDomainSnapshotListFlags which is used by various > snapshot > related methods. > > Signed-off-by: Wido

Re: [libvirt] [PATCHv2 1/7] util: Fix docs for virBitmapParse

2013-01-23 Thread Peter Krempa
On 01/23/13 15:28, Daniel P. Berrange wrote: On Tue, Jan 22, 2013 at 03:25:04PM -0700, Eric Blake wrote: On 01/22/2013 02:30 PM, Peter Krempa wrote: The documentation comment virBitmapParse didn't document the @sep parameter. --- src/util/virbitmap.c | 16 +--- 1 file changed, 9

Re: [libvirt] [PATCH libvirt-java 3/7] Implement virDomainUndefineFlags by overloading the existing undefine method

2013-01-23 Thread Claudio Bley
At Sun, 13 Jan 2013 19:09:25 +0100, Wido den Hollander wrote: > > We divert from the one-on-one mapping rule here by not adding the > undefineFlags() method > > Signed-off-by: Wido den Hollander > --- > src/main/java/org/libvirt/Domain.java | 24 > src/main/java

[libvirt] [PATCHv2 2/2] conf: Fix usage of virBitmapParse

2013-01-23 Thread Peter Krempa
virNetworkObjUpdateParseFile used ',' as the termination character for virBitmapParse. This would break if an incontiguous range would be parsed. --- src/conf/network_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index

Re: [libvirt] [PATCH libvirt-java 5/7] Overload Domain.snapshotCreateXML with a method that has a argument for flags

2013-01-23 Thread Claudio Bley
At Sun, 13 Jan 2013 19:09:27 +0100, Wido den Hollander wrote: > > The original implementation doesn't have a argument for passing flags. It is > however still there for backwards compatibility. s/a argument/an argument/ in this sentence and in the subject. > Signed-off-by: Wido den Hollander >

[libvirt] [PATCHv2 1/2] util: Fix docs for virBitmapParse

2013-01-23 Thread Peter Krempa
This patch changes the name of the @sep argument to @terminator and clarifies it's usage. This patch also explicitly documents that whitespace can't be used as @terminator as it is skipped multiple times in the implementation. --- src/util/virbitmap.c | 23 +++ 1 file changed,

[libvirt] [PATCHv2 0/2] Fix docs for virBitmapParse

2013-01-23 Thread Peter Krempa
Split out from the other series. Peter Krempa (2): util: Fix docs for virBitmapParse conf: Fix usage of virBitmapParse src/conf/network_conf.c | 2 +- src/util/virbitmap.c| 23 +++ 2 files changed, 16 insertions(+), 9 deletions(-) -- 1.8.1.1 -- libvir-list mailing

Re: [libvirt] [PATCH libvirt-java 2/7] Implement virStorageVolResize by adding resize to StorageVol

2013-01-23 Thread Claudio Bley
At Sun, 13 Jan 2013 19:09:24 +0100, Wido den Hollander wrote: > > This allows us to resize storage pool volumes. > > Signed-off-by: Wido den Hollander > --- > src/main/java/org/libvirt/StorageVol.java | 36 > > src/main/java/org/libvirt/jna/Libvirt.java |1 +

Re: [libvirt] [PATCH libvirt-java 1/7] Implement virDomainBlockResize

2013-01-23 Thread Claudio Bley
At Sun, 13 Jan 2013 19:09:23 +0100, Wido den Hollander wrote: > > This adds the blockResize() method to the Domain class > > Signed-off-by: Wido den Hollander > --- > src/main/java/org/libvirt/Domain.java | 17 + > src/main/java/org/libvirt/jna/Libvirt.java |1 + > 2

Re: [libvirt] [libvirt-glib 2/2] Fix potential crashes in error cases

2013-01-23 Thread Martin Kletzander
On 12/14/2012 05:03 PM, Christophe Fergeau wrote: > fetch_list implementations in libvirt-gobject-connection.c and > libvirt-gobject-storage-pool.c can misbehave in error situations > or when the call is cancelled: > - when the call is cancelled, 'lst' will be NULL and 'n' non-0 so > we'll try to i

Re: [libvirt] [libvirt-glib 1/2] Use g_strlcpy instead of strncpy

2013-01-23 Thread Martin Kletzander
On 12/14/2012 05:03 PM, Christophe Fergeau wrote: > This guarantees that the string will be nul-terminated. Coverity > warned about this issue. > --- > libvirt-gobject/libvirt-gobject-connection.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libvirt-gobject/libvirt-gob

Re: [libvirt] [PATCH v2] qemu_agent: Ignore expected EOFs

2013-01-23 Thread Michal Privoznik
On 23.01.2013 14:25, Peter Krempa wrote: > On 01/22/13 15:11, Michal Privoznik wrote: >> https://bugzilla.redhat.com/show_bug.cgi?id=892079 >> >> One of my previous patches (f2a4e5f176c408) tried to fix crashing >> libvirtd on domain detroy. However, we need to copy pattern from >> qemuProcessHandl

Re: [libvirt] [PATCHv2 1/7] util: Fix docs for virBitmapParse

2013-01-23 Thread Daniel P. Berrange
On Tue, Jan 22, 2013 at 03:25:04PM -0700, Eric Blake wrote: > On 01/22/2013 02:30 PM, Peter Krempa wrote: > > The documentation comment virBitmapParse didn't document the @sep > > parameter. > > --- > > src/util/virbitmap.c | 16 +--- > > 1 file changed, 9 insertions(+), 7 deletions(-)

Re: [libvirt] [PATCHv2 1/7] util: Fix docs for virBitmapParse

2013-01-23 Thread Martin Kletzander
On 01/23/2013 12:18 AM, Peter Krempa wrote: > On 01/22/13 23:25, Eric Blake wrote: >> On 01/22/2013 02:30 PM, Peter Krempa wrote: >>> The documentation comment virBitmapParse didn't document the @sep >>> parameter. >>> --- >>> src/util/virbitmap.c | 16 +--- >>> 1 file changed, 9 ins

Re: [libvirt] [PATCH 3/6] Introduce new XMLs to specify disk source using storage pool/vol

2013-01-23 Thread Daniel P. Berrange
On Wed, Jan 23, 2013 at 07:04:35PM +0800, Osier Yang wrote: > With this patch, one can specify the disk source using storage > pool/volume like: > > > > > > > > > > > > > > > > > > > > > > > >

Re: [libvirt] [PATCH] S390: Enhance memballoon handling for virtio-s390

2013-01-23 Thread Viktor Mihajlovski
in the light of the upcoming release I'd greatly appreciate feedback -- Mit freundlichen Grüßen/Kind Regards Viktor Mihajlovski IBM Deutschland Research & Development GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschäftsführung: Dirk Wittkopp Sitz der Gesellschaft: Böblingen Registerg

Re: [libvirt] [PATCH 0/6] More Coverity changes

2013-01-23 Thread Peter Krempa
The series is pushed now. Peter -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCHv2] qemu: Re-add driver unlock to qemuDomainSendKey

2013-01-23 Thread Viktor Mihajlovski
Should have been done in commit 56fd513 already, but was missed due to oversight: qemuDomainSendKey didn't release the driver lock in its cleanup section. This fixes an issue introduced by commit 8c5d2ba. Signed-off-by: Viktor Mihajlovski --- V2 Changes: - Removed bogus hunk for qemuDomainManage

Re: [libvirt] [PATCH v2] parallels: Resolve some resource leaks

2013-01-23 Thread John Ferlan
On 01/23/2013 08:19 AM, Peter Krempa wrote: > On 01/22/13 21:10, John Ferlan wrote: >> Be sure to VIR_FREE(accel) and moved virDomainVideoDefFree() within >> no_memory >> label to be consistent >> >> Resolve resource leak in parallelsApplyIfaceParams() when the 'oldnet' is >> allocated locally. Als

Re: [libvirt] [PATCH] qemu: Move one misplaced driver unlock to the right function

2013-01-23 Thread Viktor Mihajlovski
On 01/18/2013 06:21 PM, Eric Blake wrote: Yuck. You _still_ haven't fixed DomainHasManagedSaveImage (which 8c5d2ba claimed to fix), and we've found yet another bogus commit. We need a v2 of this patch that scrubs ALL of the bugs at once. Stepping thru the history of qemu_driver.c I saw that co

Re: [libvirt] [PATCH v2] qemu_agent: Ignore expected EOFs

2013-01-23 Thread Peter Krempa
On 01/22/13 15:11, Michal Privoznik wrote: https://bugzilla.redhat.com/show_bug.cgi?id=892079 One of my previous patches (f2a4e5f176c408) tried to fix crashing libvirtd on domain detroy. However, we need to copy pattern from qemuProcessHandleMonitorEOF() instead of decrementing reference counter

Re: [libvirt] [PATCH] Fix nwfilter driver reload/shutdown handling when unprivileged

2013-01-23 Thread Richard W.M. Jones
On Wed, Jan 23, 2013 at 12:56:02PM +, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > Although the nwfilter driver skips startup when running in a > session libvirtd, it did not skip reload or shutdown. This > caused errors to be reported when sending SIGHUP to libvirtd, > and caus

Re: [libvirt] [PATCH v2] parallels: Resolve some resource leaks

2013-01-23 Thread Peter Krempa
On 01/22/13 21:10, John Ferlan wrote: Be sure to VIR_FREE(accel) and moved virDomainVideoDefFree() within no_memory label to be consistent Resolve resource leak in parallelsApplyIfaceParams() when the 'oldnet' is allocated locally. Also virCommandFree(cmd) as necessary. --- This is a followup

Re: [libvirt] [PATCH] auto-create pci-bridge controller info

2013-01-23 Thread Daniel P. Berrange
On Wed, Jan 23, 2013 at 06:05:42AM -0700, Eric Blake wrote: > On 01/23/2013 03:05 AM, Daniel P. Berrange wrote: > > On Wed, Jan 23, 2013 at 09:45:20AM +0800, liguang wrote: > >> if some devices specify a pci bus number that > >> haven't been defined by a pci-bridge controller > >> then fill the req

Re: [libvirt] [PATCH 6/6] virbitmaptest: Resolve Coverity errors

2013-01-23 Thread Peter Krempa
On 01/22/13 23:09, John Ferlan wrote: test1: Need to check for bitmap before using as well as free it properly test2: need to check for bitsString2 before using it. --- tests/virbitmaptest.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/tests/vir

Re: [libvirt] [PATCH] auto-create pci-bridge controller info

2013-01-23 Thread Eric Blake
On 01/23/2013 03:05 AM, Daniel P. Berrange wrote: > On Wed, Jan 23, 2013 at 09:45:20AM +0800, liguang wrote: >> if some devices specify a pci bus number that >> haven't been defined by a pci-bridge controller >> then fill the required correct controller info >> silently. >> it based on previous add

Re: [libvirt] [Qemu-devel] [RFC] introduce a general query-config cmd

2013-01-23 Thread Markus Armbruster
Amos Kong writes: [...] > But info command of hmp doesn't support parameter > (eg: (hmp) info config boot) It does since Wenchao Xia's recent improvements (commit 84c44613). For an example how to use them, check out his "hmp: add function hmp_info_snapshots()" (on list, not yet committed). [

Re: [libvirt] [PATCH 4/6] lxc_process: Avoid passing NULL iface->iname

2013-01-23 Thread Peter Krempa
On 01/22/13 23:09, John Ferlan wrote: A followon to commit id: 68dceb635 - if iface->iname is NULL, then neither virNetDevOpenvswitchRemovePort() nor virNetDevVethDelete() should be called. Found by Coverity. --- src/lxc/lxc_process.c | 14 -- 1 file changed, 8 insertions(+), 6 de

Re: [libvirt] [PATCH 5/6] rpc: Revert Coverity tag message

2013-01-23 Thread Peter Krempa
On 01/22/13 23:09, John Ferlan wrote: Turns out the fix for VIR_FREE made this particular Coverity tag unnecessary, so I'm removing it. --- src/rpc/virnetclient.c | 1 - 1 file changed, 1 deletion(-) ACK. Peter -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mail

[libvirt] [PATCH] Fix nwfilter driver reload/shutdown handling when unprivileged

2013-01-23 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Although the nwfilter driver skips startup when running in a session libvirtd, it did not skip reload or shutdown. This caused errors to be reported when sending SIGHUP to libvirtd, and caused an abort() in libdbus on shutdown due to trying to remove a dbus filter that

Re: [libvirt] [PATCH 1/2] conf: Check if number of vCPUs fits in the storage variable

2013-01-23 Thread Eric Blake
On 01/22/2013 08:07 AM, John Ferlan wrote: > On 01/22/2013 09:31 AM, Peter Krempa wrote: >> The count of vCPUs for a domain is extracted as a usingned long variable >> but is stored in a unsigned short. If the actual number was too large, >> a faulty number was stored. >> +if (count == 0 |

[libvirt] [PATCH v2] python: Fix bindings for virDomainSnapshotGet{Domain, Connect}

2013-01-23 Thread Jiri Denemark
https://bugzilla.redhat.com/show_bug.cgi?id=895882 virDomainSnapshot.getDomain() and virDomainSnapshot.getConnect() wrappers around virDomainSnapshotGet{Domain,Connect} were not supposed to be ever implemented. The class should contain proper domain() and connect() accessors that fetch python obje

[libvirt] [PATCH 5/6] Implement translateDiskSourcePool

2013-01-23 Thread Osier Yang
It iterates over all the domain disks, and translate the source for all the disks of 'pool' source type. Disks of type 'file', 'block', and 'dir' are supported now. Network type is not supported yet, it will be another patch. src/storage/storage_driver.c: * New helper storagePoolObjFindByDiskSo

[libvirt] [PATCH 3/6] Introduce new XMLs to specify disk source using storage pool/vol

2013-01-23 Thread Osier Yang
With this patch, one can specify the disk source using storage pool/volume like: Element is optional when the volume is specified by "path" or "key", but mandatory if

[libvirt] [PATCH 2/6] rng: Change the datatype for volume name for common use

2013-01-23 Thread Osier Yang
The "volName" will be used by later patch. --- docs/schemas/basictypes.rng |6 ++ docs/schemas/storagevol.rng |8 +--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/schemas/basictypes.rng b/docs/schemas/basictypes.rng index 38cab16..15bae4e 100644 --- a/docs/s

[libvirt] [PATCH 6/6] qemu: Translate the source when starting domain

2013-01-23 Thread Osier Yang
* src/qemu/qemu_driver.c (Use virDomainStorageTranslateDiskSourcePool to translate the source to the real underlying source in qemuDomainCreate and qemuDomainObjStart) --- src/qemu/qemu_driver.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_driver

[libvirt] [PATCH 1/6] eng: Remove the duplicate definition

2013-01-23 Thread Osier Yang
The RE for data type "name" storagepool.rng uses is same with "genericName" in basictypes.rng. --- docs/schemas/storagepool.rng | 10 ++ 1 files changed, 2 insertions(+), 8 deletions(-) diff --git a/docs/schemas/storagepool.rng b/docs/schemas/storagepool.rng index 983f664..165e276 10064

[libvirt] [PATCH 4/6] New files to glue domain and storage together

2013-01-23 Thread Osier Yang
This creates src/conf/domain_storage.h and src/conf/storage_conf.c, which defines a driver contains internal APIs to glue the domain and storage. Currently there is only one API, translateDiskSourcePool, which is to translate the specified pool/volume into the the real underlying disk source. Later

[libvirt] [RFC PATCH 0/n] Glue domain and storage

2013-01-23 Thread Osier Yang
This is the 4th part to implement NPIV migration support [1]. Part 1: https://www.redhat.com/archives/libvir-list/2013-January/msg00859.html Part 2: (Already ACKed by Michal) https://www.redhat.com/archives/libvir-list/2013-January/msg00859.html Part 3: https://www.redhat.com/archives/libv

Re: [libvirt] [RFC] introduce a general query-config cmd (was: [Qemu PATCH v2] add a boot option to do strict boot)

2013-01-23 Thread Amos Kong
On Tue, Jan 22, 2013 at 12:26:03PM -0600, Anthony Liguori wrote: > Eric Blake writes: > > On 01/22/2013 08:52 AM, Amos Kong wrote: > > Libvirt will need to expose an attribute that lets the user control > whether to use this new option; how do we probe via QMP whether the > new

[libvirt] [PATCHv3] capabilities: Switch CPU data in NUMA topology to a struct

2013-01-23 Thread Peter Krempa
This will allow storing additional topology data in the NUMA topology definition. This patch changes the storage type and fixes fallout of the change across the drivers using it. This patch also changes semantics of adding new NUMA cell information. Until now the data were re-allocated and copied

  1   2   >