Re: [libvirt] [PATCH] Introduce virDomainChrDefNew()

2011-04-14 Thread Michal Novotny
On 04/13/2011 05:38 PM, Cole Robinson wrote: > On 04/13/2011 11:14 AM, Michal Novotny wrote: >> Hi, >> this is the commit to introduce the function to create new character >> device definition for the domain as advices by Cole Robinson >> . >> >> The function is used on the relevant places and the

Re: [libvirt] [PATCH] Introduce virDomainChrDefNew()

2011-04-14 Thread Michal Novotny
On 04/13/2011 05:42 PM, Eric Blake wrote: > On 04/13/2011 09:14 AM, Michal Novotny wrote: >> Hi, >> this is the commit to introduce the function to create new character >> device definition for the domain as advices by Cole Robinson > s/advices/advised/ Thanks for noticing this typo. >> . >> >>

[libvirt] [PATCH v2] Spice: support auid, images and stream compression

2011-04-14 Thread Michal Privoznik
This extends the SPICE XML to allow variable compression settings for audio, images and streaming: All new element are optional. --- Diff to v1: - _DEFAULT in all enums - VIR_ERR_CONFIG_UNSUPPORTED if TypeFromString fails docs/formatdomain.html.in

[libvirt] [libvirt-php 1/2] Add CFLAGS for compiler

2011-04-14 Thread Lyre
The defualt CFLAGS is `-g -Wall'. We can change it with ./configure CFLAGS="your option". The `-g' options also make it able to build debugsource & debuginfo packages. --- src/Makefile.am |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am

[libvirt] [libvirt-php 2/2] Fix possible uninitialized variable

2011-04-14 Thread Lyre
--- src/libvirt-php.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/libvirt-php.c b/src/libvirt-php.c index 020da4e..d436e1c 100644 --- a/src/libvirt-php.c +++ b/src/libvirt-php.c @@ -1204,7 +1204,8 @@ char *get_string_from_xpath(char *xml, char *xpath, zval **val

Re: [libvirt] [libvirt-php 1/2] Add CFLAGS for compiler

2011-04-14 Thread Michal Novotny
On 04/14/2011 10:50 AM, Lyre wrote: > The defualt CFLAGS is `-g -Wall'. We can change it with > ./configure CFLAGS="your option". The `-g' options also make > it able to build debugsource & debuginfo packages. Thanks a lot. This is good to change to honor CFLAGS :) ACKed and pushed now! Michal

Re: [libvirt] [libvirt-php 2/2] Fix possible uninitialized variable

2011-04-14 Thread Michal Novotny
On 04/14/2011 10:50 AM, Lyre wrote: > --- > src/libvirt-php.c |3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/src/libvirt-php.c b/src/libvirt-php.c > index 020da4e..d436e1c 100644 > --- a/src/libvirt-php.c > +++ b/src/libvirt-php.c > @@ -1204,7 +1204,8 @@ char *get_

[libvirt] [BUG] Re: [2/6] loadvm: improve tests before bdrv_snapshot_goto()

2011-04-14 Thread Philipp Hahn
Hello, Am Dienstag 03 August 2010 06:44:26 schrieb Kevin Wolf: > From: Miguel Di Ciurcio Filho > > This patch improves the resilience of the load_vmstate() function, doing > further and better ordered tests. This patch broke restoring not-running VMs using libvirt-0.8.7 with qemu-0.14: When the

[libvirt] [PATCH] Fix gcc 4.6 warnings

2011-04-14 Thread Christophe Fergeau
gcc 4.6 warns when a variable is initialized but isn't used afterwards: vmware/vmware_driver.c:449:18: warning: variable 'vmxPath' set but not used [-Wunused-but-set-variable] This patch fixes these warnings. There are still 2 offending files: - vbox_tmpl.c: the variable is used inside an #ifde

Re: [libvirt] [BUG] Re: [2/6] loadvm: improve tests before bdrv_snapshot_goto()

2011-04-14 Thread Kevin Wolf
Am 14.04.2011 11:10, schrieb Philipp Hahn: > Hello, > > Am Dienstag 03 August 2010 06:44:26 schrieb Kevin Wolf: >> From: Miguel Di Ciurcio Filho >> >> This patch improves the resilience of the load_vmstate() function, doing >> further and better ordered tests. > > This patch broke restoring not-

[libvirt] [PATCHv3 0/6] Add virNodeGetCpuTime() API

2011-04-14 Thread Minoru Usui
Hi, This is v3 of virNodeGetCpuTime() API. It returns cpu utilization or cumulative cpu time of the node from /proc/stat since node boots up. This patch only supports linux host. Changes v2->v3 - Change user I/F. It is able to request what the user want by the @flags. - Minor change of

Re: [libvirt] [PATCH] Fix checking of return codes in dispatcher

2011-04-14 Thread Daniel P. Berrange
On Wed, Apr 13, 2011 at 05:29:16PM -0600, Eric Blake wrote: > On 04/13/2011 12:13 PM, Daniel P. Berrange wrote: > > The libvirt APIs reserve any negative value for indicating an > > error. Thus checks > > > > if (vir() == -1) > > > > Should instead be > > > > if (vir() < 0) > >

[libvirt] [PATCHv3 1/6] virNodeGetCPUTime: Expose new API

2011-04-14 Thread Minoru Usui
virNodeGetCPUTime: Expose new API Signed-off-by: Minoru Usui --- include/libvirt/libvirt.h.in | 50 ++ src/libvirt_public.syms |5 2 files changed, 55 insertions(+), 0 deletions(-) diff --git a/include/libvirt/libvirt.h.in b/include/libvir

[libvirt] [PATCHv3 2/6] virNodeGetCPUTime: Define internal driver API

2011-04-14 Thread Minoru Usui
virNodeGetCPUTime: Define internal driver API Signed-off-by: Minoru Usui --- src/driver.h |8 src/esx/esx_driver.c |1 + src/libxl/libxl_driver.c |1 + src/lxc/lxc_driver.c |1 + src/openvz/openvz_driver.c |1 + src/phyp/phyp_driver.c

[libvirt] [PATCHv3 3/6] virNodeGetCPUTime: Implement public API

2011-04-14 Thread Minoru Usui
virNodeGetCPUTime: Implement public API Signed-off-by: Minoru Usui --- src/libvirt.c | 79 + 1 files changed, 79 insertions(+), 0 deletions(-) diff --git a/src/libvirt.c b/src/libvirt.c index 0da9885..12d666d 100644 --- a/src/libvirt.c +

[libvirt] [PATCHv3 4/6] virNodeGetCPUTime: Implement remote protocol

2011-04-14 Thread Minoru Usui
virNodeGetCPUTime: Implement remote protocol Signed-off-by: Minoru Usui --- daemon/remote.c | 46 +++ daemon/remote_dispatch_args.h |1 + daemon/remote_dispatch_prototypes.h |8 ++ daemon/remote_dispatch_ret.h|1

Re: [libvirt] [PATCH 1/3] qemu: avoid qemu_driver being unlocked twice when virThreadPoolNew() failed

2011-04-14 Thread Daniel P. Berrange
On Thu, Apr 14, 2011 at 01:53:19PM +0800, Wen Congyang wrote: > At 04/06/2011 03:53 PM, Wen Congyang Write: > > We do not lock qemu_driver when calling virThreadPoolNew(). If it failed, > > we will unlock qemu_driver. It is dangerous. > > > > We may use this pool during auto starting domains. So w

Re: [libvirt] [PATCH] implement BOOT_TIMEOUT

2011-04-14 Thread Alexander Todorov
На 13.04.2011 20:31, Eric Blake написа: On 04/13/2011 02:15 AM, Alexander Todorov wrote: --- tools/libvirt-guests.init.sh |2 ++ tools/libvirt-guests.sysconf |3 +++ 2 files changed, 5 insertions(+), 0 deletions(-) diff --git a/tools/libvirt-guests.init.sh b/tools/libvirt-guests.ini

[libvirt] [PATCHv3 5/6] virNodeGetCPUTime: Implement virsh support

2011-04-14 Thread Minoru Usui
virNodeGetCPUTime: Implement virsh support Add nodecputime subcommand to virsh. This subcommand prints below output. [Linux] # virsh nodecputime usage : 0.5% user : 0.0% system: 0.5% idle : 99.5% iowait: 0.0% [can get cpu utilization

[libvirt] [PATCHv3 6/6] virNodeGetCPUTime: Implement linux support

2011-04-14 Thread Minoru Usui
virNodeGetCPUTime: Implement linux support Signed-off-by: Minoru Usui --- src/libvirt_private.syms |1 + src/nodeinfo.c | 78 ++ src/nodeinfo.h |5 ++- 3 files changed, 83 insertions(+), 1 deletions(-) diff --git a/src/li

[libvirt] libvirt 0.9.0 crashes on first start since boot

2011-04-14 Thread Thomas Treutner
Hi, I've upgraded to 0.9.0 today on my Debian Squeeze boxes. Everything went fine, expect on one node (and only on that one, although the setup is identical), the first start of libvirtd since boot (and again, only that start) crashes with SEGV. Here are traces from gdb: http://pastebin.com

Re: [libvirt] libvirt 0.9.0 crashes on first start since boot

2011-04-14 Thread Michal Prívozník
On 04/14/2011 12:47 PM, Thomas Treutner wrote: Hi, I've upgraded to 0.9.0 today on my Debian Squeeze boxes. Everything went fine, expect on one node (and only on that one, although the setup is identical), the first start of libvirtd since boot (and again, only that start) crashes with SEGV. He

Re: [libvirt] [PATCH 1/5] phyp: Remove stack allocating a 4kb volume key and fix related memory leaks

2011-04-14 Thread Matthias Bolte
2011/4/11 Daniel Veillard : > On Sat, Apr 09, 2011 at 11:59:07AM +0200, Matthias Bolte wrote: >> Don't pre-allocate 4kb per key, make phypVolumeGetKey allocate the memory. >> >> Make phypBuildVolume return the volume key instead of using pre-allocated >> memory to store it. >> >> Also fix a memory

Re: [libvirt] [PATCH 2/5] phyp: Reduce code duplication in error and success paths

2011-04-14 Thread Matthias Bolte
2011/4/11 Daniel Veillard : > On Sat, Apr 09, 2011 at 11:59:08AM +0200, Matthias Bolte wrote: >> Also fix memory leaks along the way in phypCreateServerSCSIAdapter and >> phypAttachDevice. >> --- >>  src/phyp/phyp_driver.c |  592 >> +++- >>  1 files chan

Re: [libvirt] [PATCH 3/5] phyp: Don't try to use a string from a failed virAsprintf

2011-04-14 Thread Matthias Bolte
2011/4/11 Daniel Veillard : > On Sat, Apr 09, 2011 at 11:59:09AM +0200, Matthias Bolte wrote: >> --- >>  src/phyp/phyp_driver.c |    2 +- >>  1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c >> index f441261..24165fb 100644 >> --- a

Re: [libvirt] [PATCH 5/5] phyp: Don't overwrite error from virDomainDeviceDefParse by OOM error

2011-04-14 Thread Matthias Bolte
2011/4/11 Daniel Veillard : > On Sat, Apr 09, 2011 at 11:59:11AM +0200, Matthias Bolte wrote: >> --- >>  src/phyp/phyp_driver.c |    1 - >>  1 files changed, 0 insertions(+), 1 deletions(-) >> >> diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c >> index 226946d..f36b357 100644 >> --- a/

[libvirt] [PATCH] Fix possible NULL dereference in driver

2011-04-14 Thread Michal Privoznik
If brSetForwardDelay() fails, we go to err1 where we want to access macTapIfName variable which was just VIR_FREE'd a few lines above. --- src/network/bridge_driver.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_drive

Re: [libvirt] [PATCH] Fix possible NULL dereference in driver

2011-04-14 Thread Michal Prívozník
On 04/14/2011 01:49 PM, Michal Privoznik wrote: If brSetForwardDelay() fails, we go to err1 where we want to access macTapIfName variable which was just VIR_FREE'd a few lines above. --- src/network/bridge_driver.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sr

Re: [libvirt] [PATCH 4/5] phyp: Fix too small buffer allocation in phypAttachDevice

2011-04-14 Thread Matthias Bolte
2011/4/11 Daniel Veillard : > On Sat, Apr 09, 2011 at 11:59:10AM +0200, Matthias Bolte wrote: >> sizeof(domain->name) is the wrong thing. Instead of using strdup here >> rewrite escape_specialcharacters to allocate the buffer itself. >> >> Add a contains_specialcharacters to be used in phypOpen, as

[libvirt] [PATCH] Fix possible NULL dereference in driver

2011-04-14 Thread Michal Privoznik
If brSetForwardDelay() fails, we go to err1 where we want to access macTapIfName variable which was just VIR_FREE'd a few lines above. --- src/network/bridge_driver.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_drive

[libvirt] virsh memset

2011-04-14 Thread Zvi Dubitzky
Hi Does anybody know if 'virsh memset' is working ok with its parameters with the late libvirt code (>= 0.8.8 )? With what libcgroup version ? thanks Zvi Dubitzky Email:d...@il.ibm.com -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] Fix gcc 4.6 warnings

2011-04-14 Thread Christophe Fergeau
On Thu, Apr 14, 2011 at 11:22:35AM +0200, Christophe Fergeau wrote: > - vbox_tmpl.c: the variable is used inside an #ifdef and is assigned several > times outside of #ifdef. Fixing the warning would have required wrapping > all the assignment inside #ifdef which hurts readability. On second th

[libvirt] [PATCH] Fix gcc 4.6 warnings in vbox_tmpl.c

2011-04-14 Thread Christophe Fergeau
--- src/vbox/vbox_tmpl.c | 11 --- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c index 0fbfba5..a7d78df 100644 --- a/src/vbox/vbox_tmpl.c +++ b/src/vbox/vbox_tmpl.c @@ -3915,7 +3915,9 @@ vboxAttachDrives(virDomainDefPtr def, vb

Re: [libvirt] [PATCH] migrate VMs between different-endian hosts

2011-04-14 Thread Stefan Berger
On 04/12/2011 02:05 AM, Daniel Veillard wrote: On Mon, Apr 11, 2011 at 11:46:55AM -0600, Eric Blake wrote: On 04/11/2011 07:36 AM, Daniel Veillard wrote: @@ -3097,6 +3107,11 @@ qemuDomainSaveImageOpen(struct qemud_dri } if (header.version> QEMUD_SAVE_VERSION) { +/* conver

[libvirt] [libvirt-snmp][PATCH v5 0/4] Add SNMP trap/notification support

2011-04-14 Thread Michal Privoznik
The fifth version. In case we build against libvirt older than 0.9.0 (which have old event API), we need to include some sources from libvirt git. So we are able to run even on older RHELs, like 5.6. Those files were copied to our git and modified very slighty. Finally, we have a proof-of-concept

[libvirt] [libvirt-snmp][PATCH v5 1/4] Add notification-type object to libvirt MIB

2011-04-14 Thread Michal Privoznik
--- src/LIBVIRT-MIB.txt |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/src/LIBVIRT-MIB.txt b/src/LIBVIRT-MIB.txt index 607d441..932dec9 100644 --- a/src/LIBVIRT-MIB.txt +++ b/src/LIBVIRT-MIB.txt @@ -201,5 +201,14 @@ libvirtGuestGroup OBJECT-GROUP guests."

[libvirt] [libvirt-snmp][PATCH v5 2/4] Add libvirt error handling function

2011-04-14 Thread Michal Privoznik
--- src/Makefile.am|2 ++ src/libvirtSnmpError.c | 34 ++ src/libvirtSnmpError.h | 31 +++ 3 files changed, 67 insertions(+), 0 deletions(-) create mode 100644 src/libvirtSnmpError.c create mode 100644 src/libvirtSnmpErr

[libvirt] [libvirt-snmp][PATCH v5 3/4] Create functions to fill in and send notification packets.

2011-04-14 Thread Michal Privoznik
Before sending snmp notification we need to fill in useful data, like domain status, UUID, etc. --- src/Makefile.am|2 + src/README.txt |7 ++- src/libvirtNotifications.c | 110 src/libvirtNotifications.h | 21

Re: [libvirt] [PATCH] Merge all returns paths from dispatcher into single path

2011-04-14 Thread Daniel P. Berrange
On Wed, Apr 13, 2011 at 05:23:41PM -0600, Eric Blake wrote: > On 04/13/2011 12:12 PM, Daniel P. Berrange wrote: > > The dispatcher functions have numerous places where they > > return to the caller. This leads to duplicated cleanup > > code, often resulting in memory leaks. It makes it harder > > t

Re: [libvirt] RFC: virInterface change transaction API

2011-04-14 Thread Dan Kenigsberg
On Fri, Apr 08, 2011 at 03:31:05PM -0400, Laine Stump wrote: > I've been asked to implement what some people have termed as a > "transaction-oriented" API for host interface configuration (ie > virInterface*()). > The basic intent is to allow rollback to a known-good config if > anything goes > wro

Re: [libvirt] [PATCH] Merge all returns paths from dispatcher into single path

2011-04-14 Thread Daniel P. Berrange
On Wed, Apr 13, 2011 at 05:23:41PM -0600, Eric Blake wrote: > On 04/13/2011 12:12 PM, Daniel P. Berrange wrote: > > The dispatcher functions have numerous places where they > > return to the caller. This leads to duplicated cleanup > > code, often resulting in memory leaks. It makes it harder > > t

Re: [libvirt] virsh shutdown

2011-04-14 Thread Dave Allan
On Wed, Apr 13, 2011 at 11:26:03AM -0600, Eric Blake wrote: > On 04/13/2011 12:56 AM, Zvi Dubitzky wrote: > > Hi > > For some reason recent libvirt code (0.8.3 and even before) the 'virsh > > shutdown ' is not effective . > > It issues an ok message by the domians remains in a runnning state . O

Re: [libvirt] [PATCH] Fix possible NULL dereference in driver

2011-04-14 Thread Laine Stump
On 04/14/2011 08:03 AM, Michal Privoznik wrote: If brSetForwardDelay() fails, we go to err1 where we want to access macTapIfName variable which was just VIR_FREE'd a few lines above. *raises hand* Thanks for fixing this. --- src/network/bridge_driver.c |5 +++-- 1 files changed, 3 ins

Re: [libvirt] [PATCH] docs: Serial and parallel device target ports actually start from 0

2011-04-14 Thread Matthias Bolte
2011/4/11 Eric Blake : > On 04/10/2011 07:03 AM, Matthias Bolte wrote: >> Reported by Igor Galić >> --- >>  docs/formatdomain.html.in |    4 ++-- >>  1 files changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in >> index 574fee5..ea021e8 1

[libvirt] [libvirt PATCH v2] Introduce virDomainChrDefNew()

2011-04-14 Thread Michal Novotny
Make: passed Make check: passed Make syntax-check: passed Hi, this is the commit to introduce the function to create new character device definition for the domain as advised by Cole Robinson . The function is used on the relevant places and also new tests has been added. Michal Signed-off-by:

Re: [libvirt] [PATCH] Fix possible NULL dereference in driver

2011-04-14 Thread Laine Stump
On 04/14/2011 10:31 AM, Laine Stump wrote: ACK. And now also pushed (after adding a sentence to the commit message). -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] esx: Cleanup VI generator code

2011-04-14 Thread Matthias Bolte
2011/4/12 Daniel Veillard : > On Sun, Apr 10, 2011 at 01:26:47PM +0200, Matthias Bolte wrote: >> --- >>  src/esx/esx_vi_generator.py |  177 >> +-- >>  1 files changed, 71 insertions(+), 106 deletions(-) >> >> diff --git a/src/esx/esx_vi_generator.py b/src/es

Re: [libvirt] [PATCH] esx: Cleanup and refactor CastFromAnyType macros

2011-04-14 Thread Matthias Bolte
2011/4/12 Daniel Veillard : > On Sun, Apr 10, 2011 at 01:27:19PM +0200, Matthias Bolte wrote: >> Add CastFromAnyType functions for the String type. >> --- >>  src/esx/esx_vi_generator.py |    5 +-- >>  src/esx/esx_vi_types.c      |   64 >> +++--- >>  src/esx/esx

Re: [libvirt] [libvirt PATCH v2] Introduce virDomainChrDefNew()

2011-04-14 Thread Cole Robinson
On 04/14/2011 10:50 AM, Michal Novotny wrote: > Make: passed > Make check: passed > Make syntax-check: passed > > Hi, > this is the commit to introduce the function to create new character > device definition for the domain as advised by Cole Robinson > . > > The function is used on the relevant

Re: [libvirt] [PATCH] esx: Extend VI generator to cover managed object types

2011-04-14 Thread Matthias Bolte
2011/4/13 Daniel Veillard : > On Sun, Apr 10, 2011 at 01:27:56PM +0200, Matthias Bolte wrote: >> Generate lookup functions for managed object types. >> --- >>  src/esx/esx_vi.c               |  414 >> +++- >>  src/esx/esx_vi.h               |    2 + >>  src/esx/

Re: [libvirt] libvirt 0.9.0 crashes on first start since boot

2011-04-14 Thread Laine Stump
On 04/14/2011 06:47 AM, Thomas Treutner wrote: Hi, I've upgraded to 0.9.0 today on my Debian Squeeze boxes. Everything went fine, expect on one node (and only on that one, although the setup is identical), the first start of libvirtd since boot (and again, only that start) crashes with SEGV.

Re: [libvirt] [PATCH] esx: Mark error message in macros for translation

2011-04-14 Thread Matthias Bolte
2011/4/11 Eric Blake : > On 04/10/2011 05:28 AM, Matthias Bolte wrote: >> --- >>  src/esx/esx_vi_types.c |   20 ++-- >>  1 files changed, 10 insertions(+), 10 deletions(-) >> >> diff --git a/src/esx/esx_vi_types.c b/src/esx/esx_vi_types.c >> index 9e23030..29a3c39 100644 >> --- a/sr

Re: [libvirt] [PATCH 0/4] more phyp refactoring

2011-04-14 Thread Eric Blake
On 04/13/2011 04:07 PM, Eric Blake wrote: > Phyp still had several memory leaks and in general some bad > copy-and-paste design. This series consolidates some common > patterns into simpler helpers, avoiding leaks in the process. > > Eric Blake (4): > phyp: prefer memcpy over memmove when legal

Re: [libvirt] [libvirt PATCH v2] Introduce virDomainChrDefNew()

2011-04-14 Thread Michal Novotny
[snip] I've fixed those OOMErrors and the whitespace already for v3 however I won't send the v3 of the patch until I get reply to this since some other approach may have to be chosen for the port = 0 things. comments inline ... > Hmm, why exactly are these port = 0 changes needed? Were they brea

Re: [libvirt] [PATCH] esx: Make the parsed URI part of the private connection data

2011-04-14 Thread Matthias Bolte
2011/4/11 Eric Blake : > On 04/10/2011 09:18 AM, Matthias Bolte wrote: >> This will be used to make esxVI_Context clonable. >> >> Also move cleanup code for esxPrivate to esxFreePrivate(). >> --- >>  src/esx/esx_driver.c  |  103 >> - >>  src/esx/esx_

Re: [libvirt] [PATCH] free cpumask of vcpupinDef

2011-04-14 Thread Eric Blake
On 04/14/2011 12:50 AM, Osier Yang wrote: > 于 2011年04月14日 11:34, Hu Tao 写道: >> cpumask doesn't get freed when vcpupinDef being freed, this leaks >> memory. >> --- >> src/conf/domain_conf.c |1 + >> 1 files changed, 1 insertions(+), 0 deletions(-) >> >> diff --git a/src/conf/domain_conf.c b/s

Re: [libvirt] [PATCH 0/4] more phyp refactoring

2011-04-14 Thread Matthias Bolte
2011/4/14 Eric Blake : > On 04/13/2011 04:07 PM, Eric Blake wrote: >> Phyp still had several memory leaks and in general some bad >> copy-and-paste design.  This series consolidates some common >> patterns into simpler helpers, avoiding leaks in the process. >> >> Eric Blake (4): >>   phyp: prefer

Re: [libvirt] [PATCH] network: truncate bridges' dummy tap device names to IFNAMSIZ (15) chars

2011-04-14 Thread Eric Blake
On 04/14/2011 12:52 AM, Laine Stump wrote: >> Should we also minimize the truncation by adding just "-n" instead of >> "-nic", so that there are fewer user strings being butchered? Or would >> that cause problems for existing users that already have bridge-nic and >> would now also have bridge-n?

Re: [libvirt] [libvirt PATCH v2] Introduce virDomainChrDefNew()

2011-04-14 Thread Cole Robinson
On 04/14/2011 11:42 AM, Michal Novotny wrote: > [snip] > > I've fixed those OOMErrors and the whitespace already for v3 however I > won't send the v3 of the patch until I get reply to this since some > other approach may have to be chosen for the port = 0 things. comments > inline ... > > >> Hmm

[libvirt] [libvirt PATCH v3] Introduce virDomainChrDefNew()

2011-04-14 Thread Michal Novotny
Make: passed Make check: passed Make syntax-check: passed Hi, this is the commit to introduce the function to create new character device definition for the domain as advised by Cole Robinson . The function is used on the relevant places and also new tests has been added. Michal Signed-off-by:

Re: [libvirt] [libvirt PATCH v3] Introduce virDomainChrDefNew()

2011-04-14 Thread Cole Robinson
On 04/14/2011 12:05 PM, Michal Novotny wrote: > Make: passed > Make check: passed > Make syntax-check: passed > > Hi, > this is the commit to introduce the function to create new character > device definition for the domain as advised by Cole Robinson > . > > The function is used on the relevant

Re: [libvirt] [PATCH v2] Spice: support auid, images and stream compression

2011-04-14 Thread Eric Blake
You still forgot to amend the subject line, even though you noticed it in v1 :) On 04/14/2011 02:44 AM, Michal Privoznik wrote: > This extends the SPICE XML to allow variable compression settings for audio, > images and streaming: > > > > > > > > All

Re: [libvirt] [libvirt PATCH v3] Introduce virDomainChrDefNew()

2011-04-14 Thread Eric Blake
On 04/14/2011 10:14 AM, Cole Robinson wrote: > On 04/14/2011 12:05 PM, Michal Novotny wrote: >> Make: passed >> Make check: passed >> Make syntax-check: passed >> >> Hi, >> this is the commit to introduce the function to create new character >> device definition for the domain as advised by Cole Ro

Re: [libvirt] [PATCH] Fix gcc 4.6 warnings

2011-04-14 Thread Matthias Bolte
2011/4/14 Christophe Fergeau : > gcc 4.6 warns when a variable is initialized but isn't used afterwards: > > vmware/vmware_driver.c:449:18: warning: variable 'vmxPath' set but not used > [-Wunused-but-set-variable] > > This patch fixes these warnings. There are still 2 offending files: > > - vbox_

Re: [libvirt] [PATCH 4/5] phyp: Fix too small buffer allocation in phypAttachDevice

2011-04-14 Thread Eric Blake
On 04/14/2011 06:00 AM, Matthias Bolte wrote: >> ACK, we just need to make sure contains_specialcharacters() and >> escape_specialcharacters() don't diverge on the charater set. Maybe >> add a comment in escape_specialcharacters() to this effect. >> >> Daniel >> > > I just moved the character set

Re: [libvirt] [PATCH] Fix gcc 4.6 warnings

2011-04-14 Thread Christophe Fergeau
On Thu, Apr 14, 2011 at 06:44:25PM +0200, Matthias Bolte wrote: > I can take care of that and I'll post a speculative patch for it as I > don't have a gcc 4.6 at hand right now to test it my self. I can easily test it, I'll let you know how it goes. > Before I can apply this patch we need to solv

Re: [libvirt] [PATCH] migrate VMs between different-endian hosts

2011-04-14 Thread Eric Blake
On 04/09/2011 09:48 AM, Stefan Berger wrote: > This patch enables the migration of Qemu VMs between hosts of different > endianess. I tested this by migrating a i686 VM between a x86 and ppc64 > host. > > I am converting the 'int's in the VM's state header to uint32_t assuming > this doesn't break

Re: [libvirt] [PATCH] migrate VMs between different-endian hosts

2011-04-14 Thread Eric Blake
On 04/14/2011 06:28 AM, Stefan Berger wrote: >>The thing I'm worried about is that by bumping older versions won't >> be able to restore the new dumps, and that could be a serious issue on >> shared storage. We are not introducing a new feature, so I thin we need >> to preserve forward compatib

Re: [libvirt] [PATCH 4/5] phyp: Fix too small buffer allocation in phypAttachDevice

2011-04-14 Thread Matthias Bolte
2011/4/14 Eric Blake : > On 04/14/2011 06:00 AM, Matthias Bolte wrote: >>>  ACK, we just need to make sure contains_specialcharacters() and >>> escape_specialcharacters() don't diverge on the charater set. Maybe >>> add a comment in escape_specialcharacters() to this effect. >>> >>> Daniel >>> >> >

Re: [libvirt] [PATCH] Fix gcc 4.6 warnings

2011-04-14 Thread Matthias Bolte
2011/4/14 Christophe Fergeau : > On Thu, Apr 14, 2011 at 06:44:25PM +0200, Matthias Bolte wrote: >> I can take care of that and I'll post a speculative patch for it as I >> don't have a gcc 4.6 at hand right now to test it my self. > > I can easily test it, I'll let you know how it goes. > >> Befor

[libvirt] [PATCH] esx: Fix gcc 4.6 warning about initialized but unused variables

2011-04-14 Thread Matthias Bolte
This is a speculative patch as I don't have gcc 4.6 at hand to test it. Matthias From ed18b790a1e0248f35f48d464f45c17b4f4d0cee Mon Sep 17 00:00:00 2001 From: Matthias Bolte Date: Thu, 14 Apr 2011 19:14:38 +0200 Subject: [PATCH] esx: Fix gcc 4.6 warning about initialized but unused variables This

Re: [libvirt] [PATCH] Fix gcc 4.6 warnings in vbox_tmpl.c

2011-04-14 Thread Matthias Bolte
2011/4/14 Christophe Fergeau : > --- >  src/vbox/vbox_tmpl.c |   11 --- >  1 files changed, 8 insertions(+), 3 deletions(-) > > diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c > index 0fbfba5..a7d78df 100644 > --- a/src/vbox/vbox_tmpl.c > +++ b/src/vbox/vbox_tmpl.c > @@ -3915,7 +39

Re: [libvirt] [PATCH 0/4] more phyp refactoring

2011-04-14 Thread Eric Blake
On 04/14/2011 09:51 AM, Matthias Bolte wrote: >>> src/phyp/phyp_driver.c | 1128 >>> +++- >>> 1 files changed, 163 insertions(+), 965 deletions(-) >> >> Serves me right for thinking Matthias' cleanups had already been >> applied. Now I get to rebase, w

[libvirt] [PATCH] ppc: Enable starting of VMs on ppc host

2011-04-14 Thread Stefan Berger
Subject: ppc: Enable starting of VMs on ppc host Due to differences in /proc/cpuinfo the parsing of the cpu data is different between architectures. On PPC /proc/cpuinfo looks like this: [original formatting with tabs] processor: 0 cpu : PPC970MP, altivec supported clock: 2

Re: [libvirt] [PATCH] migrate VMs between different-endian hosts

2011-04-14 Thread Stefan Berger
On 04/14/2011 12:53 PM, Eric Blake wrote: On 04/09/2011 09:48 AM, Stefan Berger wrote: This patch enables the migration of Qemu VMs between hosts of different endianess. I tested this by migrating a i686 VM between a x86 and ppc64 host. I am converting the 'int's in the VM's state header to uin

Re: [libvirt] [PATCH] ppc: Enable starting of VMs on ppc host

2011-04-14 Thread Eric Blake
On 04/14/2011 11:45 AM, Stefan Berger wrote: > Subject: ppc: Enable starting of VMs on ppc host > > The patch adapts the parsing of the data found in /proc/cpuinfo. > > /sys/devices/system/cpu/cpuX/topology/physical_package_id also > always returns -1. Check for it on ppc and make it '0' if found

Re: [libvirt] [PATCH] migrate VMs between different-endian hosts

2011-04-14 Thread Eric Blake
On 04/14/2011 11:50 AM, Stefan Berger wrote: >>> +++ libvirt-acl/src/qemu/qemu_driver.c >>> @@ -43,6 +43,7 @@ >>> #include >>> #include >>> #include >>> +#include >> This won't work unless you also modify bootstrap.conf to include the >> gnulib byteswap module. >> >> ACK with that nit fixed.

Re: [libvirt] [PATCH] migrate VMs between different-endian hosts

2011-04-14 Thread Stefan Berger
On 04/14/2011 02:20 PM, Eric Blake wrote: On 04/14/2011 11:50 AM, Stefan Berger wrote: +++ libvirt-acl/src/qemu/qemu_driver.c @@ -43,6 +43,7 @@ #include #include #include +#include This won't work unless you also modify bootstrap.conf to include the gnulib byteswap module. ACK with th

Re: [libvirt] [PATCH] ppc: Enable starting of VMs on ppc host

2011-04-14 Thread Stefan Berger
On 04/14/2011 02:18 PM, Eric Blake wrote: On 04/14/2011 11:45 AM, Stefan Berger wrote: Subject: ppc: Enable starting of VMs on ppc host The patch adapts the parsing of the data found in /proc/cpuinfo. /sys/devices/system/cpu/cpuX/topology/physical_package_id also always returns -1. Check for i

[libvirt] [PATCHv2] network: truncate bridges' dummy tap device names to IFNAMSIZ (15) chars

2011-04-14 Thread Laine Stump
(Change from V1 - define a static char[] containing the desired prefix, and use its size to figure out how much to truncate, rather than having a bunch of magic numbers. This also makes it simpler and less error-prone to change the suffix if we decide to.) This patch addresses: https://bugzil

Re: [libvirt] [PATCHv2] network: truncate bridges' dummy tap device names to IFNAMSIZ (15) chars

2011-04-14 Thread Eric Blake
On 04/14/2011 01:06 PM, Laine Stump wrote: > > (Change from V1 - define a static char[] containing the desired > prefix, and use its size to figure out how much to truncate, rather > than having a bunch of magic numbers. This also makes it simpler and > less error-prone to change the suffix if we

Re: [libvirt] [PATCH] ppc: Enable starting of VMs on ppc host

2011-04-14 Thread Eric Blake
On 04/14/2011 12:56 PM, Stefan Berger wrote: > On 04/14/2011 02:18 PM, Eric Blake wrote: >> On 04/14/2011 11:45 AM, Stefan Berger wrote: >>> Subject: ppc: Enable starting of VMs on ppc host >>> >>> The patch adapts the parsing of the data found in /proc/cpuinfo. >>> >>> /sys/devices/system/cpu/cpuX

Re: [libvirt] [PATCH] Merge all returns paths from dispatcher into single path

2011-04-14 Thread Eric Blake
On 04/14/2011 06:43 AM, Daniel P. Berrange wrote: >>> +virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not >>> open")); >> >> Is virNetError really the best name for the new helper macro, especially >> since VIR_FROM_THIS is VIR_FROM_REMOTE? Should it instead be named >> virRemote

Re: [libvirt] [PATCH] Merge all returns paths from dispatcher into single path

2011-04-14 Thread Eric Blake
On 04/14/2011 07:29 AM, Daniel P. Berrange wrote: >>> >>> parent = virNodeDeviceGetParent(dev); >> >> ...and malloc'd on this path. > > It isn't malloc'd here actually. This is returning > a 'const char *'... Umm - libvirt.c declares it as 'const char *', but defers to the deviceMonitor->d

Re: [libvirt] [PATCH] Merge all returns paths from dispatcher into single path

2011-04-14 Thread Eric Blake
On 04/14/2011 02:01 PM, Eric Blake wrote: > On 04/14/2011 07:29 AM, Daniel P. Berrange wrote: parent = virNodeDeviceGetParent(dev); >>> >>> ...and malloc'd on this path. >> >> It isn't malloc'd here actually. This is returning >> a 'const char *'... > > Umm - libvirt.c declares it

[libvirt] [PATCHv2 5/9] phyp: use consistent style for labels

2011-04-14 Thread Eric Blake
* src/phyp/phyp_driver.c: Match label style of rest of project. (phypExec, phypUUIDTable_Pull): Drop an extra label. --- src/phyp/phyp_driver.c | 129 +++- 1 files changed, 62 insertions(+), 67 deletions(-) diff --git a/src/phyp/phyp_driver.c b/src/phy

[libvirt] [PATCHv2 0/9] round 2 of phyp cleanups

2011-04-14 Thread Eric Blake
Smaller code and fewer bugs. Rebase of earlier version at: https://www.redhat.com/archives/libvir-list/2011-April/msg00677.html Eric Blake (9): maint: use lighter-weight function for straight appends phyp: avoid a logic bug phyp: avoid memory leak on failure phyp: more return handling cle

[libvirt] [PATCHv2 3/9] phyp: avoid memory leak on failure

2011-04-14 Thread Eric Blake
* src/phyp/phyp_driver.c (phypUUIDTable_Init): Avoid memory leak on error. --- src/phyp/phyp_driver.c | 46 +++--- 1 files changed, 27 insertions(+), 19 deletions(-) diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c index 7aa494d..0c69d4f 10064

[libvirt] [PATCHv2 7/9] phyp: use consistent return string handling

2011-04-14 Thread Eric Blake
Use the name 'ret' for all phypExec results, to make it easier to wrap phypExec. Don't allow a possibly NULL ret through printf. * src/phyp/phyp_driver.c (phypBuildVolume, phypDestroyStoragePool) (phypBuildStoragePool, phypBuildLpar): Avoid NULL dereference. (phypInterfaceDestroy): Avoid redundan

[libvirt] [PATCHv2 6/9] phyp: prefer memcpy over memmove when legal

2011-04-14 Thread Eric Blake
* src/phyp/phyp_driver.c (phypUUIDTable_AddLpar) (phypGetLparUUID, phypGetStoragePoolUUID, phypVolumeGetXMLDesc) (phypGetStoragePoolXMLDesc): Use faster method. --- src/phyp/phyp_driver.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/phyp/phyp_driver.c b/src

[libvirt] [PATCHv2 1/9] maint: use lighter-weight function for straight appends

2011-04-14 Thread Eric Blake
It costs quite a few processor cycles to go through printf parsing just to determine that we only meant to append. * src/xen/xend_internal.c (xend_op_ext): Consolidate multiple printfs into one. * src/qemu/qemu_command.c (qemuBuildWatchdogDevStr) (qemuBuildUSBInputDevStr, qemuBuildSoundDevStr) (qe

[libvirt] [PATCHv2 9/9] phyp: another simplification

2011-04-14 Thread Eric Blake
Rather than copying and pasting lots of code, factor it into a single helper function. * src/phyp/phyp_driver.c (phypExecInt): New function. (phypGetVIOSPartitionID, phypNumDomainsGeneric, phypGetLparID) (phypGetLparMem, phypGetLparCPUGeneric, phypGetRemoteSlot) (phypGetVIOSNextSlotNumber, phypAtt

[libvirt] [PATCHv2 2/9] phyp: avoid a logic bug

2011-04-14 Thread Eric Blake
Ever since commit ebc46f, the destroy function built two command variants but only used one. I went with the variant that matches the idiom used in the counterpart of phypBuildStoragePool. * src/phyp/phyp_driver.c (phypDestroyStoragePool): Avoid clobbering cmd. Fix error message typo. --- src/p

[libvirt] [PATCHv2 4/9] phyp: more return handling cleanup

2011-04-14 Thread Eric Blake
* src/phyp/phyp_driver.c (phypInterfaceDestroy) (phypInterfaceDefineXML, phypInterfaceLookupByName) (phypInterfaceIsActive, phypListInterfaces, phypNumOfInterfaces): Clean up return handling of recent additions. --- src/phyp/phyp_driver.c | 130 +--- 1

Re: [libvirt] [PATCH] implement BOOT_TIMEOUT

2011-04-14 Thread Eric Blake
On 04/14/2011 04:21 AM, Alexander Todorov wrote: > I will rework the patch with your comments and post it again but was > wondering about something more advanced. > > Is it possible to specify the order(and timeouts) in which individual > guests are started? As it seems currently this is not possi

Re: [libvirt] [PATCH 2/3] qemu: unlock qemu driver and vm before returning from processWatchdogEvent()

2011-04-14 Thread Eric Blake
On 04/06/2011 01:57 AM, Wen Congyang wrote: > When the function processWatchdogEvent() failed, we only free wdEvent, but > forget to unlock qemu driver and vm, free dumpfile. > > --- > src/qemu/qemu_driver.c | 28 +++- > 1 files changed, 19 insertions(+), 9 deletions(-)

Re: [libvirt] [PATCH V2 3/3] hold an extra reference while handling watchdog event

2011-04-14 Thread Eric Blake
On 04/06/2011 01:58 AM, Wen Congyang wrote: > If the domain is not persistent, and qemu quited unexpectedly before s/quited/quits/ > calling processWatchdogEvent(), vm will be freed and the function > processWatchdogEvent() will be dangerous. > > --- > src/qemu/qemu_driver.c | 12 ---

Re: [libvirt] [PATCH 2/3] qemu: unlock qemu driver and vm before returning from processWatchdogEvent()

2011-04-14 Thread Eric Blake
On 04/06/2011 01:57 AM, Wen Congyang wrote: > When the function processWatchdogEvent() failed, we only free wdEvent, but > forget to unlock qemu driver and vm, free dumpfile. > > --- > src/qemu/qemu_driver.c | 28 +++- > 1 files changed, 19 insertions(+), 9 deletions(-)

Re: [libvirt] [PATCHv2] network: truncate bridges' dummy tap device names to IFNAMSIZ (15) chars

2011-04-14 Thread Laine Stump
On 04/14/2011 03:19 PM, Eric Blake wrote: --- src/network/bridge_driver.c | 16 +++- 1 files changed, 15 insertions(+), 1 deletions(-) Here's making my IRC review official: ACK. Pushed. Thanks! -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailma

Re: [libvirt] [PATCH] implement BOOT_TIMEOUT

2011-04-14 Thread Igor Serebryany
On Thu, Apr 14, 2011 at 02:32:36PM -0600, Eric Blake wrote: > Without more code on the libvirt front, I think you're stuck renaming > the guests to enforce naming order (assuming that libvirt even goes by > sorted name order, as opposed to readdir() order where you have no control). I solved this

  1   2   >