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

2014-05-22 Thread Zhe Peng
- Original Message - > From: "Wangrui (K)" > To: "Jiri Denemark" , libvir-list@redhat.com > Sent: Friday, May 23, 2014 9:40:23 AM > Subject: Re: [libvirt] [PATCH 2/3] qemu: Send migrate_cancel when > abortingmigration > > > > > -Original Message- > > From: libvir-

[libvirt] GSoC student introduction and work plan

2014-05-22 Thread Taowei Luo
Hi, everyone, My name is Taowei Luo. I'm one of the students working for GSoC this summer. My project is rewriting the vbox driver. Before coding, I really need some discussions about how to implement it. Here I post my first version of plan. I had show as much details as I thought about in this p

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

2014-05-22 Thread Marcelo Tosatti
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/documentated/documented/ > > > provide the new

Re: [libvirt] [PATCH 2/3] qemu: Fix specifying char devs for PPC

2014-05-22 Thread Eric Blake
[reposting to the list with permission] On 05/22/2014 06:37 PM, hong-hua@freescale.com wrote: > Hi Eric, > > Thanks for your comments. > I also prefer the second reply threading. > > Exactly I use git send-email to post patches to this mailing list. > $ git send-email -cover-letter.patc

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

2014-05-22 Thread Wangrui (K)
> -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: [libvirt] [PATCH 2/3] qemu: Send migrate_cancel when aborting > migration > > Wh

Re: [libvirt] [PATCHv2 09/33] storage: backend: Add unique id retrieval API

2014-05-22 Thread Eric Blake
On 05/22/2014 07:47 AM, Peter Krempa wrote: > Different protocols have different means to uniquely identify a storage > file. This patch implements a storage driver API to retrieve a unique > string describing a volume. The current implementation works for local > storage only and returns the canon

Re: [libvirt] [PATCH] qemu: Add cmd_per_lun, max_sectors to virtio-scsi

2014-05-22 Thread Mike Perez
On 16:06 Thu 22 May , Eric Blake wrote: > On 05/22/2014 12:22 PM, Mike Perez wrote: > > This introduces two new attributes "cmd_per_lun" and "max_sectors" same > > with the names QEMU uses for virtio-scsi. An example of the XML: > > > > > max_sectors='512'/> > > I'm not a fan of underscore (

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

2014-05-22 Thread Eric Blake
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 > implementation is based on code of the saferea

[libvirt] [PATCHv2] qemu: Add cmd_per_lun, max_sectors to virtio-scsi

2014-05-22 Thread Mike Perez
This introduces two new attributes "cmd_per_lun" and "max_sectors" same with the names QEMU uses for virtio-scsi. An example of the XML: The corresponding QEMU command line: -device virtio-scsi-pci,id=scsi0,cmd_per_lun=50,max_sectors=512, bus=pci.0,addr=0x3 Signed-off-by: Mike Perez --- docs

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

2014-05-22 Thread Eric Blake
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 store the desired uid/gid in the > metadata. > >

Re: [libvirt] [PATCHv2 06/33] storage: Add NONE protocol type for network disks

2014-05-22 Thread Eric Blake
On 05/22/2014 07:47 AM, Peter Krempa wrote: > Currently the protocol type with index 0 was NBD which made it hard to > distinguish whether the protocol type was actually assigned. Add a new > protocol type with index 0 to distinguish it explicitly. > --- > > Notes: > Version 2: > - fixed

Re: [libvirt] [PATCHv2 03/33] storage: Store gluster volume name separately

2014-05-22 Thread Eric Blake
On 05/22/2014 07:47 AM, Peter Krempa wrote: > The gluster volume name was previously stored as part of the source path > string. This is unfortunate when we want to do operations on the path as > the volume is used separately. > > Parse and store the volume name separately for gluster storage volu

Re: [libvirt] [PATCH] qemu: Add cmd_per_lun, max_sectors to virtio-scsi

2014-05-22 Thread Eric Blake
On 05/22/2014 12:22 PM, Mike Perez wrote: > This introduces two new attributes "cmd_per_lun" and "max_sectors" same > with the names QEMU uses for virtio-scsi. An example of the XML: > > max_sectors='512'/> I'm not a fan of underscore (why type the shift key, when a dash will do). The libvirt x

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

2014-05-22 Thread Eric Blake
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 the > virStorageSource struct for legacy

Re: [libvirt] [PATCHv2 01/33] qemu: process: Refresh backing chain info when reconnecting to qemu

2014-05-22 Thread Eric Blake
On 05/22/2014 03:20 PM, Eric Blake wrote: > On 05/22/2014 07:47 AM, Peter Krempa wrote: >> Refresh the disk backing chains when reconnecting to a qemu process >> after daemon restart. There are a few internal fields that don't get >> refreshed from the XML. Until we are able to do that, let's reloa

Re: [libvirt] [PATCHv2 01/33] qemu: process: Refresh backing chain info when reconnecting to qemu

2014-05-22 Thread Eric Blake
On 05/22/2014 07:47 AM, Peter Krempa wrote: > Refresh the disk backing chains when reconnecting to a qemu process > after daemon restart. There are a few internal fields that don't get > refreshed from the XML. Until we are able to do that, let's reload all > the metadata by the backing chain crawl

Re: [libvirt] [PATCHv2 4/4] qemu: fix

2014-05-22 Thread Eric Blake
On 05/22/2014 05:07 AM, Laine Stump wrote: > For a clock element as above, libvirt simply converts current system > time with localtime_r(), then starts qemu with a time string that > doesn't contain any timezone information. So, from qemu's point of > view, the -rtc string it gets for: > > >

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

2014-05-22 Thread Eric Blake
[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/documentated/documented/ > provide the new offset of the domain's real time clock from UTC. The > problem was that, in th

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

2014-05-22 Thread Marcelo Tosatti
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(), then back to a > time_t using mktime; it again do

Re: [libvirt] [PATCHv2 2/4] Revert "qemu: Report the offset from host UTC for RTC_CHANGE event"

2014-05-22 Thread Eric Blake
On 05/22/2014 05:07 AM, Laine Stump wrote: > 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 m

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

2014-05-22 Thread Eric Blake
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 > time_t using mktime; it again does the same operat

[libvirt] [PATCH] qemu: Add cmd_per_lun, max_sectors to virtio-scsi

2014-05-22 Thread Mike Perez
This introduces two new attributes "cmd_per_lun" and "max_sectors" same with the names QEMU uses for virtio-scsi. An example of the XML: The corresponding QEMU command line: -device virtio-scsi-pci,id=scsi0,cmd_per_lun=50,max_sectors=512, bus=pci.0,addr=0x3 Signed-off-by: Mike Perez --- docs

Re: [libvirt] [PATCH 3/3] qemu: Properly abort migration to a file

2014-05-22 Thread Jiri Denemark
On Thu, May 22, 2014 at 18:33:08 +0200, Peter Krempa wrote: > On 05/22/14 16:28, Jiri Denemark wrote: > > On Thu, May 22, 2014 at 16:14:22 +0200, Peter Krempa wrote: > >> On 05/22/14 13:55, Jiri Denemark wrote: > >>> This is similar to the previous commit in that we need to explicitly > >>> send mi

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

2014-05-22 Thread Eric Blake
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 > time_t using mktime; it again does the same operat

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

2014-05-22 Thread Eric Blake
On 05/22/2014 01:22 AM, Jiri Denemark wrote: > On Wed, May 21, 2014 at 22:06:08 -0600, Eric Blake wrote: >> 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 wa

Re: [libvirt] [PATCH 2/3] qemu: Fix specifying char devs for PPC

2014-05-22 Thread Eric Blake
[meta-comment] On 05/22/2014 04:55 AM, Olivia Yin wrote: Your message came with deep threading (each message in the series in reply to the previous). Observe what happens to replies which are threaded as typical in most mail clients (all replies to a given message sorted by time received) - the

Re: [libvirt] [libvirt-users] Host OS, Storage Info

2014-05-22 Thread Ainsworth, Thomas
Sijo, *Pertaining to virt-manager and virsh sluggish behaviour after a clone operation:* Thanks for your response. Honestly I do not know what "host Storage in formations using libvirt API" means. Sorry. I use virt-manager and virsh to do everything within KVM. If there is something better or

Re: [libvirt] [PATCH 3/3] qemu: Properly abort migration to a file

2014-05-22 Thread Peter Krempa
On 05/22/14 16:28, Jiri Denemark wrote: > On Thu, May 22, 2014 at 16:14:22 +0200, Peter Krempa wrote: >> On 05/22/14 13:55, Jiri Denemark wrote: >>> This is similar to the previous commit in that we need to explicitly >>> send migrate_cancel when libvirt detects an error other than those >>> report

[libvirt] Weekly meeting minutes May 22nd, 2014

2014-05-22 Thread Daniel P. Berrange
Agenda + minutes from 22/05/2014 * Welcome / rollcall * IRC comments from: * eblake * danpb * pkrempa * derRichard * rbogorodskiy * mkletzan * nehaljwani * mprivozn * Next release schedule * Freeze: Mon May 26th * Release: Mon June 2nd * Patches needing review

Re: [libvirt] [PATCH 3/3] qemu: Properly abort migration to a file

2014-05-22 Thread Jiri Denemark
On Thu, May 22, 2014 at 16:14:22 +0200, Peter Krempa wrote: > On 05/22/14 13:55, Jiri Denemark wrote: > > This is similar to the previous commit in that we need to explicitly > > send migrate_cancel when libvirt detects an error other than those > > reported by query-migrate. However, the possibili

Re: [libvirt] [PATCH 3/3] qemu: Properly abort migration to a file

2014-05-22 Thread Peter Krempa
On 05/22/14 13:55, Jiri Denemark wrote: > This is similar to the previous commit in that we need to explicitly > send migrate_cancel when libvirt detects an error other than those > reported by query-migrate. However, the possibility to hit such error is > pretty small. > > Signed-off-by: Jiri Den

Re: [libvirt] [PATCH 1/3] Fix error message when TUNNELLED flag is used in non-p2p migration

2014-05-22 Thread Jiri Denemark
On Thu, May 22, 2014 at 15:56:57 +0200, Peter Krempa wrote: > On 05/22/14 13:55, Jiri Denemark wrote: > > The current error message is > > > > error: use virDomainMigrateToURI3 for peer-to-peer migration > > > > which is correct but a bit misleading because the client did not specify > > VIR_

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

2014-05-22 Thread Peter Krempa
On 05/22/14 13:55, Jiri Denemark wrote: > When QEMU reports failed or cancelled migration, we don't need to send > it migrate_cancel QMP command. But in all other error paths, such as if > we detect broken connection to a destination daemon or something else > happens inside libvirt, we need to exp

Re: [libvirt] [PATCH 1/3] Fix error message when TUNNELLED flag is used in non-p2p migration

2014-05-22 Thread Peter Krempa
On 05/22/14 13:55, Jiri Denemark wrote: > The current error message is > > error: use virDomainMigrateToURI3 for peer-to-peer migration > > which is correct but a bit misleading because the client did not specify > VIR_MIGRATE_PEER2PEER flag. This patch changes the error message to > > e

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

2014-05-22 Thread Peter Krempa
To allow using the storage driver APIs to access files on various storage sources in an universal fashion possibly on storage such as nfs with root squash we'll need to store the desired uid/gid in the metadata. Add new initialisation API that will store the desired uid/gid and a wrapper for the c

[libvirt] [PATCHv2 29/33] qemu: monitor: Add support for backing name specification for block-stream

2014-05-22 Thread Peter Krempa
To allow changing the name that is recorded in the top of the current image chain used in a block pull/rebase operation, we need to specify the backing name to qemu. This is done via the "backing-file" attribute to the block-stream commad. --- src/qemu/qemu_driver.c | 8 src/qemu/q

[libvirt] [PATCHv2 23/33] util: storagefile: Add helper to resolve "../", "./" and "////" in paths

2014-05-22 Thread Peter Krempa
As gnulib's canonicalize_filename_mode isn't LGPL and relative snapshot resolution code will need to clean paths with relative path components this patch adds a libvirt's own implementation of that functionality and tests to make sure everything works well. --- src/util/virstoragefile.c | 95 +

[libvirt] [PATCHv2 30/33] lib: Introduce flag VIR_DOMAIN_BLOCK_COMMIT_RELATIVE

2014-05-22 Thread Peter Krempa
Introduce flag for the block commit API to allow the commit operation to leave the chain relatively addressed. Also adds a virsh switch to enable this behavior. --- include/libvirt/libvirt.h.in | 4 tools/virsh-domain.c | 7 +++ 2 files changed, 11 insertions(+) diff --git a/incl

[libvirt] [PATCHv2 17/33] storage: Switch metadata crawler to use storage driver file access check

2014-05-22 Thread Peter Krempa
Use virStorageFileAccess() to to check wether the file is accessible in the main part of the metadata crawler. --- src/storage/storage_driver.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index 67ab3

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

2014-05-22 Thread Peter Krempa
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 we parse the backing store name so that the code can late

[libvirt] [PATCHv2 15/33] storage: Switch metadata crawler to use storage driver to get unique path

2014-05-22 Thread Peter Krempa
Use the virStorageFileGetUniqueIdentifier() function to get a unique identifier regardless of the target storage type instead of relying on canonicalize_path(). A new function that checks wether we support a given image is introduced to avoid errors for unimplemented backends. --- src/storage/sto

[libvirt] [PATCHv2 28/33] qemu: monitor: Add argument for specifying backing name for block commit

2014-05-22 Thread Peter Krempa
To allow changing the name that is recorded in the overlay of the TOP image used in a block commit operation, we need to specify the backing name to qemu. This is done via the "backing-file" attribute to the block-commit commad. --- src/qemu/qemu_driver.c | 1 + src/qemu/qemu_monitor.c

[libvirt] [PATCHv2 21/33] util: string: Return element count from virStringSplit

2014-05-22 Thread Peter Krempa
To allow using the array manipulation macros on the arrays returned by virStringSplit we need to know the count of the elements in the array. Modify virStringSplit to return this value, rename it and add a helper with the old name so that we don't need to update all the code. --- src/libvirt_priva

[libvirt] [PATCHv2 33/33] qemu: Add support for networked disks for block pull/block rebase

2014-05-22 Thread Peter Krempa
Now that we are able to select images from the backing chain via indexed access we should also convert possible network sources to qemu-compatible strings before passing them to qemu. --- src/qemu/qemu_capabilities.c | 5 - src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_driver.c | 4

[libvirt] [PATCHv2 20/33] storage: Traverse backing chains of network disks

2014-05-22 Thread Peter Krempa
Now we don't need to skip backing chain detection for remote disks. --- src/qemu/qemu_domain.c | 8 +++- src/storage/storage_driver.c | 18 ++ 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 502b7bd..1

[libvirt] [PATCHv2 24/33] util: storage: Add helper to resolve relative path difference

2014-05-22 Thread Peter Krempa
This patch introduces a function that will allow us to resolve a relative difference between two elements of a disk backing chain. This fucntion will be used to allow relative block commit and block pull where we need to specify the new relative name of the image to qemu. This patch also adds unit

[libvirt] [PATCHv2 27/33] qemu: json: Add format strings for optional command arguments

2014-05-22 Thread Peter Krempa
This patch adds option to specify that a json qemu command argument is optional without the need to use if's or ternary operators to pass the list. Additionally all the modifier characters are documented to avoid user confusion. --- src/qemu/qemu_monitor_json.c | 122 +-

[libvirt] [PATCHv2 31/33] lib: Introduce flag VIR_DOMAIN_BLOCK_REBASE_RELATIVE

2014-05-22 Thread Peter Krempa
Introduce flag for the block rebase API to allow the rebase operation to leave the chain relatively addressed. Also adds a virsh switch to enable this behavior. --- include/libvirt/libvirt.h.in | 2 ++ tools/virsh-domain.c | 22 +++--- 2 files changed, 21 insertions(+), 3

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

2014-05-22 Thread Peter Krempa
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 ++ 1 file changed, 10 insertions(+) diff --git a/tests

[libvirt] [PATCHv2 18/33] storage: Add infrastructure to parse remote network backing names

2014-05-22 Thread Peter Krempa
Add parsers for relative and absolute backing names for local and remote storage files. This parser parses relative paths as relative to their parents and absolute paths according to the protocol or local access. For remote storage volumes, all URI based backing file names are supported and for t

[libvirt] [PATCHv2 25/33] util: storagefile: Add canonicalization to virStorageFileSimplifyPath

2014-05-22 Thread Peter Krempa
The recently introduced virStorageFileSimplifyPath is good at resolving relative portions of a path. To add full path canonicalization capability we need to be able to resolve symlinks in the path too. This patch adds a callback to that function so that arbitrary storage systems can use this funct

[libvirt] [PATCHv2 32/33] qemu: Add support for networked disks for block commit

2014-05-22 Thread Peter Krempa
Now that we are able to select images from the backing chain via indexed access we should also convert possible network sources to qemu-compatible strings before passing them to qemu. --- src/qemu/qemu_capabilities.c | 5 + src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_driver.c | 3

[libvirt] [PATCHv2 06/33] storage: Add NONE protocol type for network disks

2014-05-22 Thread Peter Krempa
Currently the protocol type with index 0 was NBD which made it hard to distinguish whether the protocol type was actually assigned. Add a new protocol type with index 0 to distinguish it explicitly. --- Notes: Version 2: - fixed condition in virDomainDiskSourceParse so that "none" isn't ac

[libvirt] [PATCHv2 16/33] storage: Switch metadata crawler to use storage driver to read headers

2014-05-22 Thread Peter Krempa
Use virStorageFileReadHeader() to read headers of storage files possibly on remote storate to retrieve the image metadata. The backend information is now parsed by virStorageFileGetMetadataInternal which is now exported from the util source and virStorageFileGetMetadataFromFDInternal now doesn't n

[libvirt] [PATCHv2 05/33] conf: Fix domain disk path iterator to work with networked storage

2014-05-22 Thread Peter Krempa
Skip networked storage but continue iteration through backing chain to iterate through all the local paths in the backing chain. --- Notes: Version 2: - no change, v1 already ACKed by Eric src/conf/domain_conf.c | 37 - 1 file changed, 20 insertions(+)

[libvirt] [PATCHv2 04/33] storage: Rework debugging of storage file access through storage driver

2014-05-22 Thread Peter Krempa
Print the debug statements of individual file access functions from the main API functions instead of the individual backend functions. Also enhance initialization debug messages on a per-backend basis. --- Notes: Version 2: - no change, v1 already ACKed by Eric src/storage/storage_back

[libvirt] [PATCHv2 14/33] storage: backend: Add possibility to suppress errors from backend lookup

2014-05-22 Thread Peter Krempa
Add a new function wrapper and tweak the storage file backend lookup function so that it can be used without reporting error. This will be useful in the metadata crawler code where we need silently break if metadata retrieval is not supported for the current storage type. --- src/storage/storage_b

[libvirt] [PATCHv2 22/33] util: string: Add helper to free non-NULL terminated string arrays

2014-05-22 Thread Peter Krempa
Sometimes the length of the string list is known but the array isn't NULL terminated. Add helper to free the array in such cases. --- src/libvirt_private.syms | 1 + src/util/virstring.c | 20 src/util/virstring.h | 1 + 3 files changed, 22 insertions(+) diff --git

[libvirt] [PATCHv2 09/33] storage: backend: Add unique id retrieval API

2014-05-22 Thread Peter Krempa
Different protocols have different means to uniquely identify a storage file. This patch implements a storage driver API to retrieve a unique string describing a volume. The current implementation works for local storage only and returns the canonical path of the volume. To add caching support the

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

2014-05-22 Thread Peter Krempa
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 driver to every helper file using the utils code, th

[libvirt] [PATCHv2 03/33] storage: Store gluster volume name separately

2014-05-22 Thread Peter Krempa
The gluster volume name was previously stored as part of the source path string. This is unfortunate when we want to do operations on the path as the volume is used separately. Parse and store the volume name separately for gluster storage volumes and use the newly stored variable appropriately. -

[libvirt] [PATCHv2 26/33] storage: gluster: Add backend to return unique storage file path

2014-05-22 Thread Peter Krempa
Use virStorageFileSimplifyPathInternal to canonicalize gluster paths via a callback and use it for the unique volume path retrieval API. --- src/storage/storage_backend_gluster.c | 81 +++ 1 file changed, 81 insertions(+) diff --git a/src/storage/storage_backend_gl

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

2014-05-22 Thread Peter Krempa
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 implementation is based on code of the saferead_lim function. --- src/storage/storage_backend.h

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

2014-05-22 Thread Peter Krempa
Add a storage driver API equivalent ot the access() function. Implementations for the filesystem and gluster backends are provided. --- src/storage/storage_backend.h | 5 + src/storage/storage_backend_fs.c | 13 + src/storage/storage_backend_gluster.c | 11 +++

[libvirt] [PATCHv2 00/33] Gluster backing chains and relative block commit/pull

2014-05-22 Thread Peter Krempa
Hi, this is my second take on this topic. Some of the patches are still in a RFC status as the last six patches require qemu support which is still on review upstream. The rest should be fine as is even without the qemu bits. Peter Krempa (33): qemu: process: Refresh backing chain info when re

[libvirt] [PATCHv2 01/33] qemu: process: Refresh backing chain info when reconnecting to qemu

2014-05-22 Thread Peter Krempa
Refresh the disk backing chains when reconnecting to a qemu process after daemon restart. There are a few internal fields that don't get refreshed from the XML. Until we are able to do that, let's reload all the metadata by the backing chain crawler. --- src/qemu/qemu_process.c | 5 + 1 file c

[libvirt] [PATCHv2 19/33] storage: Change to new backing store parser

2014-05-22 Thread Peter Krempa
Use the new backing store parser in the backing chain crawler. This change needs one test change where information about the NBD image are now parsed differently. --- src/storage/storage_driver.c | 90 +--- tests/virstoragetest.c | 14 --- 2 files

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

2014-05-22 Thread Peter Krempa
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 the virStorageSource struct for legacy code) --- Notes: Version 2: - V1 acked by E

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

2014-05-22 Thread Daniel P. Berrange
While we haven't set any agenda to discuss, I think we should just have a first meeting today regardless just to kickstart the idea. So in 30 mins time on #virt-meeting on irc.oftc.net Daniel On Fri, May 16, 2014 at 01:53:50PM -0400, Daniel P. Berrange wrote: > Hi Libvirt team, > > A number of o

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

2014-05-22 Thread Laine Stump
On 05/20/2014 05:53 PM, 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

Re: [libvirt] Host OS, Storage Info

2014-05-22 Thread Martin Kletzander
On Thu, May 22, 2014 at 12:16:17PM +0530, Sijo Jose wrote: Hi, Is there any way to get host OS information and host Storage in formations using libvirt API...? Rgds -Sijo Check virsh help (most of the commands you probably want start with 'node' or 'vol'/'pool') or have a look at our hvsupport

Re: [libvirt] [PATCHv2] Don't log an internal error when the guest hasn't updated balloon stats

2014-05-22 Thread Ján Tomko
On 05/15/2014 11:19 PM, Eric Blake wrote: > On 05/15/2014 01:22 AM, Ján Tomko wrote: >> If virDomainMemoryStats is called too soon after domain startup, >> QEMU returns: >> "error":{"class":"GenericError","desc":"guest hasn't updated any stats yet"} >> when we try to query balloon stats. >> >> Chec

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

2014-05-22 Thread Jiri Denemark
When QEMU reports failed or cancelled migration, we don't need to send it migrate_cancel QMP command. But in all other error paths, such as if we detect broken connection to a destination daemon or something else happens inside libvirt, we need to explicitly send migrate_cancel command instead of r

[libvirt] [PATCH 3/3] qemu: Properly abort migration to a file

2014-05-22 Thread Jiri Denemark
This is similar to the previous commit in that we need to explicitly send migrate_cancel when libvirt detects an error other than those reported by query-migrate. However, the possibility to hit such error is pretty small. Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration.c | 21 +

[libvirt] [PATCH 1/3] Fix error message when TUNNELLED flag is used in non-p2p migration

2014-05-22 Thread Jiri Denemark
The current error message is error: use virDomainMigrateToURI3 for peer-to-peer migration which is correct but a bit misleading because the client did not specify VIR_MIGRATE_PEER2PEER flag. This patch changes the error message to error: cannot perform tunnelled migration without using p

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

2014-05-22 Thread Jiri Denemark
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 - src/qemu/qemu_migration.c | 74 ++---

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

2014-05-22 Thread Jiri Denemark
On Thu, May 22, 2014 at 02:07:32 +, chen.fan.f...@cn.fujitsu.com wrote: > 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 > > > upda

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

2014-05-22 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] [PATCHv2 4/4] qemu: fix

2014-05-22 Thread Laine Stump
For a clock element as above, libvirt simply converts current system time with localtime_r(), then starts qemu with a time string that doesn't contain any timezone information. So, from qemu's point of view, the -rtc string it gets for: is identical to the -rtc string it gets for: (assu

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

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

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

2014-05-22 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] [PATCHv2 0/4] qemu: fix broken RTC_CHANGE event when clock offset='variable'

2014-05-22 Thread Laine Stump
(the cover letter from V1 has been preserved here with small updates) 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 a

[libvirt] [PATCH 0/3] use -serial for ppce500 board and add test case

2014-05-22 Thread Olivia Yin
Machine name ppce500 is used to replace ppce500v2 supported by QEMU. QEMU ppce500 board uses the old style -serial options. Test case ppce500-serial is used to verify this change. Olivia Yin (3): change machine name ppce500v2 as ppce500 qemu: Fix specifying char devs for PPC tests: add test

[libvirt] [PATCH 3/3] tests: add test case for -serial option for ppce500

2014-05-22 Thread Olivia Yin
--- .../qemuxml2argv-ppce500-serial.args | 7 ++ .../qemuxml2argv-ppce500-serial.xml| 26 ++ tests/qemuxml2argvtest.c | 1 + 3 files changed, 34 insertions(+) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-p

[libvirt] [PATCH 1/3] change machine name ppce500v2 as ppce500

2014-05-22 Thread Olivia Yin
--- docs/schemas/domaincommon.rng| 2 +- tests/qemuxml2argvdata/qemuxml2argv-ppc-dtb.args | 2 +- tests/qemuxml2argvdata/qemuxml2argv-ppc-dtb.xml | 2 +- tests/testutilsqemu.c| 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc

[libvirt] [PATCH 2/3] qemu: Fix specifying char devs for PPC

2014-05-22 Thread Olivia Yin
QEMU ppce500 board uses the old style -serial options. Other PPC boards don't give any way to explicitly wire in a -chardev except pseries which uses -device spapr-vty with -chardev. --- src/qemu/qemu_capabilities.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sr

Re: [libvirt] [PATCH] qemuSetupCgroupForVcpu: s/virProcessInfoSetAffinity/virProcessSetAffinity/

2014-05-22 Thread Daniel P. Berrange
On Thu, May 22, 2014 at 12:32:02PM +0200, Michal Privoznik wrote: > In the f56c773bf we've made the substitution but forgot to fix one > comment which is still referring to the old name. This may be > potentially misleading. > > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_cgroup.c | 3

[libvirt] [PATCH] qemuSetupCgroupForVcpu: s/virProcessInfoSetAffinity/virProcessSetAffinity/

2014-05-22 Thread Michal Privoznik
In the f56c773bf we've made the substitution but forgot to fix one comment which is still referring to the old name. This may be potentially misleading. Signed-off-by: Michal Privoznik --- src/qemu/qemu_cgroup.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qemu/qemu_

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

2014-05-22 Thread Jiri Denemark
On Wed, May 21, 2014 at 22:06:08 -0600, Eric Blake wrote: > 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. > > Simila