Re: [libvirt] [PATCH] fix a bug of sheepdog storage driver

2013-02-08 Thread harryxiyou
On Sat, Feb 9, 2013 at 5:40 AM, Eric Blake wrote: > On 02/08/2013 12:26 AM, Osier Yang wrote: >> On 2013年02月08日 14:48, harryxi...@gmail.com wrote: > > Your 'From:' line didn't match your 'Signed-off-by:' line. That makes > our generated AUTHORS file look strange. I would suggest doing: > > git c

Re: [libvirt] [PATCH 1/5] Public API to allow defining new domain using OVA file

2013-02-08 Thread Ata Bohra
> NACK, as I said with previous postings, this does not belong in > libvirt APIs, it should be built as a layer above. [AB]: Thanks for reviewing this Daniel. I completly understand the concern of not making it part of libvirt API, but as discussed in other thread (https://www.redhat.com/arc

Re: [libvirt] Thoughts on adding a domain type of jvm

2013-02-08 Thread Scott Stark
- Original Message - From: "Eric Blake" To: "Scott Stark" Cc: libvir-list@redhat.com Sent: Friday, February 8, 2013 12:21:17 PM Subject: Re: [libvirt] Thoughts on adding a domain type of jvm On 02/08/2013 12:20 PM, Scott Stark wrote: > [any way you can convince your mailer to wrap lon

Re: [libvirt] [PATCH 00/11] Revisit xen driver Coverity cleanup changes

2013-02-08 Thread Eric Blake
On 02/08/2013 04:15 PM, Jim Fehlig wrote: >> I was trying to go with the 80 column rule. For 99% they could fit on >> one line if I removed one extra space. For a couple, spanning 2 lines >> kept the 80 columns in effect. In looking at other drivers - I don't >> think any of them typecast the *Pri

Re: [libvirt] [PATCH 00/11] Revisit xen driver Coverity cleanup changes

2013-02-08 Thread Jim Fehlig
John Ferlan wrote: > On 01/30/2013 01:51 PM, John Ferlan wrote: > >> src/xen/xen_hypervisor.c | 220 -- >> src/xen/xen_inotify.c| 48 >> src/xen/xend_internal.c | 303 >> ++- >> src/xen/xm_internal.c

Re: [libvirt] [PATCH 3/4] Pass virQEMUDriverPtr into APIs managed shared disk list

2013-02-08 Thread Eric Blake
On 02/07/2013 10:46 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > Currently the APIs for managing the shared disk list take > a virHashTablePtr as the primary argument. This is bad > because it requires the caller to deal with locking of > the QEMU driver. Switch the APIs to take

Re: [libvirt] [PATCH] qemu: Fix potential crash when attaching/detaching cdrom or floppy

2013-02-08 Thread Eric Blake
On 02/07/2013 06:21 AM, Osier Yang wrote: > The crash could happen if the disk source is empty for cdrom or > floppy disk. > --- > src/qemu/qemu_driver.c |7 +-- > src/qemu/qemu_process.c |3 +++ > 2 files changed, 8 insertions(+), 2 deletions(-) I'm not sure if this was subsumed by

Re: [libvirt] [PATCH 1/4] storage: factor out large integer reads

2013-02-08 Thread Eric Blake
On 02/07/2013 07:53 AM, Daniel P. Berrange wrote: > On Wed, Feb 06, 2013 at 10:10:17PM -0700, Eric Blake wrote: >> This makes code easier to read, by avoiding lines longer than >> 80 columns and removing the repetition from the callers. >> > > How about putting these helpful APIs in some other sr

Re: [libvirt] [PATCH 2/4] Serialize execution of security manager APIs

2013-02-08 Thread Eric Blake
On 02/07/2013 10:46 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > Add locking to virSecurityManagerXXX APIs, so that use of the > security drivers is internally serialized. This avoids the need > to rely on the global driver locks to achieve serialization > > Signed-off-by: Dani

Re: [libvirt] [PATCH 1/4] Turn virSecurityManager into a virObjectLockable

2013-02-08 Thread Eric Blake
On 02/07/2013 10:46 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > To enable locking to be introduced to the security manager > objects later, turn virSecurityManager into a virObjectLockable > class > > Signed-off-by: Daniel P. Berrange > --- > src/lxc/lxc_controller.c

Re: [libvirt] [PATCH] fix a bug of sheepdog storage driver

2013-02-08 Thread Eric Blake
On 02/08/2013 12:26 AM, Osier Yang wrote: > On 2013年02月08日 14:48, harryxi...@gmail.com wrote: Your 'From:' line didn't match your 'Signed-off-by:' line. That makes our generated AUTHORS file look strange. I would suggest doing: git config --global sendemail.from 'Harry Wei ' so that future pat

Re: [libvirt] [PATCH 4/4] qemu: Move shared disk entry adding and unpriv_sgio seting

2013-02-08 Thread John Ferlan
On 02/08/2013 08:08 AM, Osier Yang wrote: > The disk def could be free'ed by qemuDomainChangeEjectableMedia > for cdrom or floppy disk. This moves the adding and setting before > the attaching takes place. And for cdrom floppy disk, if the > change is ejecting, removing the existed hash entry for i

Re: [libvirt] [PATCH v2 0/4] net: support set source address(es) and ports for NAT

2013-02-08 Thread Eric Blake
On 02/08/2013 10:27 AM, Daniel P. Berrange wrote: > On Mon, Feb 04, 2013 at 10:45:22AM +0100, Natanael Copa wrote: >> This is a rework of the previous sent 'set public ip for nat' patches [1]. >> >> Changes v2: >> - Use separate attributes for addresses and ports as suggested by Laine. >> - sup

Re: [libvirt] [PATCH v2 1/4] util: refactor iptables command construction into multiple steps

2013-02-08 Thread Eric Blake
On 02/08/2013 10:25 AM, Daniel P. Berrange wrote: > On Mon, Feb 04, 2013 at 10:45:23AM +0100, Natanael Copa wrote: >> Instead of creating an iptables command in one shot, do it in steps >> so we can add conditional options like physdev and protocol. >> >> This removes code duplication while keeping

Re: [libvirt] [PATCH 3/4] qemu: Don't remove hash entry of other domains

2013-02-08 Thread John Ferlan
On 02/08/2013 08:08 AM, Osier Yang wrote: > qemuProcessStart invokes qemuProcessStop when fails, to avoid > removing hash entry which belongs to other domain(s), this introduces > a new virBitmapPtr argument for qemuProcessStop. And qemuProcessStart > sets the bit for the disk only if it's successf

Re: [libvirt] [PATCH 2/4] qemu: Merge qemuCheckSharedDisk into qemuAddSharedDisk

2013-02-08 Thread John Ferlan
On 02/08/2013 08:08 AM, Osier Yang wrote: > Based on moving various checking into qemuAddSharedDisk, this > avoids the caller using it in wrong ways. > --- > src/qemu/qemu_conf.c| 50 > src/qemu/qemu_driver.c |5 > src/qemu/qemu_process.

Re: [libvirt] [PATCH 13/15] util: virSetUIDGIDWithCaps - change uid while keeping caps

2013-02-08 Thread Laine Stump
On 02/08/2013 02:01 PM, Eric Blake wrote: > On 02/07/2013 02:37 PM, Laine Stump wrote: >> Normally when a process' uid is changed to non-0, all the capabilities >> bits are cleared, even those explicitly set with calls to >> capng_update()/capng_apply() made immediately before setuid. And >> *after

Re: [libvirt] [PATCH 14/15] util: maintain caps when running command with uid != 0

2013-02-08 Thread Laine Stump
On 02/08/2013 02:05 PM, Eric Blake wrote: > On 02/07/2013 02:37 PM, Laine Stump wrote: >> virCommand was previously calling virSetUIDGID() to change the uid and >> gid of the child process, then separately calling >> virSetCapabilities(). This did not work if the desired uid was != 0, >> since a se

Re: [libvirt] Thoughts on adding a domain type of jvm

2013-02-08 Thread Eric Blake
On 02/08/2013 12:20 PM, Scott Stark wrote: [any way you can convince your mailer to wrap long lines?] > I'm working with a java vm vendor that is developing a multi-tenancy jvm and > is trying to leverage the libvirt framework for the domain configuration. > Right now the java language binding

Re: [libvirt] [PATCH 1/4] qemu: Add checking in helpers for sgio setting

2013-02-08 Thread John Ferlan
On 02/08/2013 08:07 AM, Osier Yang wrote: > This moves the checking into the helpers, to avoid the > callers missing the checking. > --- > src/qemu/qemu_conf.c| 20 > src/qemu/qemu_conf.h|4 ++-- > src/qemu/qemu_driver.c | 18 +++--- > src/qemu/qem

Re: [libvirt] [PATCH 15/15] qemu: set CAP_COMPROMISE_KERNEL so that pci passthrough works

2013-02-08 Thread Daniel P. Berrange
On Fri, Feb 08, 2013 at 12:07:16PM -0700, Eric Blake wrote: > On 02/07/2013 02:37 PM, Laine Stump wrote: > > Any system with CAP_COMPROMISE_KERNEL available in the kernel was not > > able to perform PCI passthrough device assignment without 1) running > > qemu as root *and* 2) setting "clear_emulat

[libvirt] Thoughts on adding a domain type of jvm

2013-02-08 Thread Scott Stark
I'm working with a java vm vendor that is developing a multi-tenancy jvm and is trying to leverage the libvirt framework for the domain configuration. Right now the java language binding leverages the libvirt c library for parsing the domain.xml file. What are the thoughts on adding a 'jvm' doma

Re: [libvirt] [PATCH 15/15] qemu: set CAP_COMPROMISE_KERNEL so that pci passthrough works

2013-02-08 Thread Eric Blake
On 02/07/2013 02:37 PM, Laine Stump wrote: > Any system with CAP_COMPROMISE_KERNEL available in the kernel was not > able to perform PCI passthrough device assignment without 1) running > qemu as root *and* 2) setting "clear_emulator_capabilities=0" in > /etc/libvirt/qemu.conf. > > This patch is t

Re: [libvirt] [PATCH 14/15] util: maintain caps when running command with uid != 0

2013-02-08 Thread Eric Blake
On 02/07/2013 02:37 PM, Laine Stump wrote: > virCommand was previously calling virSetUIDGID() to change the uid and > gid of the child process, then separately calling > virSetCapabilities(). This did not work if the desired uid was != 0, > since a setuid to anything other than 0 normally clears al

Re: [libvirt] [PATCH 13/15] util: virSetUIDGIDWithCaps - change uid while keeping caps

2013-02-08 Thread Eric Blake
On 02/07/2013 02:37 PM, Laine Stump wrote: > Normally when a process' uid is changed to non-0, all the capabilities > bits are cleared, even those explicitly set with calls to > capng_update()/capng_apply() made immediately before setuid. And > *after* the process' uid has been changed, it no longe

Re: [libvirt] [PATCHv2 1/2] virDomainSaveXML: Reject domains which name contain '/'

2013-02-08 Thread Eric Blake
On 02/08/2013 11:44 AM, Jim Fehlig wrote: >> Seems this should be in a more "general" location. Would the same rules >> apply to >> other objects (networks, storage, etc.)? What other characters should be >> avoided? >> Having a comma, semi-colon, colon, etc. could have interesting results. >

Re: [libvirt] [PATCH 12/15] util: drop capabilities immediately after changing uid/gid of child

2013-02-08 Thread Eric Blake
On 02/07/2013 02:37 PM, Laine Stump wrote: > This is an interim measure to make sure everything still works in this > order. The next step will be to perform capabilities drop and > setuid/gid as a single operation (which is the only way to keep any > capabilities when switching to a non-root uid).

Re: [libvirt] [PATCHv2 1/2] virDomainSaveXML: Reject domains which name contain '/'

2013-02-08 Thread Jim Fehlig
John Ferlan wrote: > On 02/07/2013 08:27 AM, Christophe Fergeau wrote: > >> Similarly to 790f912b4 which rejects snapshots names containing, >> this commit changes virDomainSaveXML to reject domains with a '/' >> in their name. The domain name is used as a filename, so this >> leads to unexpecte

Re: [libvirt] [PATCH 09/15] util: add security label setting to virCommand

2013-02-08 Thread Laine Stump
On 02/08/2013 11:23 AM, Daniel P. Berrange wrote: > On Thu, Feb 07, 2013 at 04:37:50PM -0500, Laine Stump wrote: >> virCommand gets the new API virCommandSetSecLabel(), which saves a >> copy of a null-terminated string in the virCommand. During >> virCommandRun, if the seclabel is non-NULL and we'v

Re: [libvirt] [PATCH] qemu: support vhost-net for generic ethernet devices

2013-02-08 Thread Laine Stump
On 02/08/2013 01:04 PM, Eric Blake wrote: > On 02/08/2013 10:58 AM, Laine Stump wrote: >> >From qemu's point of view these are still just tap devices, so there's >> no reason they shouldn't work with vhost-net; as a matter of fact, >> Raja Sivaramakrishnan verified on libvir-list >> that at least

Re: [libvirt] [PATCH] qemu: support vhost-net for generic ethernet devices

2013-02-08 Thread Eric Blake
On 02/08/2013 10:58 AM, Laine Stump wrote: >>From qemu's point of view these are still just tap devices, so there's > no reason they shouldn't work with vhost-net; as a matter of fact, > Raja Sivaramakrishnan verified on libvir-list > that at least the qemu_command.c part of this patch works: > >

[libvirt] [PATCH] qemu: support vhost-net for generic ethernet devices

2013-02-08 Thread Laine Stump
>From qemu's point of view these are still just tap devices, so there's no reason they shouldn't work with vhost-net; as a matter of fact, Raja Sivaramakrishnan verified on libvir-list that at least the qemu_command.c part of this patch works: https://www.redhat.com/archives/libvir-list/2012-De

Re: [libvirt] [PATCH 07/15] qemu: replace exec hook with virCommandSetUID/GID in storage_backend

2013-02-08 Thread Eric Blake
On 02/07/2013 02:37 PM, Laine Stump wrote: > --- > src/storage/storage_backend.c | 28 ++-- > 1 file changed, 6 insertions(+), 22 deletions(-) > > @@ -576,7 +558,9 @@ static int > virStorageBackendCreateExecCommand(virStoragePoolObjPtr pool, > } > } > > -

Re: [libvirt] [PATCH] network_conf.c: Free xmlDoc after use

2013-02-08 Thread Eric Blake
On 02/08/2013 07:52 AM, John Ferlan wrote: > On 02/08/2013 09:26 AM, Michal Privoznik wrote: >> The virNetworkObjUpdateParseFile() function was not freeing the xml >> variable, leaving us with a memory leak. >> --- >> src/conf/network_conf.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --gi

[libvirt] [PATCHv2 4/5] S390: Add hotplug support for s390 virtio devices

2013-02-08 Thread Viktor Mihajlovski
From: "J.B. Joret" We didn't yet expose the virtio device attach and detach functionality for s390 domains as the device hotplug was very limited with the old virtio-s390 bus. With the CCW bus there's full hotplug support for virtio devices in QEMU, so we are adding this to libvirt too. Since th

[libvirt] [PATCHv2 3/5] S390: QEMU driver support for CCW addresses

2013-02-08 Thread Viktor Mihajlovski
This commit adds the QEMU driver support for CCW addresses. The current QEMU only allows virtio devices to be attached to the CCW bus. We named the new capability indicating that support QEMU_CAPS_VIRTIO_CCW accordingly. The fact that CCW devices can only be assigned to domains with a machine type

[libvirt] [PATCHv2 5/5] S390: Testcases for virtio-ccw machines

2013-02-08 Thread Viktor Mihajlovski
This adds and corrects testcases for virtio devices on s390 guests. Signed-off-by: Viktor Mihajlovski --- V2 Changes - adapt the testcase XML files to use the new attributes - use different variations for the values: hex, decimal, leading zeroes... .../qemuxml2argv-console-virtio-ccw.args

[libvirt] [PATCHv2 2/5] S390: domain_conf support for CCW

2013-02-08 Thread Viktor Mihajlovski
Add necessary handling code for the new s390 CCW address type to virDomainDeviceInfo. Further, introduce memory management, XML parsing, output formatting and range validation for the new virDomainDeviceCCWAddress type. Signed-off-by: Viktor Mihajlovski --- V2 Changes - adapted virDomainDeviceC

[libvirt] [PATCHv2 0/5] S390: Support for native CCW bus

2013-02-08 Thread Viktor Mihajlovski
Originally, QEMU did not implement a native I/O bus for s390. The initial implementation had a machine type 's390-virtio' featuring a fully paravirtualized I/O system with an artificial bus type 'virtio-s390'. This bus had a number of short-comings, like the need for a non-standard device discovery

[libvirt] [PATCHv2 1/5] S390: Documentation for CCW address type

2013-02-08 Thread Viktor Mihajlovski
The native bus for s390 I/O is called CCW (channel command word). As QEMU has added basic support for the CCW bus, i.e. the ability to assign CCW devnos (bus addresses) to devices. Domains with the new machine type s390-ccw-virtio can use the CCW bus. Currently QEMU will only allow to define virtio

Re: [libvirt] [PATCH v2 0/4] net: support set source address(es) and ports for NAT

2013-02-08 Thread Daniel P. Berrange
On Mon, Feb 04, 2013 at 10:45:22AM +0100, Natanael Copa wrote: > This is a rework of the previous sent 'set public ip for nat' patches [1]. > > Changes v2: > - Use separate attributes for addresses and ports as suggested by Laine. > - support set port range without setting public ip > Broadl

Re: [libvirt] [PATCH v2 1/4] util: refactor iptables command construction into multiple steps

2013-02-08 Thread Daniel P. Berrange
On Mon, Feb 04, 2013 at 10:45:23AM +0100, Natanael Copa wrote: > Instead of creating an iptables command in one shot, do it in steps > so we can add conditional options like physdev and protocol. > > This removes code duplication while keeping existing behaviour. > > Signed-off-by: Natanael Copa

Re: [libvirt] [PATCH v2 2/4] net: support set public ip for forward mode nat

2013-02-08 Thread Daniel P. Berrange
On Mon, Feb 04, 2013 at 10:45:24AM +0100, Natanael Copa wrote: > Support setting which public ip to use for NAT via attribute > address in subelement in : > > ... > > > Unless I'm mis-understanding, this is just identical to using a range, with the start + end addresses equal eg

Re: [libvirt] [PATCH 10/15] security: add new virSecurityManagerSetChildProcessLabel API

2013-02-08 Thread Daniel P. Berrange
On Thu, Feb 07, 2013 at 04:37:51PM -0500, Laine Stump wrote: > The existing virSecurityManagerSetProcessLabel() API is designed so > that it must be called after forking the child process, but before > exec'ing the child. Due to the way the virCommand API works, that > means it needs to be put in a

Re: [libvirt] [PATCH 11/15] qemu: let virCommand set child process security labels/uid/gid

2013-02-08 Thread Daniel P. Berrange
On Thu, Feb 07, 2013 at 04:37:52PM -0500, Laine Stump wrote: > The qemu driver had been calling virSecurityManagerSetProcessLabel() > from a "pre-exec hook" function that is run after the child is forked, > but before exec'ing qemu. This is problematic because the uid and gid > of the child are set

Re: [libvirt] [PATCH 09/15] util: add security label setting to virCommand

2013-02-08 Thread Daniel P. Berrange
On Thu, Feb 07, 2013 at 04:37:50PM -0500, Laine Stump wrote: > virCommand gets the new API virCommandSetSecLabel(), which saves a > copy of a null-terminated string in the virCommand. During > virCommandRun, if the seclabel is non-NULL and we've been compiled > with a security driver, the appropria

Re: [libvirt] [PATCH 08/15] build: define SECDRIVER_LIBS in Makefile.am

2013-02-08 Thread Daniel P. Berrange
On Thu, Feb 07, 2013 at 04:37:49PM -0500, Laine Stump wrote: > This makes it simpler to include the necessary system security driver > libraries for a particular system. For this patch, several existing > conditional sections from the Makfile were replaced; I'll later be > adding SECDRIVER_LIBS to

Re: [libvirt] [PATCH 07/15] qemu: replace exec hook with virCommandSetUID/GID in storage_backend

2013-02-08 Thread Daniel P. Berrange
On Thu, Feb 07, 2013 at 04:37:48PM -0500, Laine Stump wrote: > --- > src/storage/storage_backend.c | 28 ++-- > 1 file changed, 6 insertions(+), 22 deletions(-) ACK Daniel -- |: http://berrange.com -o-http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.

Re: [libvirt] [PATCH 06/15] qemu: replace exec hook with virCommandSetUID/GID in qemuCaps*

2013-02-08 Thread Daniel P. Berrange
On Thu, Feb 07, 2013 at 04:37:47PM -0500, Laine Stump wrote: > Setting the uid/gid of the child process was the only thing done by > the hook function in this case, and that can now be done more simply > with virCommandSetUID/GID. > --- > src/qemu/qemu_capabilities.c | 61 > +++---

Re: [libvirt] libvirt and Parallels Cloud Storage

2013-02-08 Thread Josh Durgin
On 02/08/2013 06:47 AM, Alexander Gordeev wrote: В Thu, 7 Feb 2013 16:09:31 + "Daniel P. Berrange" пишет: On Mon, Feb 04, 2013 at 08:13:20PM +0400, Alexander Gordeev wrote: Hi! I'd like to develop libvirt integration with Parallels Cloud Storage (Pstorage) which is a new distributed file

Re: [libvirt] [PATCH] network_conf.c: Free xmlDoc after use

2013-02-08 Thread Michal Privoznik
On 08.02.2013 15:52, John Ferlan wrote: > On 02/08/2013 09:26 AM, Michal Privoznik wrote: >> The virNetworkObjUpdateParseFile() function was not freeing the xml >> variable, leaving us with a memory leak. >> --- >> src/conf/network_conf.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a

Re: [libvirt] [PATCH] network_conf.c: Free xmlDoc after use

2013-02-08 Thread John Ferlan
On 02/08/2013 09:26 AM, Michal Privoznik wrote: > The virNetworkObjUpdateParseFile() function was not freeing the xml > variable, leaving us with a memory leak. > --- > src/conf/network_conf.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/conf/network_conf.c b/src/conf/network_conf

Re: [libvirt] libvirt and Parallels Cloud Storage

2013-02-08 Thread Alexander Gordeev
В Thu, 7 Feb 2013 16:09:31 + "Daniel P. Berrange" пишет: > On Mon, Feb 04, 2013 at 08:13:20PM +0400, Alexander Gordeev wrote: > > Hi! > > > > I'd like to develop libvirt integration with Parallels Cloud > > Storage (Pstorage) which is a new distributed file system from > > Parallels designed

Re: [libvirt] [PATCH] virsh-snapshot: Fix xpath query to determine snapshot state

2013-02-08 Thread Peter Krempa
On 02/08/13 14:34, Jiri Denemark wrote: On Fri, Feb 08, 2013 at 14:26:28 +0100, Peter Krempa wrote: The query didn't match the external state correctly for offline internal snapshots. --- tools/virsh-snapshot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ACK, I wonder what d

[libvirt] [PATCH] virCommand: Don't misuse the eventloop for async IO

2013-02-08 Thread Michal Privoznik
Currently, if a command wants to do asynchronous IO, a callback is registered in the libvirtd eventloop to handle writes and reads. However, there's a race in virCommandWait. The eventloop may already be executing the callback, while virCommandWait is mangling internal state of virCommand. To deal

Re: [libvirt] [PATCH 00/11] Revisit xen driver Coverity cleanup changes

2013-02-08 Thread John Ferlan
On 01/30/2013 01:51 PM, John Ferlan wrote: > src/xen/xen_hypervisor.c | 220 -- > src/xen/xen_inotify.c| 48 > src/xen/xend_internal.c | 303 > ++- > src/xen/xm_internal.c| 195 ++---

[libvirt] [PATCH] network_conf.c: Free xmlDoc after use

2013-02-08 Thread Michal Privoznik
The virNetworkObjUpdateParseFile() function was not freeing the xml variable, leaving us with a memory leak. --- src/conf/network_conf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index c93916d..3604ff7 100644 --- a/src/conf/network_conf.c

Re: [libvirt] [PATCH] virsh-snapshot: Fix xpath query to determine snapshot state

2013-02-08 Thread Jiri Denemark
On Fri, Feb 08, 2013 at 14:26:28 +0100, Peter Krempa wrote: > The query didn't match the external state correctly for offline internal > snapshots. > --- > tools/virsh-snapshot.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/tools/virsh-snapshot.c b/tools/virsh-snap

Re: [libvirt] [PATCH V3 1/2] Intorduce file descriptor set for QEMU domains

2013-02-08 Thread Stefan Berger
On 02/08/2013 05:22 AM, Daniel P. Berrange wrote: On Thu, Feb 07, 2013 at 05:26:10PM -0500, Stefan Berger wrote: you agree to this XML ? Yes, sort sort of thing looks better to me Great. And v4 came out really good :-) Stefan -- libvir-list mailing list libvir-

[libvirt] [PATCH] virsh-snapshot: Fix xpath query to determine snapshot state

2013-02-08 Thread Peter Krempa
The query didn't match the external state correctly for offline internal snapshots. --- tools/virsh-snapshot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/virsh-snapshot.c b/tools/virsh-snapshot.c index ba57059..66776e2 100644 --- a/tools/virsh-snapshot.c +++ b/to

[libvirt] [PATCH 4/4] qemu: Move shared disk entry adding and unpriv_sgio seting

2013-02-08 Thread Osier Yang
The disk def could be free'ed by qemuDomainChangeEjectableMedia for cdrom or floppy disk. This moves the adding and setting before the attaching takes place. And for cdrom floppy disk, if the change is ejecting, removing the existed hash entry for it. --- src/qemu/qemu_driver.c | 23 +++

[libvirt] [PATCH 3/4] qemu: Don't remove hash entry of other domains

2013-02-08 Thread Osier Yang
qemuProcessStart invokes qemuProcessStop when fails, to avoid removing hash entry which belongs to other domain(s), this introduces a new virBitmapPtr argument for qemuProcessStop. And qemuProcessStart sets the bit for the disk only if it's successfully added into the hash table. Thus if the argume

[libvirt] [PATCH 2/4] qemu: Merge qemuCheckSharedDisk into qemuAddSharedDisk

2013-02-08 Thread Osier Yang
Based on moving various checking into qemuAddSharedDisk, this avoids the caller using it in wrong ways. --- src/qemu/qemu_conf.c| 50 src/qemu/qemu_driver.c |5 src/qemu/qemu_process.c | 53 -

[libvirt] [PATCH 1/4] qemu: Add checking in helpers for sgio setting

2013-02-08 Thread Osier Yang
This moves the checking into the helpers, to avoid the callers missing the checking. --- src/qemu/qemu_conf.c| 20 src/qemu/qemu_conf.h|4 ++-- src/qemu/qemu_driver.c | 18 +++--- src/qemu/qemu_process.c | 21 - 4 files change

[libvirt] [PATCH 0/4] Fix problems of shared disk management

2013-02-08 Thread Osier Yang
This fixes several problems of shared disk management, mainly about shared cdrom or floppy disk. Osier Yang (4): qemu: Add checking in helpers for sgio setting qemu: Merge qemuCheckSharedDisk into qemuAddSharedDisk qemu: Don't remove hash entry of other domains qemu: Move shared disk entry

Re: [libvirt] Why not add snapshot operations for Sheepdog storage driver in Libvirt

2013-02-08 Thread Eric Blake
On 02/08/2013 04:56 AM, harryxiyou wrote: > Hi all, > > Virsh has following operations about snapshot. > > Snapshot (help keyword 'snapshot') > snapshot-createCreate a snapshot from XML > snapshot-create-as Create a snapshot from a set of args > snapshot-c

Re: [libvirt] [PATCH] fix some bugs of sheepdog storage driver

2013-02-08 Thread Eric Blake
On 02/08/2013 03:48 AM, harryxi...@gmail.com wrote: > Signed-off-by: Harry Wei > > --- > src/storage/storage_backend_sheepdog.c | 10 ++ > 1 files changed, 10 insertions(+), 0 deletions(-) > > diff --git a/src/storage/storage_backend_sheepdog.c > b/src/storage/storage_backend_sheepdo

[libvirt] Why not add snapshot operations for Sheepdog storage driver in Libvirt

2013-02-08 Thread harryxiyou
Hi all, Virsh has following operations about snapshot. Snapshot (help keyword 'snapshot') snapshot-createCreate a snapshot from XML snapshot-create-as Create a snapshot from a set of args snapshot-current Get or set the current snapshot s

Re: [libvirt] [PATCH] fix some bugs of sheepdog storage driver

2013-02-08 Thread harryxiyou
On Fri, Feb 8, 2013 at 7:11 PM, Daniel P. Berrange wrote: > On Fri, Feb 08, 2013 at 06:49:47PM +0800, harryxi...@gmail.com wrote: >> Don't try to do other jobs if get cmd NULL. >> >> Signed-off-by: Harry Wei >> >> --- >> src/storage/storage_backend_sheepdog.c | 10 ++ >> 1 files change

Re: [libvirt] [PATCH] fix some bugs of sheepdog storage driver

2013-02-08 Thread Daniel P. Berrange
On Fri, Feb 08, 2013 at 06:49:47PM +0800, harryxi...@gmail.com wrote: > Don't try to do other jobs if get cmd NULL. > > Signed-off-by: Harry Wei > > --- > src/storage/storage_backend_sheepdog.c | 10 ++ > 1 files changed, 10 insertions(+), 0 deletions(-) > > diff --git a/src/storage/

[libvirt] [PATCH] fix some bugs of sheepdog storage driver

2013-02-08 Thread harryxiyou
Don't try to do other jobs if get cmd NULL. Signed-off-by: Harry Wei --- src/storage/storage_backend_sheepdog.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/src/storage/storage_backend_sheepdog.c b/src/storage/storage_backend_sheepdog.c index 218284d..1ce5

[libvirt] [PATCH] fix some bugs of sheepdog storage driver

2013-02-08 Thread harryxiyou
Signed-off-by: Harry Wei --- src/storage/storage_backend_sheepdog.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/src/storage/storage_backend_sheepdog.c b/src/storage/storage_backend_sheepdog.c index 218284d..1ce5aa4 100644 --- a/src/storage/storage_backend_

Re: [libvirt] [Patch]Fix bugs of Sheepdog storage driver

2013-02-08 Thread harryxiyou
On Fri, Feb 8, 2013 at 2:00 PM, Osier Yang wrote: [...] > > Btw, if you look further more on virStorageBackendSheepdogRefreshVol, > you will see it has bugs too. It can be another patch though. > Thanks, i will fix some other bugs ;-) -- Thanks Harry Wei -- libvir-list mailing list libvir-list

Re: [libvirt] [PATCH V3 1/2] Intorduce file descriptor set for QEMU domains

2013-02-08 Thread Daniel P. Berrange
On Thu, Feb 07, 2013 at 05:26:10PM -0500, Stefan Berger wrote: > On 02/07/2013 12:58 PM, Daniel P. Berrange wrote: > >On Thu, Feb 07, 2013 at 12:56:45PM -0500, Stefan Berger wrote: > >>On 02/07/2013 10:12 AM, Daniel P. Berrange wrote: > >>>On Mon, Feb 04, 2013 at 07:12:37PM -0500, Stefan Berger wro

Re: [libvirt] [PATCH 2/3] Rename 'qemuCapsXXX' to 'virQEMUCapsXXX'

2013-02-08 Thread Jiri Denemark
On Thu, Feb 07, 2013 at 17:01:50 +, Daniel P. Berrange wrote: > On Wed, Feb 06, 2013 at 04:30:18PM +0100, Jiri Denemark wrote: > > > > I'm not sure if it was intentional or not but the rename of all > > qemuCapsPtr (now virQEMUCapsPtr) to qemuCaps is incomplete. Lots of > > missed instances ca

Re: [libvirt] Google Summer of Code 2013 ideas wiki open

2013-02-08 Thread Osier Yang
On 2013年02月08日 16:07, Michal Privoznik wrote: On 07.02.2013 16:19, Stefan Hajnoczi wrote: I have created the Google Summer of Code 2013 wiki page where you can add project ideas: http://wiki.qemu.org/Google_Summer_of_Code_2013 Please add project ideas you are willing to mentor. If you have an

Re: [libvirt] Google Summer of Code 2013 ideas wiki open

2013-02-08 Thread Michal Privoznik
On 07.02.2013 16:19, Stefan Hajnoczi wrote: > I have created the Google Summer of Code 2013 wiki page where you can > add project ideas: > > http://wiki.qemu.org/Google_Summer_of_Code_2013 > > Please add project ideas you are willing to mentor. If you have an > idea but cannot mentor this year,