Re: [libvirt] [RFC PATCH 0/5] another refactoring

2014-05-21 Thread Jiri Denemark
On Wed, May 21, 2014 at 22:50:43 -0600, Eric Blake wrote: > I'm about to reuse the sub-element of for my > pending series on active block commit, but to do that, I > wanted to get some refactoring out of the way first. Patches > 1-4 are pretty straightforward, and 5 may be controversial > (I'm s

[libvirt] Host OS, Storage Info

2014-05-21 Thread Sijo Jose
Hi, Is there any way to get host OS information and host Storage in formations using libvirt API...? Rgds -Sijo -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH 2/5] conf: consolidate disk def allocation

2014-05-21 Thread Eric Blake
A future patch wants to create disk definitions with non-zero default contents; to avoid crashes, all callers that allocate a disk definition should go through a common point. I found allocation points by looking for any code that increments ndisks, as well as any matches for ALLOC.*disk. Most pl

[libvirt] [PATCH 1/5] conf: store snapshot source as pointer, for easier manipulation

2014-05-21 Thread Eric Blake
As part of the work on backing chains, I'm finding that it would be easier to directly manipulate chains of pointers (adding a snapshot merely adjusts pointers to form the correct list) rather than copy data from one struct to another. This patch converts snapshot source to be a pointer. In this p

[libvirt] [RFC PATCH 5/5] conf: alter disk mirror xml output

2014-05-21 Thread Eric Blake
Now that we track a disk mirror as a virStorageSource, we might as well update the XML to theoretically allow any type of mirroring destination (not just a local file). A later patch will also be reusing to track the block commit of the top layer of a chain, which is another case where libvirt ne

[libvirt] [PATCH 4/5] conf: store mirroring information in virStorageSource

2014-05-21 Thread Eric Blake
The current implementation of 'virsh blockcopy' (virDomainBlockRebase) is limited to copying to a local file name. But future patches want to extend it to also copy to network disks. This patch converts over to a virStorageSourcePtr, although it should have no semantic change visible to the user,

[libvirt] [RFC PATCH 0/5] another refactoring

2014-05-21 Thread Eric Blake
I'm about to reuse the sub-element of for my pending series on active block commit, but to do that, I wanted to get some refactoring out of the way first. Patches 1-4 are pretty straightforward, and 5 may be controversial (I'm sending it now, even though it still needs more work, to make sure I'

[libvirt] [PATCH] conf: fix backing store parse off-by-one

2014-05-21 Thread Eric Blake
Commit 546154e parses the type attribute from a element, but forgot that the earlier commit 9673418 added a placeholder element in the same 1.2.3 release; as a result, the C code was mistakenly allowing "none" as a type. Similarly, the same commit allows "none" as the sub-element type, even thou

Re: [libvirt] [patch v3 2/2] add inotify handler to qemu driver

2014-05-21 Thread chen.fan.f...@cn.fujitsu.com
On Thu, 2014-05-15 at 11:25 +0200, Jiri Denemark wrote: > On Wed, May 07, 2014 at 18:11:50 +0800, Chen Fan wrote: > > we don't expect to reload 'migrate_uri' with restarting libvirtd everytime > > while > > updating the URI, so adding inotify handler to reload 'migrate_uri' > > configuration > >

Re: [libvirt] [PATCH] bhyve: fix virObjectUnlock() usage

2014-05-21 Thread Roman Bogorodskiy
Daniel P. Berrange wrote: > On Sat, May 17, 2014 at 11:44:48PM +0400, Roman Bogorodskiy wrote: > > In a number of places in the bhyve driver, virObjectUnlock() > > is called with an arg without check if the arg is non-NULL, which > > could result in passing NULL value and a warning like: > > >

Re: [libvirt] [PATCH] bhyve: fix virObjectUnlock() usage

2014-05-21 Thread Roman Bogorodskiy
Eric Blake wrote: > On 05/21/2014 08:02 AM, Roman Bogorodskiy wrote: > > So, what you propose is checking explicitly for NULL in > virObjectUnlock before we do virObjectIsClass(), and if the passed > argument is NULL indeed, just return, without logging anything about > that

Re: [libvirt] RFC: Any interest in a weekly(?) dev community meeting ?

2014-05-21 Thread Jim Fehlig
Daniel P. Berrange wrote: > Does Thursday 1400 UTC work for you ? Eric would prefer this 1 hour > earlier slot. > I may be a few minutes late on occasion, but yes, this slot works for me as well. Regards, Jim -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/l

Re: [libvirt] [PATCH] blockcommit: document semantics of committing active layer

2014-05-21 Thread Eric Blake
On 05/16/2014 02:17 PM, Eric Blake wrote: > Now that qemu 2.0 allows commit of the active layer, people are > attempting to use virsh blockcommit and getting into a stuck > state, because libvirt is unprepared to handle the two-phase > commit required by qemu. And as a reminder (more to myself, pe

[libvirt] Job Control API [RFC]

2014-05-21 Thread Tucker DiNapoli
My name is Tucker DiNapoli and I am working on implementing job control for the storage driver for the google summer of code, the first step in doing this is creating and implementing a unified api for job control. Currently there are several places where various aspects of job control are imple

Re: [libvirt] [PATCH] bhyve: fix virObjectUnlock() usage

2014-05-21 Thread Eric Blake
On 05/21/2014 08:02 AM, Roman Bogorodskiy wrote: So, what you propose is checking explicitly for NULL in virObjectUnlock before we do virObjectIsClass(), and if the passed argument is NULL indeed, just return, without logging anything about that? >>> >>> Yes, since we have othe

Re: [libvirt] [PATCH 1/3] util: new function virTimeLocalOffsetFromUTC

2014-05-21 Thread Eric Blake
On 05/21/2014 07:26 AM, Daniel P. Berrange wrote: > On Wed, May 21, 2014 at 04:16:29PM +0300, Laine Stump wrote: >> Since there isn't a single libc API to get this value, this patch >> supplies one which gets the value by grabbing current UTC, then >> converting that into a struct tm with localtime

Re: [libvirt] [PATCH] bhyve: fix virObjectUnlock() usage

2014-05-21 Thread Roman Bogorodskiy
Daniel P. Berrange wrote: > On Mon, May 19, 2014 at 11:12:05AM -0600, Eric Blake wrote: > > On 05/19/2014 10:57 AM, Roman Bogorodskiy wrote: > > > Eric Blake wrote: > > > > > >> On 05/17/2014 01:44 PM, Roman Bogorodskiy wrote: > > >>> In a number of places in the bhyve driver, virObjectUnlock

Re: [libvirt] [PATCH v2 1/3] virerror: Fix incorrect use of RaiseErrorFull

2014-05-21 Thread Cole Robinson
On 05/21/2014 07:07 AM, Daniel P. Berrange wrote: > On Mon, May 19, 2014 at 06:02:26PM -0400, Cole Robinson wrote: >> RaiseErrorFull does not prepend the static error code string (like >> INVALID_ARG yields "invalid arg: %(msg)s"). We should be using >> ReportErrorHelper. >> >> The generated error

Re: [libvirt] [PATCH 1/3] util: new function virTimeLocalOffsetFromUTC

2014-05-21 Thread Daniel P. Berrange
On Wed, May 21, 2014 at 04:16:29PM +0300, Laine Stump wrote: > Since there isn't a single libc API to get this value, this patch > supplies one which gets the value by grabbing current UTC, then > converting that into a struct tm with localtime_r(), then back to a > time_t using mktime; it again do

[libvirt] [PATCH 2/3] Revert "qemu: Report the offset from host UTC for RTC_CHANGE event"

2014-05-21 Thread Laine Stump
This reverts commit e31b5cf393857a6ca78d148c19393e28dfb39de1. This commit attempted to work around a bug in the offset value reported by qemu's RTC_CHANGE event in the case that a variable base date was given on the qemu commandline. The patch mixed up the math involved in arriving at the correcte

[libvirt] [PATCH 1/3] util: new function virTimeLocalOffsetFromUTC

2014-05-21 Thread Laine Stump
Since there isn't a single libc API to get this value, this patch supplies one which gets the value by grabbing current UTC, then converting that into a struct tm with localtime_r(), then back to a time_t using mktime; it again does the same operation, but using gmtime_r() instead (for UTC). It the

[libvirt] [PATCH 0/3] qemu: fix broken RTC_CHANGE event when clock offset='variable'

2014-05-21 Thread Laine Stump
This patch series is all about: https://bugzilla.redhat.com/show_bug.cgi?id=964177 which points out a flaw in qemu's RTC_CHANGE event when the base for the guest's real time clock was given as an explicit date (rather than as 'utc' or 'localtime'). Patch 3/3 explains what qemu does, and how thi

[libvirt] [PATCH 3/3] qemu: fix broken RTC_CHANGE event when clock offset='variable'

2014-05-21 Thread Laine Stump
commit e31b5cf393857 attempted to fix libvirt's VIR_DOMAIN_EVENT_ID_RTC_CHANGE, which is documentated to always provide the new offset of the domain's real time clock from UTC. The problem was that, in the case that qemu is provided with an "-rtc base=x" where x is an absolute time (rather than "ut

Re: [libvirt] [PATCH V7] libxl: add migration support

2014-05-21 Thread Daniel P. Berrange
On Thu, May 08, 2014 at 03:56:51PM -0600, Jim Fehlig wrote: > This patch adds initial migration support to the libxl driver, > using the VIR_DRV_FEATURE_MIGRATION_PARAMS family of migration > functions. > > Signed-off-by: Jim Fehlig > --- > > V6 here > https://www.redhat.com/archives/libvir-li

Re: [libvirt] [PATCH v2 1/3] virerror: Fix incorrect use of RaiseErrorFull

2014-05-21 Thread Daniel P. Berrange
On Mon, May 19, 2014 at 06:02:26PM -0400, Cole Robinson wrote: > RaiseErrorFull does not prepend the static error code string (like > INVALID_ARG yields "invalid arg: %(msg)s"). We should be using > ReportErrorHelper. > > The generated error objects are slightly different, by not storing the > inv

Re: [libvirt] deadlock while updating VM network filter

2014-05-21 Thread Marcin Gibuła
On 21.05.2014 11:40, Marcin Gibuła wrote: > I think deadlock is between thread 2: 1. learnIPAddressThread - virNWFilterLockIface(req->ifname) 2. virNWFilterInstantiateFilterLate - virMutexLock(&updateMutex); and thread 10: 1. virNWFilterTeardownFilter - virMutexLock(&updateMutex) 2. _virNWFilt

Re: [libvirt] [PATCH] virlog: Add stack trace log when libvirt receives fatal signal

2014-05-21 Thread Martin Kletzander
On Wed, May 21, 2014 at 09:37:35AM +, Wangrui (K) wrote: -Original Message- From: Daniel P. Berrange [mailto:berra...@redhat.com] Sent: Tuesday, May 20, 2014 5:05 PM To: Wangrui (K) Cc: libvir-list@redhat.com; zhouyimin Zhou(Yimin); Yanqiangjun Subject: Re: [PATCH] virlog: Add stack

Re: [libvirt] [RFC] require for suggestions on support for ivshmem device

2014-05-21 Thread Wangrui (K)
Thank you for reply > -Original Message- > From: Martin Kletzander [mailto:mklet...@redhat.com] > Sent: Tuesday, May 20, 2014 5:18 PM > To: Wangrui (K) > Cc: libvir-list@redhat.com; Zhangbo (Oscar); Yanqiangjun; Zengjunliang; > Moyuxiang; jdene...@redhat.com > Subject: Re: [libvirt] [RFC]

Re: [libvirt] [PATCH] virlog: Add stack trace log when libvirt receives fatal signal

2014-05-21 Thread Wangrui (K)
> -Original Message- > From: Daniel P. Berrange [mailto:berra...@redhat.com] > Sent: Tuesday, May 20, 2014 5:05 PM > To: Wangrui (K) > Cc: libvir-list@redhat.com; zhouyimin Zhou(Yimin); Yanqiangjun > Subject: Re: [PATCH] virlog: Add stack trace log when libvirt receives fatal > signal >

[libvirt] deadlock while updating VM network filter

2014-05-21 Thread Marcin Gibuła
Hi, I've encountered deadlock while updating VM network filter and I'm trying to debug it. However I don't have any luck with reproducing it... Here's a backtrace of libvirtd daemon. Any hints on how to fix that would be appreciated:) Libvirt version is 1.2.3. Thread 12 (Thread 0x7fd4550b57

Re: [libvirt] [libvirt-glib] [PATCH] Remove #if 0's from libvirt-gobject-domain-snapshot

2014-05-21 Thread Daniel P. Berrange
On Tue, May 20, 2014 at 08:56:24PM +0200, Timm Bäder wrote: > The code seems to be fine. > --- > > I'd like to use this code (in later patches). If anything is wrong > with the current implementation, I'd like to know so I can fix it. This is just historical cruft. IIRC, I had #if 0'd it, because

Re: [libvirt] RFC: Any interest in a weekly(?) dev community meeting ?

2014-05-21 Thread Daniel P. Berrange
On Tue, May 20, 2014 at 04:38:06PM -0600, Eric Blake wrote: > On 05/16/2014 11:53 AM, Daniel P. Berrange wrote: > > > > > If people think this is worth while I'd suggest an arbitrary time of > > 1500 UTC using the #virt-meeting IRC channel on irc.oftc.net, to last an > > absolute max of 1 hour. C

Re: [libvirt] RFC: Any interest in a weekly(?) dev community meeting ?

2014-05-21 Thread Daniel P. Berrange
On Tue, May 20, 2014 at 04:11:45PM -0600, Jim Fehlig wrote: > Daniel P. Berrange wrote: > > On Fri, May 16, 2014 at 01:53:50PM -0400, Daniel P. Berrange wrote: > > > >> Hi Libvirt team, > >> > >> A number of opensource projects have weekly meetings between their > >> community > >> of contribut

Re: [libvirt] [PATCH v3] PCI: Introduce new device binding path using pci_dev.driver_override

2014-05-21 Thread Alexander Graf
On 20.05.14 16:53, Alex Williamson wrote: The driver_override field allows us to specify the driver for a device rather than relying on the driver to provide a positive match of the device. This shortcuts the existing process of looking up the vendor and device ID, adding them to the driver new