Re: [libvirt] [PATCH v2] qemu: fallback to HMP drive_add/drive_del

2011-03-14 Thread Wen Congyang
At 03/14/2011 10:50 AM, Hu Tao Write: On Fri, Mar 11, 2011 at 04:05:16PM +0100, Jiri Denemark wrote: -/* See if drive_del isn't supported */ -if (qemuMonitorJSONHasError(reply, CommandNotFound)) { -VIR_ERROR0(_(deleting disk is not supported. -

Re: [libvirt] [PATCH] virsh: Free stream when shutdown console

2011-03-14 Thread Osier Yang
于 2011年03月11日 23:19, Eric Blake 写道: On 03/11/2011 06:56 AM, Osier Yang wrote: Otherwise connection of hypervisor driver will be leaked when one shutdown the guest in console. e.g. [root@localhost]# init 0 .. init: Re-executing /sbin/init Halting system... Power down. error: Failed

Re: [libvirt] [PATCH] qemu: fix -global argument usage

2011-03-14 Thread Osier Yang
于 2011年03月12日 01:14, Eric Blake 写道: On 03/11/2011 10:10 AM, Daniel P. Berrange wrote: On Fri, Mar 11, 2011 at 10:05:02AM -0700, Eric Blake wrote: * src/qemu/qemu_command.c (qemuBuildCommandLine): Pass two separate arguments, and fix indentation. --- I debated about pushing under the trivial

Re: [libvirt] [PATCH v2] qemu: fallback to HMP drive_add/drive_del

2011-03-14 Thread Hu Tao
On Mon, Mar 14, 2011 at 02:20:39PM +0800, Wen Congyang wrote: At 03/14/2011 10:50 AM, Hu Tao Write: On Fri, Mar 11, 2011 at 04:05:16PM +0100, Jiri Denemark wrote: -/* See if drive_del isn't supported */ -if (qemuMonitorJSONHasError(reply, CommandNotFound)) { -

Re: [libvirt] [PATCH 2/4] libvirt-guest.init: quoting variables

2011-03-14 Thread Philipp Hahn
Hello Eric, On Friday Mar 11th 2011 21:48:03 Eric Blake wrote: On 03/09/2011 01:54 AM, Philipp Hahn wrote: At least protect the $uri variable against further expansion by properly quoting it. While doing that, also quote all other variables to protect against shell meta characters.

Re: [libvirt] [PATCH] libvirt-guests: avoid globbing when splitting $URIS

2011-03-14 Thread Philipp Hahn
Hello Eric, Am Freitag 11 März 2011 22:08:33 schrieb Eric Blake: * tools/libvirt-guests.init.sh (start, stop, gueststatus): Avoid shell globbing, since valid URIs can contain '?'. Looks sane, but perhaps setting 'set -f' once at the top of the file with some comment would fix the problem as

[libvirt] [PATCH] docs/formatdomain.html.in: Fix spelling PIC-PCI

2011-03-14 Thread Philipp Hahn
Not Programmable Interrupt Controller but Peripheral Component Interconnect. Signed-off-by: Philipp Hahn h...@univention.de --- docs/formatdomain.html.in |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index

Re: [libvirt] [PATCH] CVE-2011-1146

2011-03-14 Thread Guido Günther
Hi Daniel, On Mon, Mar 14, 2011 at 11:25:08AM +0800, Daniel Veillard wrote: On Sat, Mar 12, 2011 at 11:19:33PM +0100, Guido Günther wrote: Hi, attached patch adds the missing checks for https://bugzilla.redhat.com/show_bug.cgi?id=683650 O.k. to apply? Cheers, -- Guido This

Re: [libvirt] [PATCH] CVE-2011-1146

2011-03-14 Thread Daniel Veillard
On Mon, Mar 14, 2011 at 09:08:36AM +0100, Guido Günther wrote: Hi Daniel, On Mon, Mar 14, 2011 at 11:25:08AM +0800, Daniel Veillard wrote: On Sat, Mar 12, 2011 at 11:19:33PM +0100, Guido Günther wrote: Hi, attached patch adds the missing checks for

Re: [libvirt] [PATCH 4/5] libvirt/qemu - support modification of disks in inactive domain

2011-03-14 Thread Wen Congyang
At 03/03/2011 09:12 AM, KAMEZAWA Hiroyuki Write: From 8d2544bc773ac8aa1fdfc5cade20d8c1e958 Mon Sep 17 00:00:00 2001 From: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Date: Thu, 3 Mar 2011 09:53:08 +0900 Subject: [PATCH 4/5] libvirt/qemu - support modification of disks in inactive

Re: [libvirt] [PATCH] network driver: don't send default route to clients on isolated networks

2011-03-14 Thread Daniel P. Berrange
On Sun, Mar 13, 2011 at 11:08:20AM -0400, Laine Stump wrote: Normally dnsmasq will send a default route (the address of the host in the network definition) to any client requesting an address via DHCP. On an isolated network this makes no sense, as we have iptables to prevent any traffic going

Re: [libvirt] [PATCH] virsh: Allow starting domains by UUID

2011-03-14 Thread Jiri Denemark
On Fri, Mar 11, 2011 at 10:48:07 -0700, Eric Blake wrote: On 03/11/2011 04:15 AM, Jiri Denemark wrote: diff --git a/tools/virsh.c b/tools/virsh.c index a5e9c4f..b42aac4 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -1402,7 +1402,8 @@ cmdStart(vshControl *ctl, const vshCmd *cmd)

[libvirt] [PATCH] virsh: Insert error messages to avoid a quiet abortion of commands

2011-03-14 Thread Michal Privoznik
in case of incorrect option parsing. --- My former patch introduced a regression: https://bugzilla.redhat.com/show_bug.cgi?id=605660 tools/virsh.c | 52 ++-- 1 files changed, 38 insertions(+), 14 deletions(-) diff --git a/tools/virsh.c

Re: [libvirt] [PATCH] python: Use hardcoded python path in libvirt.py

2011-03-14 Thread Jiri Denemark
On Fri, Mar 11, 2011 at 10:51:23 -0700, Eric Blake wrote: On 03/11/2011 05:55 AM, Jiri Denemark wrote: This partially reverts (and fixes that part in a different way) commit e4384459c93e3e786aa483c7f077d1d22148f689, which replaced all examples or scripts used during build to generate other

[libvirt] [PATCH] audit: eliminate potential null pointer deref when auditing macvtap devices

2011-03-14 Thread Laine Stump
The newly added call to qemuAuditNetDevice in qemuPhysIfaceConnect was assuming that res_ifname (the name of the macvtap device) was always valid, but this isn't the case. If openMacvtapTap fails, it always returns NULL, which would result in a segv. Since the audit log only needs a record of

Re: [libvirt] [PATCH] audit: eliminate potential null pointer deref when auditing macvtap devices

2011-03-14 Thread Eric Blake
On 03/14/2011 09:18 AM, Laine Stump wrote: The newly added call to qemuAuditNetDevice in qemuPhysIfaceConnect was assuming that res_ifname (the name of the macvtap device) was always valid, but this isn't the case. If openMacvtapTap fails, it always returns NULL, which would result in a segv.

Re: [libvirt] [PATCH] virsh: Insert error messages to avoid a quiet abortion of commands

2011-03-14 Thread Eric Blake
On 03/14/2011 06:34 AM, Michal Privoznik wrote: in case of incorrect option parsing. --- My former patch introduced a regression: https://bugzilla.redhat.com/show_bug.cgi?id=605660 tools/virsh.c | 52 ++-- 1 files changed, 38

Re: [libvirt] [PATCH] virsh: Insert error messages to avoid a quiet abortion of commands

2011-03-14 Thread Eric Blake
On 03/14/2011 09:33 AM, Eric Blake wrote: On 03/14/2011 06:34 AM, Michal Privoznik wrote: in case of incorrect option parsing. --- My former patch introduced a regression: https://bugzilla.redhat.com/show_bug.cgi?id=605660 tools/virsh.c | 52

Re: [libvirt] [ruby-libvirt PATCH] Fix compile error due to missing semicolon

2011-03-14 Thread Chris Lalancette
On 03/09/11 - 11:23:01AM, Matthias Bolte wrote: I pushed this under the trivial build breaker rule. Matthias From fd48bb491477843d520a14f226e79fde3e053da7 Mon Sep 17 00:00:00 2001 From: Matthias Bolte matthias.bo...@googlemail.com Date: Wed, 9 Mar 2011 11:17:34 +0100 Subject:

[libvirt] [PATCH] virsh: allow empty string arguments

2011-03-14 Thread Eric Blake
virsh connect '' should try to connect to the default connection, but the previous patch made it issue a warning about an invalid URI. * tools/virsh.c (VSH_OFLAG_EMPTY_OK): New option flag. (vshCommandOptString): Per the declaration, value is required to be non-NULL. Honor new flag.

Re: [libvirt] [PATCH] audit: eliminate potential null pointer deref when auditing macvtap devices

2011-03-14 Thread Laine Stump
On 03/14/2011 11:25 AM, Eric Blake wrote: On 03/14/2011 09:18 AM, Laine Stump wrote: The newly added call to qemuAuditNetDevice in qemuPhysIfaceConnect was assuming that res_ifname (the name of the macvtap device) was always valid, but this isn't the case. If openMacvtapTap fails, it always

Re: [libvirt] [PATCH] docs/formatdomain.html.in: Fix spelling PIC-PCI

2011-03-14 Thread Eric Blake
On 03/14/2011 01:52 AM, Philipp Hahn wrote: Not Programmable Interrupt Controller but Peripheral Component Interconnect. Signed-off-by: Philipp Hahn h...@univention.de --- docs/formatdomain.html.in |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

Re: [libvirt] [PATCH] libvirt-guests: avoid globbing when splitting $URIS

2011-03-14 Thread Eric Blake
On 03/14/2011 01:37 AM, Philipp Hahn wrote: Hello Eric, Am Freitag 11 März 2011 22:08:33 schrieb Eric Blake: * tools/libvirt-guests.init.sh (start, stop, gueststatus): Avoid shell globbing, since valid URIs can contain '?'. Looks sane, but perhaps setting 'set -f' once at the top of the

[libvirt] [PATCH] virsh: optimize creation of default connection

2011-03-14 Thread Eric Blake
Ramon de Carvalho Valle reported a problem with: virsh connect qemu:///system as a non-root user. The real root problem appears to be a regression in libvirtd being auto-started on the default qemu:///session URI; however, the symptom points to an independent flaw in virsh - we shouldn't be

Re: [libvirt] [PATCH 3/5] libvirt/qemu - support persistent modification of devices.

2011-03-14 Thread KAMEZAWA Hiroyuki
On Mon, 14 Mar 2011 13:29:13 +0800 Wen Congyang we...@cn.fujitsu.com wrote: At 03/03/2011 09:11 AM, KAMEZAWA Hiroyuki Write: From f7a997e3cd58cfac81e131afdd20c3691267831d Mon Sep 17 00:00:00 2001 From: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Date: Thu, 3 Mar 2011 09:43:07 +0900

Re: [libvirt] [PATCH 4/5] libvirt/qemu - support modification of disks in inactive domain

2011-03-14 Thread KAMEZAWA Hiroyuki
On Mon, 14 Mar 2011 17:31:49 +0800 Wen Congyang we...@cn.fujitsu.com wrote: At 03/03/2011 09:12 AM, KAMEZAWA Hiroyuki Write: From 8d2544bc773ac8aa1fdfc5cade20d8c1e958 Mon Sep 17 00:00:00 2001 From: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Date: Thu, 3 Mar 2011 09:53:08 +0900

[libvirt] [PATCH] qemu: respect locking rules

2011-03-14 Thread Eric Blake
THREADS.txt states that the contents of vm should not be read or modified while the vm lock is not held, but that the lock must not be held while performing a monitor command. This fixes all the offenders that I could find. * src/qemu/qemu_process.c (qemuProcessStartCPUs)

Re: [libvirt] [PATCH v2] Fix performance problem of virStorageVolCreateXMLFrom()

2011-03-14 Thread Eric Blake
On 03/08/2011 04:06 AM, Minoru Usui wrote: This patch changes zerobuf variable from array to VIR_ALLOC_N(). Signed-off-by: Minoru Usui u...@mxm.nes.nec.co.jp Thanks for contributing! This looks like your first patch in, so I updated AUTHORS; let me know if I need to adjust any spelling. ---

Re: [libvirt] [PATCH] virsh: fix memtune's help message for swap_hard_limit

2011-03-14 Thread Eric Blake
On 03/09/2011 01:13 AM, KAMEZAWA Hiroyuki wrote: +++ b/docs/schemas/domain.rng @@ -341,7 +341,7 @@ /optional !-- Maximum swap area the VM can use -- optional -element name=swap_hard_limit +element name=memswap_hard_limit

Re: [libvirt] [PATCH v2] qemu: Check the unsigned integer overflow

2011-03-14 Thread Eric Blake
On 03/09/2011 01:34 AM, Osier Yang wrote: As perhaps other hypervisor drivers use different capacity units, do the checking in qemu driver instead of in conf/domain_conf.c. --- src/qemu/qemu_command.c | 14 ++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git

Re: [libvirt] [PATCH v2] Allow to dynamically set the size of the debug buffer

2011-03-14 Thread Eric Blake
On 03/09/2011 02:08 AM, Daniel Veillard wrote: Allow to dynamically set the size of the debug buffer This is the part allowing to dynamically resize the debug log buffer from it's default 64kB size. The buffer is now dynamically allocated. It adds a new API virLogSetBufferSize() which

Re: [libvirt] [PATCH v2] Allow to dynamically set the size of the debug buffer

2011-03-14 Thread Eric Blake
On 03/14/2011 09:34 PM, Eric Blake wrote: @@ -43,6 +44,8 @@ #include threads.h #include files.h +#define VIR_FROM_THIS VIR_FROM_NONE 'make syntax-check' won't like you; you forgot to edit po/POTFILES.in. Then again, I only see an addition of VIR_WARN0, and not any additions of _(),

Re: [libvirt] [PATCH v2] qemu: Check the unsigned integer overflow

2011-03-14 Thread Osier Yang
于 2011年03月15日 11:27, Eric Blake 写道: On 03/09/2011 01:34 AM, Osier Yang wrote: As perhaps other hypervisor drivers use different capacity units, do the checking in qemu driver instead of in conf/domain_conf.c. --- src/qemu/qemu_command.c | 14 ++ 1 files changed, 14

[libvirt] [PATCH] maint: make spacing in .sh files easier

2011-03-14 Thread Eric Blake
Commit 7f193757 renamed libvirt-guests.init from .in to .sh, which made it slip past sc_TAB_in_indentation. I nearly reintroduced a tab, so I'm pushing this to prevent that from happening. * cfg.mk (sc_TAB_in_indentation): Update rule to include .sh files. * .dir-locals.el: List spacing

Re: [libvirt] [PATCHv4 02/15] qemu: consolidate duplicated monitor migration code

2011-03-14 Thread Eric Blake
On 03/10/2011 04:58 AM, Daniel P. Berrange wrote: On Wed, Mar 09, 2011 at 06:45:42PM -0700, Eric Blake wrote: * src/qemu/qemu_monitor_text.h (qemuMonitorTextMigrate): Declare in place of individual monitor commands. * src/qemu/qemu_monitor_json.h (qemuMonitorJSONMigrate): Likewise. *

Re: [libvirt] [PATCH v2] Allow to dynamically set the size of the debug buffer

2011-03-14 Thread Daniel Veillard
On Mon, Mar 14, 2011 at 09:34:12PM -0600, Eric Blake wrote: On 03/09/2011 02:08 AM, Daniel Veillard wrote: Allow to dynamically set the size of the debug buffer This is the part allowing to dynamically resize the debug log buffer from it's default 64kB size. The buffer is now dynamically

Re: [libvirt] [PATCH v2] Fix performance problem of virStorageVolCreateXMLFrom()

2011-03-14 Thread Minoru Usui
Hi, Eric. Thank you for merging my patch. On Mon, 14 Mar 2011 21:04:26 -0600 Eric Blake ebl...@redhat.com wrote: On 03/08/2011 04:06 AM, Minoru Usui wrote: This patch changes zerobuf variable from array to VIR_ALLOC_N(). Signed-off-by: Minoru Usui u...@mxm.nes.nec.co.jp Thanks for

Re: [libvirt] [PATCH] setmem: provide dummy impls for remaining drivers

2011-03-14 Thread Taku Izumi
Hi Eric, Hmm, re-reading this patch exposes a problem (existing before this patch, and this patch doesn't change the situation): In 0.8.8, 'virsh setmem' on xen:/// meant: if guest is live, then affect live (only); otherwise affect config But with this patch, 'virsh setmem --live' will