Re: [libvirt] [PATCH 2/2] Added syntax-check rule for return with parentheses

2012-03-23 Thread Martin Kletzander
On 03/23/2012 07:21 AM, Osier Yang wrote: On 03/22/2012 07:33 PM, Martin Kletzander wrote: After cleanup introduced with previous commit, there is a need for syntax-check rule taking care of return(). Regexp used in 'prohibit' parameter is taken from the cleanup commit and modified so it fits

[libvirt] [PATCH v2 2/2] Added syntax-check rule for return with parentheses

2012-03-23 Thread Martin Kletzander
After cleanup introduced with previous commit, there is a need for syntax-check rule taking care of return(). Regexp used in 'prohibit' parameter is taken from the cleanup commit and modified so it fits 'grep -E' format. Semicolon at the end is needed, otherwise the regexp could match return with

Re: [libvirt] [PATCH 01/11] Add support for event tray moved of removable disks

2012-03-23 Thread Daniel Veillard
On Wed, Mar 14, 2012 at 11:26:45PM +0800, Osier Yang wrote: This patch introduces a new event type for the QMP event DEVICE_TRAY_MOVED, which occurs when the tray of a removable disk is moved (i.e opened or closed): VIR_DOMAIN_EVENT_ID_TRAY_CHANGE The event's data includes the device

Re: [libvirt] [PATCH 02/11] docs: Add documentation for new attribute tray of disk target

2012-03-23 Thread Daniel Veillard
On Wed, Mar 14, 2012 at 11:26:46PM +0800, Osier Yang wrote: Example XML: disk type='file' device='cdrom' driver name='qemu' type='raw'/ source file='/tmp/cdrom.img'/ target dev='hdd' bus='ide' tray='open'/ /disk --- docs/formatdomain.html.in | 13

Re: [libvirt] [PATCH 03/11] conf: Parse and for the tray attribute

2012-03-23 Thread Daniel Veillard
On Wed, Mar 14, 2012 at 11:26:47PM +0800, Osier Yang wrote: The tray is only allowed for removable disks, i.e. CDROM and Floppy disks. As the value for tray defaults to closed, lots of tests are updated to include tray='closed' in the disk target XML. I tend to think tray='closed' should

Re: [libvirt] [PATCH 03/11] conf: Parse and for the tray attribute

2012-03-23 Thread Osier Yang
On 03/23/2012 04:05 PM, Daniel Veillard wrote: On Wed, Mar 14, 2012 at 11:26:47PM +0800, Osier Yang wrote: The tray is only allowed for removable disks, i.e. CDROM and Floppy disks. As the value for tray defaults to closed, lots of tests are updated to include tray='closed' in the disk

Re: [libvirt] [PATCH 04/11] qemu: Do not start with source for removable disks if tray is open

2012-03-23 Thread Daniel Veillard
On Wed, Mar 14, 2012 at 11:26:48PM +0800, Osier Yang wrote: This is similiar with physical world, one will be surprised if the box starts with medium exists while the tray is open. New tests are added, tests disk-{cdrom,floppy}-tray are for the qemu supports -device flag, and

Re: [libvirt] [PATCH 05/11] qemu: Prohibit setting tray status as open for block type disk

2012-03-23 Thread Daniel Veillard
On Wed, Mar 14, 2012 at 11:26:49PM +0800, Osier Yang wrote: -- Created this as a seperate patch, as I'm not quite sure if it's good to do this in libvirt, it's more like a protection for qemu problem, i.e. closing the physical drive tray won't close the guest tray. Paolo persist in doing this

Re: [libvirt] [PATCH 03/11] conf: Parse and for the tray attribute

2012-03-23 Thread Daniel Veillard
On Fri, Mar 23, 2012 at 05:48:32PM +0800, Osier Yang wrote: On 03/23/2012 04:05 PM, Daniel Veillard wrote: On Wed, Mar 14, 2012 at 11:26:47PM +0800, Osier Yang wrote: The tray is only allowed for removable disks, i.e. CDROM and Floppy disks. As the value for tray defaults to closed,

Re: [libvirt] [PATCH 06/11] qemu: Update tray status while tray moved event is emitted

2012-03-23 Thread Daniel Veillard
On Wed, Mar 14, 2012 at 11:26:50PM +0800, Osier Yang wrote: With this patch, libvirt won't start the guest with the medium source which already ejected by guest when doing migration, or saving/restoring. --- src/qemu/qemu_process.c | 10 ++ 1 files changed, 10 insertions(+), 0

Re: [libvirt] [PATCH 07/11] Add support for the wakeup event

2012-03-23 Thread Daniel Veillard
On Wed, Mar 14, 2012 at 11:26:51PM +0800, Osier Yang wrote: This patch introduces a new event type for the QMP event WAKEUP: VIR_DOMAIN_EVENT_ID_PMWAKEUP The event doesn't take any data, but considering there might be reason for wakeup in future, the callback definition is: typedef

Re: [libvirt] [PATCH 08/11] Add support for the suspend event

2012-03-23 Thread Daniel Veillard
On Wed, Mar 14, 2012 at 11:26:52PM +0800, Osier Yang wrote: This patch introduces a new event type for the QMP event SUSPEND: VIR_DOMAIN_EVENT_ID_PMSUSPEND The event doesn't take any data, but considering there might be reason for wakeup in future, the callback definition is:

Re: [libvirt] [PATCH 09/11] New domain state pmsuspended

2012-03-23 Thread Daniel Veillard
On Wed, Mar 14, 2012 at 11:26:53PM +0800, Osier Yang wrote: This introduces a new domain state pmsuspended to represent the domain which has been suspended by guest power management, e.g. (entered itno s3 state). Because a running state could typo: into ! be confused in this case, one will

Re: [libvirt] [PATCH 10/11] qemu: Update domain state to pmsuspended while suspend event occurs

2012-03-23 Thread Daniel Veillard
On Wed, Mar 14, 2012 at 11:26:54PM +0800, Osier Yang wrote: --- src/qemu/qemu_process.c | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index d55c269..e041f8d 100644 --- a/src/qemu/qemu_process.c +++

Re: [libvirt] [PATCH 11/11] qemu: Update domain status to running while wakeup event is emitted

2012-03-23 Thread Daniel Veillard
On Wed, Mar 14, 2012 at 11:26:55PM +0800, Osier Yang wrote: This introduces a new running reason VIR_DOMAIN_RUNNING_WAKEUP, and new suspend event type VIR_DOMAIN_EVENT_STARTED_WAKEUP. While a wakeup event is emitted, the domain which entered into VIR_DOMAIN_PMSUSPENDED will be transferred to

[libvirt] [PATCH] Set default name for SPICE agent channel

2012-03-23 Thread Christophe Fergeau
libvirt documentation for channels with type 'spicevmc' says that the 'target' child node has: an optional attribute name controls how the guest will have access to the channel, and defaults to name='com.redhat.spice.0'. However, this default value is never set in libvirt code base, there's only

Re: [libvirt] [PATCH 1/1] Clarify virsh freecell manpage entry

2012-03-23 Thread Dave Allan
On Thu, Mar 22, 2012 at 09:42:50PM -0600, Eric Blake wrote: On 03/22/2012 02:49 PM, Dave Allan wrote: --- tools/virsh.pod | 15 ++- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/tools/virsh.pod b/tools/virsh.pod index f0df4fd..a8bd739 100644 ---

Re: [libvirt] Problem with Open vSwitch and dnsmasq

2012-03-23 Thread Daniele Milani
Date: Thu, 22 Mar 2012 15:11:44 -0400 From: la...@laine.org To: libvir-list@redhat.com Subject: Re: [libvirt] Problem with Open vSwitch and dnsmasq On 03/22/2012 09:10 AM, Daniele Milani wrote: Dear all, I have the following situation: -I replaced the standard bridge driver with

Re: [libvirt] Problem with Open vSwitch and dnsmasq

2012-03-23 Thread Daniele Milani
Date: Thu, 22 Mar 2012 11:43:03 -0700 Subject: Re: [libvirt] Problem with Open vSwitch and dnsmasq From: aatt...@nicira.com To: dano1...@hotmail.it CC: libvir-list@redhat.com; roberto.sa...@polito.it; paolo.smirag...@polito.it; d...@openvswitch.org On Thu, Mar 22, 2012 at 11:11 AM, Daniele

Re: [libvirt] [PATCH 01/14] Add test case for virURIPtr classs

2012-03-23 Thread Daniel P. Berrange
On Thu, Mar 22, 2012 at 11:54:07AM +0800, Osier Yang wrote: On 2012年03月21日 01:33, Daniel P. Berrange wrote: From: Daniel P. Berrangeberra...@redhat.com To ensure we properly escape unescape IPv6 numeric addresses, add a test case * tests/Makefile.am, tests/viruritest.c: URI parsing test

Re: [libvirt] [PATCH 08/14] Add a virKeyfilePtr object for parsing '.ini' files

2012-03-23 Thread Daniel P. Berrange
On Thu, Mar 22, 2012 at 05:34:54PM +0800, Osier Yang wrote: On 2012年03月21日 01:33, Daniel P. Berrange wrote: From: Daniel P. Berrangeberra...@redhat.com +static int virKeyFileParseValue(virKeyFileParserCtxtPtr ctxt) +{ +int ret = -1; +const char *keystart; +const char

Re: [libvirt] [PATCH 12/14] Add APIs for handling lookup of auth credentials from config file

2012-03-23 Thread Daniel P. Berrange
On Thu, Mar 22, 2012 at 07:02:31AM -0600, Eric Blake wrote: On 03/20/2012 11:33 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com This defines the format for the auth credential config file and provides APIs to access the data. The config file contains one or

Re: [libvirt] [PATCH 11/14] Add helper API for finding auth file path

2012-03-23 Thread Daniel P. Berrange
On Thu, Mar 22, 2012 at 04:34:16PM +0800, Osier Yang wrote: On 2012年03月21日 01:33, Daniel P. Berrange wrote: +int virAuthGetConfigFilePath(virConnectPtr conn, + char **path) +{ +int ret = -1; +size_t i; +const char *authenv = getenv(LIBVIRT_AUTH_FILE);

Re: [libvirt] [PATCH 08/14] Add a virKeyfilePtr object for parsing '.ini' files

2012-03-23 Thread Osier Yang
On 03/23/2012 08:16 PM, Daniel P. Berrange wrote: On Thu, Mar 22, 2012 at 05:34:54PM +0800, Osier Yang wrote: On 2012年03月21日 01:33, Daniel P. Berrange wrote: From: Daniel P. Berrangeberra...@redhat.com +static int virKeyFileParseValue(virKeyFileParserCtxtPtr ctxt) +{ +int ret = -1; +

Re: [libvirt] [PATCH 0/6] atomic snapshots, rounds 4 and 5

2012-03-23 Thread Paolo Bonzini
Il 23/03/2012 05:17, Eric Blake ha scritto: I was originally going to send this as two rounds, one for the XML additions of adding mirrors, and one for the flag addition to virDomainSnapshotDelete for mapping to drive-reopen; but it turned out that testing is easier if I finish the series.

Re: [libvirt] [PATCH 04/14] Centralize error reporting for URI parsing/formatting problems

2012-03-23 Thread Daniel P. Berrange
On Thu, Mar 22, 2012 at 12:03:11PM +0800, Osier Yang wrote: On 2012年03月21日 01:33, Daniel P. Berrange wrote: From: Daniel P. Berrangeberra...@redhat.com @@ -70,8 +84,7 @@ virURIFormat(virURIPtr uri) char *ret; /* First check: does it make sense to do anything */ -if (uri !=

Re: [libvirt] [PATCH v3 2/2] x86: Allow sysinfo to fall back on /proc/cpuinfo if demidecode is absent.

2012-03-23 Thread Daniel Veillard
On Thu, Mar 15, 2012 at 04:17:20PM +0530, Prerna wrote: From: Prerna Saxena pre...@linux.vnet.ibm.com Date: Thu, 16 Feb 2012 15:33:43 +0530 Subject: [PATCH 2/2] Sysinfo : Allow x86 to fetch sysinfo from /proc/cpuinfo in the event 'dmidecode' is absent in the system. Until now, libvirt on

Re: [libvirt] [PATCH v3 2/2] x86: Allow sysinfo to fall back on /proc/cpuinfo if demidecode is absent.

2012-03-23 Thread Daniel Veillard
On Thu, Mar 15, 2012 at 04:17:20PM +0530, Prerna wrote: From: Prerna Saxena pre...@linux.vnet.ibm.com Date: Thu, 16 Feb 2012 15:33:43 +0530 Subject: [PATCH 2/2] Sysinfo : Allow x86 to fetch sysinfo from /proc/cpuinfo in the event 'dmidecode' is absent in the system. Until now, libvirt on

Re: [libvirt] [PATCH v3 1/2] PowerPC : Implement sysinfo on PowerPC.

2012-03-23 Thread Daniel Veillard
On Thu, Mar 15, 2012 at 04:13:26PM +0530, Prerna wrote: From: Prerna Saxena pre...@linux.vnet.ibm.com Date: Thu, 15 Mar 2012 16:05:26 +0530 Subject: [PATCH 1/2] Implement sysinfo on PowerPC. Libvirt on x86 parses 'dmidecode' to gather characteristics of host system. On PowerPC, this is now

Re: [libvirt] [PATCH 03/11] conf: Parse and for the tray attribute

2012-03-23 Thread Osier Yang
On 03/23/2012 05:29 PM, Daniel Veillard wrote: On Fri, Mar 23, 2012 at 05:48:32PM +0800, Osier Yang wrote: On 03/23/2012 04:05 PM, Daniel Veillard wrote: On Wed, Mar 14, 2012 at 11:26:47PM +0800, Osier Yang wrote: The tray is only allowed for removable disks, i.e. CDROM and Floppy disks.

[libvirt] [PATCH] spec: Add missed dependancy for numad

2012-03-23 Thread Osier Yang
numad is available since Fedora 17 and RHEL6.X. And it's not supported on s390[x] and ARM. --- configure.ac| 26 +- libvirt.spec.in | 19 ++- src/qemu/qemu_process.c |2 +- 3 files changed, 40 insertions(+), 7 deletions(-) diff

Re: [libvirt] [PATCH 0/6] atomic snapshots, rounds 4 and 5

2012-03-23 Thread Eric Blake
On 03/23/2012 06:48 AM, Paolo Bonzini wrote: Il 23/03/2012 05:17, Eric Blake ha scritto: I was originally going to send this as two rounds, one for the XML additions of adding mirrors, and one for the flag addition to virDomainSnapshotDelete for mapping to drive-reopen; but it turned out that

Re: [libvirt] [PATCH] Add qemu support for ppc64 on FC16 or above for rpm packaging

2012-03-23 Thread Laine Stump
On 03/23/2012 12:29 AM, Li Zhang wrote: On Fedora16 or above, qemu is supported now. So it is added in rpm packaging. Signed-off-by: Li Zhang zhlci...@linux.vnet.ibm.com --- libvirt.spec.in |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libvirt.spec.in

Re: [libvirt] [PATCH] snapshot: improve qemu handling of reused snapshot targets

2012-03-23 Thread Jiri Denemark
On Tue, Mar 20, 2012 at 15:29:37 -0600, Eric Blake wrote: The oVirt developers have stated that the real reasons they want to have qemu reuse existing volumes when creating a snapshot are: 1. the management framework is set up so that creation has to be done from a central node for proper

Re: [libvirt] Problem with Open vSwitch and dnsmasq

2012-03-23 Thread Ansis Atteka
On Fri, Mar 23, 2012 at 4:14 AM, Daniele Milani dano1...@hotmail.it wrote: -- Date: Thu, 22 Mar 2012 11:43:03 -0700 Subject: Re: [libvirt] Problem with Open vSwitch and dnsmasq From: aatt...@nicira.com To: dano1...@hotmail.it CC: libvir-list@redhat.com;

Re: [libvirt] [PATCH 0/6] atomic snapshots, rounds 4 and 5

2012-03-23 Thread Paolo Bonzini
Il 23/03/2012 16:49, Eric Blake ha scritto: My idea now is to work with Paolo at understanding how the same qemu 'transaction' and 'drive-reopen' commands can do both snapshot mirroring and streaming mirroring, then I hope to have a counter-proposal RFC posted by Monday, with an

Re: [libvirt] [PATCH v2 1/1] qemu, util: on restart of libvirt restart vepa callbacks

2012-03-23 Thread Laine Stump
On 03/21/2012 09:21 AM, D. Herrendoerfer wrote: From: D. Herrendoerfer d.herrendoer...@herrendoerfer.name When libvirtd is restarted, also restart the netlink event message callbacks for existing VEPA connections and send a message to lldpad for these existing links, so it learns the new

Re: [libvirt] [PATCH] spec: Add missed dependancy for numad

2012-03-23 Thread Eric Blake
On 03/23/2012 09:39 AM, Osier Yang wrote: numad is available since Fedora 17 and RHEL6.X. And it's not supported on s390[x] and ARM. --- configure.ac| 26 +- libvirt.spec.in | 19 ++- src/qemu/qemu_process.c |2 +- 3 files

[libvirt] [PATCH] build: fix incorrect enum declaration

2012-03-23 Thread Eric Blake
Recent changes have caused build failures on builds where pdwtags works: commit a26a196 mistakenly exported a public variable commits a26a196, 57ddcc2, 487c063 all had copy-paste bugs in hand-updating the golden API rather than rerunning pdwtags * include/libvirt/libvirt.h.in

Re: [libvirt] problems starting several qemu VMS simultaneously

2012-03-23 Thread Serge Hallyn
Quoting Wen Congyang (we...@cn.fujitsu.com): At 03/22/2012 06:54 AM, Serge Hallyn Wrote: Hi, I grabbed today's git head of libvirt. Created a VM (clean install of ubuntu oneiric, installed through virt-manager), and cloned it 3 times. Then I did serge@ubuntu:~$ for i in `seq 1

[libvirt] [RFC: PATCH 2/2] viruri: add more tests

2012-03-23 Thread Eric Blake
When qparams support was dropped in commit bc1ff160, we forgot to add tests to ensure that viruri can do the same round trip handling of a URI. Also, we forgot to report an OOM error. NOTE: THIS TEST CURRENTLY FAILS ON ANY QUERY WITH % ESCAPING. * tests/viruritest.c (mymain): Add tests based on

[libvirt] [PATCH 1/2] build: drop obsolete qparams test

2012-03-23 Thread Eric Blake
Otherwise, 'make check' breaks since commit bc1ff160 deleted qparams.h. A later patch will ensure that viruri takes over what qparams used to do. * tests/qparamtest.c (mymain): Delete, now that we have viruri. * tests/Makefile.am (check_PROGRAMS, TESTS, qparamtest_SOURCES): Delete old test. *

Re: [libvirt] [PATCH 06/14] Store parsed query parameters directly in the virURIPtr struct

2012-03-23 Thread Eric Blake
On 03/20/2012 11:33 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Avoid the need for each driver to parse query parameters itself by storing them directly in the virURIPtr struct. The parsing code is a copy of that from src/util/qparams.c The latter will be

Re: [libvirt] [PATCHv2 4/3] snapshot: make offline qemu snapshots atomic

2012-03-23 Thread Eric Blake
On 03/19/2012 03:25 PM, Eric Blake wrote: On 03/19/2012 07:40 AM, Peter Krempa wrote: On 03/17/2012 05:33 PM, Eric Blake wrote: Offline internal snapshots can be rolled back with just a little bit of refactoring, meaning that we are now automatically atomic. * src/qemu/qemu_domain.c

Re: [libvirt] [PATCH 2/2] snapshot: wire up qemu transaction command

2012-03-23 Thread Eric Blake
On 03/22/2012 08:53 AM, Eric Blake wrote: On 03/22/2012 08:47 AM, Peter Krempa wrote: On 03/17/2012 10:27 PM, Eric Blake wrote: The hardest part about adding transactions is not using the new monitor command, but undoing the partial changes we made prior to a failed transaction. I don't

Re: [libvirt] [PATCH] snapshot: improve qemu handling of reused snapshot targets

2012-03-23 Thread Eric Blake
On 03/23/2012 11:06 AM, Jiri Denemark wrote: I would agree. It makes more sense if REUSE reuses the whole file including its content instead of reusing just the file name and some metadata. Note that this flag is all-or-nothing, and only selects between 'existing' and the default

Re: [libvirt] [PATCH] spec: Add missed dependancy for numad

2012-03-23 Thread Osier Yang
On 2012年03月24日 03:27, Eric Blake wrote: On 03/23/2012 09:39 AM, Osier Yang wrote: numad is available since Fedora 17 and RHEL6.X. And it's not supported on s390[x] and ARM. --- configure.ac| 26 +- libvirt.spec.in | 19 ++-