Re: [libvirt] [Qemu-devel] [PATCHv2 3/4] qemu: fix RTC_CHANGE event for

2014-05-23 Thread Paolo Bonzini
Il 23/05/2014 15:35, Markus Armbruster ha scritto: Luiz Capitulino writes: On Fri, 23 May 2014 00:50:38 -0300 Marcelo Tosatti wrote: Then the guest triggers an RTC update, so qemu sends an event, but the event is lost. Then libvirtd starts again, and doesn't realize the event is lost. Yes

Re: [libvirt] [PATCHv2 3/4] qemu: fix RTC_CHANGE event for

2014-05-23 Thread Eric Blake
On 05/23/2014 01:36 PM, Eric Blake wrote: >> >> This patch accomplishes that by storing the initial adjustment in the >> domain's status as "adjustment0". Each time a new RTC_CHANGE event is >> received from qemu, we simply add adjustment0 to the value sent by >> qemu, store that as the new adjust

[libvirt] [PATCHv3 1/4] util: new function virTimeLocalOffsetFromUTC

2014-05-23 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

Re: [libvirt] [PATCHv2 3/4] qemu: fix RTC_CHANGE event for

2014-05-23 Thread Eric Blake
On 05/22/2014 05:07 AM, Laine Stump wrote: [I've re-read this thread, trying to determine whether this patch is good enough to apply as-is] > 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

Re: [libvirt] [PATCHv2 3/4] qemu: fix RTC_CHANGE event for

2014-05-23 Thread Laine Stump
On 05/23/2014 05:54 PM, Eric Blake wrote: > On 05/23/2014 04:19 AM, Laine Stump wrote: >> On 05/23/2014 12:17 PM, Laine Stump wrote: >>> *However*, this discussion forced me to investigate some of the basic >>> assumptions that I'd been making when coming in to fix this bug. In >>> particular, my a

Re: [libvirt] [PATCHv2 3/4] qemu: fix RTC_CHANGE event for

2014-05-23 Thread Eric Blake
On 05/23/2014 08:54 AM, Eric Blake wrote: > For this to work, a > persistent guest definition needs to record the offset that was in use > at the time the guest powered off, and the next time qemu is started, > pass _that_ offset as the command-line offset against UTC. In libvirt's > case, we i

Re: [libvirt] [PATCHv2 13/33] test: storage: Initialize storage source to correct type

2014-05-23 Thread Eric Blake
On 05/22/2014 07:47 AM, Peter Krempa wrote: > Stat the path of the storage file being tested to set the correct type > into the virStorageSource. This will avoid breaking the test suite when > inquiring metadata of directory paths in the next patches. > --- > tests/virstoragetest.c | 10 ++

Re: [libvirt] [PATCHv2 12/33] storage: Determine the local storage type right away

2014-05-23 Thread Eric Blake
On 05/22/2014 07:47 AM, Peter Krempa wrote: > When walking the backing chain we previously set the storage type to > _FILE and let the virStorageFileGetMetadataFromFDInternal update it to > the correct type later on. > > This patch moves the actual storage type determination to the place > where w

Re: [libvirt] [PATCHv2 1/4] util: new function virTimeLocalOffsetFromUTC

2014-05-23 Thread Laine Stump
On 05/23/2014 05:45 PM, Laine Stump wrote: > On 05/22/2014 10:03 PM, Eric Blake wrote: >> >> It would be a LOT simpler to just do: >> >> #include >> >> tzset(); >> *offset = timezone; >> >> except that some older builds of mingw lack the extern variable >> timezone. Or maybe even do a configure c

Re: [libvirt] [PATCHv2 3/4] qemu: fix RTC_CHANGE event for

2014-05-23 Thread Marcelo Tosatti
On Fri, May 23, 2014 at 08:54:54AM -0600, Eric Blake wrote: > On 05/23/2014 04:19 AM, Laine Stump wrote: > > On 05/23/2014 12:17 PM, Laine Stump wrote: > >> *However*, this discussion forced me to investigate some of the basic > >> assumptions that I'd been making when coming in to fix this bug. In

Re: [libvirt] [PATCHv2 11/33] storage: Move virStorageFileGetMetadata to the storage driver

2014-05-23 Thread Eric Blake
On 05/22/2014 07:47 AM, Peter Krempa wrote: > My future work will modify the metadata crawler function to use the > storage driver file APIs to access the files instead of accessing them > directly so that we will be able to request the metadata for remote > files too. To avoid linking the storage

Re: [libvirt] [PATCHv2 3/4] qemu: fix RTC_CHANGE event for

2014-05-23 Thread Eric Blake
On 05/23/2014 04:19 AM, Laine Stump wrote: > On 05/23/2014 12:17 PM, Laine Stump wrote: >> *However*, this discussion forced me to investigate some of the basic >> assumptions that I'd been making when coming in to fix this bug. In >> particular, my assumption was that the value of "adjustment" tha

Re: [libvirt] [PATCHv2 1/4] util: new function virTimeLocalOffsetFromUTC

2014-05-23 Thread Laine Stump
On 05/22/2014 10:03 PM, Eric Blake wrote: > On 05/22/2014 05:07 AM, 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 >> ti

Re: [libvirt] [PATCHv2 1/4] util: new function virTimeLocalOffsetFromUTC

2014-05-23 Thread Laine Stump
On 05/23/2014 03:47 PM, Eric Blake wrote: > On 05/23/2014 05:43 AM, Laine Stump wrote: > >>> man tzset: >>> >>>The second format is used when there is daylight saving time: >>> >>> std offset dst [offset],start[/time],end[/time] >> Aha! And combining that with the "VIR" timezo

Re: [libvirt] [Qemu-devel] [PATCHv2 3/4] qemu: fix RTC_CHANGE event for

2014-05-23 Thread Eric Blake
On 05/23/2014 07:48 AM, Marcelo Tosatti wrote: > This also seems pretty harmful wrt losing events: > > /* Global, one-time initializer to configure the rate limiting > * and initialize state */ > static void monitor_protocol_event_init(void) > { > /* Limit RTC & BALLOON events to 1 per secon

Re: [libvirt] [Qemu-devel] [PATCHv2 3/4] qemu: fix RTC_CHANGE event for

2014-05-23 Thread Daniel P. Berrange
On Fri, May 23, 2014 at 10:48:18AM -0300, Marcelo Tosatti wrote: > On Fri, May 23, 2014 at 03:35:19PM +0200, Markus Armbruster wrote: > > Luiz Capitulino writes: > > > > > On Fri, 23 May 2014 00:50:38 -0300 > > > Marcelo Tosatti wrote: > > > > > >> > Then the guest triggers an RTC update, so qem

Re: [libvirt] [Qemu-devel] [PATCHv2 3/4] qemu: fix RTC_CHANGE event for

2014-05-23 Thread Luiz Capitulino
On Fri, 23 May 2014 10:48:18 -0300 Marcelo Tosatti wrote: > On Fri, May 23, 2014 at 03:35:19PM +0200, Markus Armbruster wrote: > > Luiz Capitulino writes: > > > > > On Fri, 23 May 2014 00:50:38 -0300 > > > Marcelo Tosatti wrote: > > > > > >> > Then the guest triggers an RTC update, so qemu sen

Re: [libvirt] [Qemu-devel] [PATCHv2 3/4] qemu: fix RTC_CHANGE event for

2014-05-23 Thread Marcelo Tosatti
On Fri, May 23, 2014 at 10:48:18AM -0300, Marcelo Tosatti wrote: > On Fri, May 23, 2014 at 03:35:19PM +0200, Markus Armbruster wrote: > > Luiz Capitulino writes: > > > > > On Fri, 23 May 2014 00:50:38 -0300 > > > Marcelo Tosatti wrote: > > > > > >> > Then the guest triggers an RTC update, so qem

Re: [libvirt] [Qemu-devel] [PATCHv2 3/4] qemu: fix RTC_CHANGE event for

2014-05-23 Thread Marcelo Tosatti
On Fri, May 23, 2014 at 03:35:19PM +0200, Markus Armbruster wrote: > Luiz Capitulino writes: > > > On Fri, 23 May 2014 00:50:38 -0300 > > Marcelo Tosatti wrote: > > > >> > Then the guest triggers an RTC update, so qemu sends an event, but the > >> > event is lost. Then libvirtd starts again, and

Re: [libvirt] [PATCHv2 1/4] util: new function virTimeLocalOffsetFromUTC

2014-05-23 Thread Marcelo Tosatti
On Fri, May 23, 2014 at 02:43:08PM +0300, Laine Stump wrote: > On 05/22/2014 09:49 PM, Marcelo Tosatti wrote: > > On Thu, May 22, 2014 at 02:07:27PM +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 cu

Re: [libvirt] [Qemu-devel] [PATCHv2 3/4] qemu: fix RTC_CHANGE event for

2014-05-23 Thread Markus Armbruster
Luiz Capitulino writes: > On Fri, 23 May 2014 00:50:38 -0300 > Marcelo Tosatti wrote: > >> > Then the guest triggers an RTC update, so qemu sends an event, but the >> > event is lost. Then libvirtd starts again, and doesn't realize the >> > event is lost. >> >> Yes, but that case is also true f

Re: [libvirt] [PATCHv2 10/33] storage: Add API to check accessibility of storage volumes

2014-05-23 Thread Eric Blake
On 05/22/2014 07:47 AM, Peter Krempa wrote: > Add a storage driver API equivalent ot the access() function. s/ot/of/ > Implementations for the filesystem and gluster backends are provided. > --- > src/storage/storage_backend.h | 5 + > src/storage/storage_backend_fs.c | 13

Re: [libvirt] virsh reconnect vs. keepalive issue

2014-05-23 Thread Eric Blake
On 05/23/2014 05:29 AM, Martin Kletzander wrote: > On Tue, May 20, 2014 at 05:49:54PM -0600, Eric Blake wrote: >> I'm trying to debug a new virsh command, and had two terminals up, one >> running './run gdb tools/virsh' (I originally ran virsh directly, but >> re-ran under gdb to get a trace) and t

Re: [libvirt] [PATCH] Explicitly pin hotplugged vcpu to all cpus

2014-05-23 Thread Peter Krempa
On 05/23/14 14:45, Peter Krempa wrote: > On 05/23/14 14:37, Ján Tomko wrote: >> QEMU does not join vcpu threads after vcpu hotunplug. >> The thread might stay pinned when we hotplug the cpu again. >> >> We were already pinning the hotplugged vcpus when a per-domain >> pinning was specified. >> >> E

Re: [libvirt] [PATCHv2 1/4] util: new function virTimeLocalOffsetFromUTC

2014-05-23 Thread Eric Blake
On 05/23/2014 05:43 AM, Laine Stump wrote: >> man tzset: >> >>The second format is used when there is daylight saving time: >> >> std offset dst [offset],start[/time],end[/time] > > Aha! And combining that with the "VIR" timezone idea that we're already > using, I've found t

Re: [libvirt] [PATCH] Explicitly pin hotplugged vcpu to all cpus

2014-05-23 Thread Peter Krempa
On 05/23/14 14:37, Ján Tomko wrote: > QEMU does not join vcpu threads after vcpu hotunplug. > The thread might stay pinned when we hotplug the cpu again. > > We were already pinning the hotplugged vcpus when a per-domain > pinning was specified. > > Explicitly pin the hotplugged vcpu to all cpus

Re: [libvirt] [PATCHv2 3/4] qemu: fix RTC_CHANGE event for

2014-05-23 Thread Luiz Capitulino
On Fri, 23 May 2014 00:50:38 -0300 Marcelo Tosatti wrote: > > Then the guest triggers an RTC update, so qemu sends an event, but the > > event is lost. Then libvirtd starts again, and doesn't realize the > > event is lost. > > Yes, but that case is also true for any other QMP asynchronous event,

[libvirt] [PATCH] Explicitly pin hotplugged vcpu to all cpus

2014-05-23 Thread Ján Tomko
QEMU does not join vcpu threads after vcpu hotunplug. The thread might stay pinned when we hotplug the cpu again. We were already pinning the hotplugged vcpus when a per-domain pinning was specified. Explicitly pin the hotplugged vcpu to all cpus if there is no cpuset specified in domain XML, to

Re: [libvirt] [PATCHv2 07/33] storage: Add support for access to files using provided uid/gid

2014-05-23 Thread Eric Blake
On 05/23/2014 02:49 AM, Peter Krempa wrote: >>> >>> +if (uid == (uid_t) -1) >>> +src->drv->uid = geteuid(); >>> +else >>> +src->drv->uid = uid; >> >> Do we need to do the conversion here, or can we store -1 and let other >> routines later do the conversion? I'm not sure if

Re: [libvirt] [PATCHv2 1/4] util: new function virTimeLocalOffsetFromUTC

2014-05-23 Thread Laine Stump
On 05/22/2014 09:49 PM, Marcelo Tosatti wrote: > On Thu, May 22, 2014 at 02:07:27PM +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(

Re: [libvirt] virsh reconnect vs. keepalive issue

2014-05-23 Thread Martin Kletzander
On Tue, May 20, 2014 at 05:49:54PM -0600, Eric Blake wrote: I'm trying to debug a new virsh command, and had two terminals up, one running './run gdb tools/virsh' (I originally ran virsh directly, but re-ran under gdb to get a trace) and the other running './run gdb daemon/libvirtd'. Because I f

Re: [libvirt] [PATCHv2 3/4] qemu: fix RTC_CHANGE event for

2014-05-23 Thread Laine Stump
On 05/23/2014 12:17 PM, Laine Stump wrote: > *However*, this discussion forced me to investigate some of the basic > assumptions that I'd been making when coming in to fix this bug. In > particular, my assumption was that the value of "adjustment" that was > set in the status would be preserved acr

Re: [libvirt] [PATCH] Remove unsupported type sdl from error info when set 2 vnc or spice graphics

2014-05-23 Thread Peter Krempa
On 05/23/14 11:35, Daniel P. Berrange wrote: > On Fri, May 23, 2014 at 11:31:17AM +0200, Peter Krempa wrote: >> On 05/23/14 11:26, Daniel P. Berrange wrote: >>> On Fri, May 23, 2014 at 05:23:36PM +0800, tzh...@redhat.com wrote: --- src/qemu/qemu_command.c | 2 +- 1 file changed, 1 i

Re: [libvirt] [PATCH] Remove unsupported type sdl from error info when set 2 vnc or spice graphics

2014-05-23 Thread Daniel P. Berrange
On Fri, May 23, 2014 at 11:31:17AM +0200, Peter Krempa wrote: > On 05/23/14 11:26, Daniel P. Berrange wrote: > > On Fri, May 23, 2014 at 05:23:36PM +0800, tzh...@redhat.com wrote: > >> --- > >> src/qemu/qemu_command.c | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git

Re: [libvirt] [PATCH] Remove unsupported type sdl from error info when set 2 vnc or spice graphics

2014-05-23 Thread Peter Krempa
On 05/23/14 11:26, Daniel P. Berrange wrote: > On Fri, May 23, 2014 at 05:23:36PM +0800, tzh...@redhat.com wrote: >> --- >> src/qemu/qemu_command.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c >> index 193959f..a14646

Re: [libvirt] [PATCH] Remove unsupported type sdl from error info when set 2 vnc or spice graphics

2014-05-23 Thread Tingting Zheng
I just filed bug and the patch resolves the bug:https://bugzilla.redhat.com/show_bug.cgi?id=1100634 Best regards, Tingting Zheng(郑婷婷) - Original Message - From: "Daniel P. Berrange" To: tzh...@redhat.com Cc: libvir-list@redhat.com Sent: Friday, May 23, 2014 5:26:23 PM Subject: Re: [lib

Re: [libvirt] [PATCH] Remove unsupported type sdl from error info when set 2 vnc or spice graphics

2014-05-23 Thread Daniel P. Berrange
On Fri, May 23, 2014 at 05:23:36PM +0800, tzh...@redhat.com wrote: > --- > src/qemu/qemu_command.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c > index 193959f..a146463 100644 > --- a/src/qemu/qemu_command.c > +++ b/src

[libvirt] [PATCH] Remove unsupported type sdl from error info when set 2 vnc or spice graphics

2014-05-23 Thread tzh...@redhat.com
--- src/qemu/qemu_command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 193959f..a146463 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -8579,7 +8579,7 @@ qemuBuildCommandLine(virConnectPtr conn,

Re: [libvirt] [PATCHv2 3/4] qemu: fix RTC_CHANGE event for

2014-05-23 Thread Laine Stump
On 05/23/2014 06:50 AM, Marcelo Tosatti wrote: > On Thu, May 22, 2014 at 01:33:14PM -0600, Eric Blake wrote: >> [Adding qemu] >> >> On 05/22/2014 05:07 AM, Laine Stump wrote: >>> commit e31b5cf393857 attempted to fix libvirt's >>> VIR_DOMAIN_EVENT_ID_RTC_CHANGE, which is documentated to always >> s

Re: [libvirt] [PATCHv2 08/33] storage: Add storage file API to read file headers

2014-05-23 Thread Peter Krempa
On 05/23/14 01:13, Eric Blake wrote: > On 05/22/2014 07:47 AM, Peter Krempa wrote: >> Add storage driver based functions to access headers of storage files >> for metadata extraction. Along with this patch a local filesystem and >> gluster via libgfapi implementation is provided. The gluster >> imp

Re: [libvirt] [PATCHv2 02/33] qemu: Make qemuDomainPrepareDiskChainElement aware of remote storage

2014-05-23 Thread Peter Krempa
On 05/22/14 23:58, Eric Blake wrote: > On 05/22/2014 07:47 AM, Peter Krempa wrote: >> Refactor the function to accept a virStorageSourcePtr instead of just >> the path, add a check to run it only on local storage and fix callers >> (possibly by using a newly introduced wrapper that wraps a path in

Re: [libvirt] [PATCHv2 07/33] storage: Add support for access to files using provided uid/gid

2014-05-23 Thread Peter Krempa
On 05/23/14 00:59, Eric Blake wrote: > On 05/22/2014 07:47 AM, Peter Krempa wrote: >> To allow using the storage driver APIs to access files on various >> storage sources in an universal fashion possibly on storage such as nfs > > s/an universal/a universal/ > >> with root squash we'll need to st

Re: [libvirt] [PATCH 0/3] Fix various migration issues

2014-05-23 Thread Jiri Denemark
On Thu, May 22, 2014 at 13:55:14 +0200, Jiri Denemark wrote: > Jiri Denemark (3): > Fix error message when TUNNELLED flag is used in non-p2p migration > qemu: Send migrate_cancel when aborting migration > qemu: Properly abort migration to a file > > src/libvirt.c | 8 - > s

Re: [libvirt] [PATCH 2/3] qemu: Send migrate_cancel when aborting migration

2014-05-23 Thread Jiri Denemark
On Fri, May 23, 2014 at 01:40:23 +, Wangrui (K) wrote: > > > > -Original Message- > > From: libvir-list-boun...@redhat.com [mailto:libvir-list-boun...@redhat.com] > > On Behalf Of Jiri Denemark > > Sent: Thursday, May 22, 2014 7:55 PM > > To: libvir-list@redhat.com > > Subject: [libvi