[libvirt] [PATCH 10/16] conf: Add separate defaults addition and validation for XML parsing

2013-02-20 Thread Peter Krempa
This patch adds instrumentation that will ultimately allow to split out filling of defaults and input validation from the XML parser to separate functions. With this patch, after the XML is parsed, a callback to the driver is issued requesing to fill and validate driver specific details of the

[libvirt] [PATCH 06/16] conf: Refactor cpumask handling

2013-02-20 Thread Peter Krempa
Declare local variables at the start of the block and fix trivial formatting issues. --- src/conf/domain_conf.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index fad293b..18df1bd 100644 ---

[libvirt] [PATCH 09/16] conf: Make virDomainDeviceInfoIterate usable without os type

2013-02-20 Thread Peter Krempa
Make the iterator function usable in the next patches. Also refactor some parts to avoid strcmp if not necessary. --- src/conf/domain_conf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 8024bff..421492f 100644 ---

[libvirt] [PATCH 01/16] conf: Improve core dump config error message

2013-02-20 Thread Peter Krempa
The message didn't seem to be much helpful --- src/conf/domain_conf.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index f2887c6..bd1ea25 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@

Re: [libvirt] VG backed storage pool start behavior.

2013-02-20 Thread Eric Blake
On 02/20/2013 09:40 AM, Luke Varnadore wrote: It was a distro specific issue. Arch Linux has the lvm tools in /usr/sbin instead of /sbin. I made links for lvs, vgs, and vgchange and the issue cleared up. Reported a bug for the package. Is it also a case of upstream libvirt having a bug for not

[libvirt] [PATCH 13/16] qemu_command: Clean up default model passing

2013-02-20 Thread Peter Krempa
After the previous commit, the assignment of the default model is no longer needed. Get rid of it and simplify the code. --- src/qemu/qemu_command.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index

[libvirt] [PATCH 11/16] qemu: Implement the device parse callback and use it for interfaces

2013-02-20 Thread Peter Krempa
This patch implements the callback that is used to fill the qemu default network card into the XML if none is provided in the definition. --- src/qemu/qemu_conf.c | 1 + src/qemu/qemu_domain.c | 23 +++ src/qemu/qemu_domain.h | 1 + 3 files changed, 25 insertions(+) diff

[libvirt] [PATCH 07/16] conf: whitespace cleanups and refactors with no semantic impact

2013-02-20 Thread Peter Krempa
This patch changes many unrelated places to simplify the code or update code style. This patch should not have any semantic impact on the code. --- src/conf/domain_conf.c | 137 + src/conf/domain_conf.h | 4 +- 2 files changed, 60 insertions(+),

[libvirt] [PATCH 15/16] conf: Simplify cputune parameter retrieval

2013-02-20 Thread Peter Krempa
The parameters are initialized already so no need to do it again. --- src/conf/domain_conf.c | 29 - 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 3c3172d..da04b7b 100644 ---

Re: [libvirt] libvirt-libxl driver defaulting to tap disk and not working (on Fedora 18 and rawhide)

2013-02-20 Thread Jim Fehlig
Ian Campbell wrote: if (l_disk-driverName) { ... } else { /* No driverName - default to raw/tap?? */ x_disk-format = LIBXL_DISK_FORMAT_RAW; x_disk-backend = LIBXL_DISK_BACKEND_TAP; } I recall some discussion about the choice of these defaults,

Re: [libvirt] [PATCH 05/16] conf: Reformat many function headers in domain_conf.c

2013-02-20 Thread Laine Stump
On 02/20/2013 12:06 PM, Peter Krempa wrote: Many of the headers were using the old style and even overflowing the 80 column mark. --- src/conf/domain_conf.c | 341 + 1 file changed, 201 insertions(+), 140 deletions(-) Also mechanical. ACK.

Re: [libvirt] [PATCH 04/16] conf: Fix label naming in virDomainDefFormatInternal

2013-02-20 Thread Laine Stump
On 02/20/2013 12:06 PM, Peter Krempa wrote: The label named cleanup was used in error cases only. Change it to error. --- src/conf/domain_conf.c | 72 +- 1 file changed, 36 insertions(+), 36 deletions(-) Mechanical. ACK. -- libvir-list

Re: [libvirt] [PATCH] Fix memory leak in virNetClientIOWriteMessage

2013-02-20 Thread Michal Privoznik
On 18.02.2013 12:01, Sergey Fionov wrote: Commit 18937c3ae0990b4417a43aa07a2c35aaf8cb6ec2 introduced the memory leak when client-msg.fds is moved to thecall-msg and then never freed. --- Hello, Please ignore previous patch with incorrent formatting. src/rpc/virnetclient.c |1 + 1

Re: [libvirt] [PATCH 08/16] conf: Refactor ABI stability checking and break long lines

2013-02-20 Thread Laine Stump
On 02/20/2013 12:06 PM, Peter Krempa wrote: Get rid of the identical variable in the ABI stability checks in favor of return statements and break or refactor very long lines where possible. --- src/conf/domain_conf.c | 469 + 1 file changed,

[libvirt] [PATCH] Remove a couple of misplaced VIR_FREE

2013-02-20 Thread John Ferlan
While working on the hellolibvirt example code, I stumbled across a couple extraneous VIR_FREE()'s in qemuStop(). I was looking at all callers of virConnectListAllDomains()... --- src/qemu/qemu_driver.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/qemu/qemu_driver.c

Re: [libvirt] libvirt-libxl driver defaulting to tap disk and not working (on Fedora 18 and rawhide)

2013-02-20 Thread Dario Faggioli
On mer, 2013-02-20 at 10:07 -0700, Jim Fehlig wrote: libxl__device_disk_set_backend is the guy to look at if you are interested how the selection happens. After taking a peek, agreed that LIBXL_DISK_BACKEND_UNKNOWN is a better backend default. I'll leave the format default of

Re: [libvirt] [PATCH] Remove a couple of misplaced VIR_FREE

2013-02-20 Thread Eric Blake
On 02/20/2013 11:01 AM, John Ferlan wrote: While working on the hellolibvirt example code, I stumbled across a couple extraneous VIR_FREE()'s in qemuStop(). I was looking at all callers of virConnectListAllDomains()... --- src/qemu/qemu_driver.c | 3 --- 1 file changed, 3 deletions(-)

[libvirt] libvirt testing with autotest

2013-02-20 Thread Cole Robinson
Recently I've been playing with virt autotest, which provides a number of qemu and libvirt functional tests. Here's some notes on how to get it running: The super short version of running the libvirt smoke tests on Fedora 18: yum install autotest-framework git clone

[libvirt] [PATCHv2 0/6] interface: udev backend bond support

2013-02-20 Thread Doug Goldstein
Refactor code, clean up error handling, and finally add bond support. The last patch optionally supports a patch I submitted to the Linux kernel which should go in for 3.9 (it was just accepted for net-next). After this patch when you have a bond device you'll get the following: $ ./tools/virsh

[libvirt] [PATCHv2 1/6] interface: Refactor udev bridge to helper func

2013-02-20 Thread Doug Goldstein
Mechanical move to break up udevIfaceGetIfaceDef() into different helpers for each of the interface types to hopefully make the code easier to follow. This moves the bridge code to udevIfaceGetIfaceDefBridge(). --- src/interface/interface_backend_udev.c | 155 ++--- 1

Re: [libvirt] [PATCH] Remove a couple of misplaced VIR_FREE

2013-02-20 Thread John Ferlan
On 02/20/2013 01:11 PM, Eric Blake wrote: On 02/20/2013 11:01 AM, John Ferlan wrote: While working on the hellolibvirt example code, I stumbled across a couple extraneous VIR_FREE()'s in qemuStop(). I was looking at all callers of virConnectListAllDomains()... --- src/qemu/qemu_driver.c |

Re: [libvirt] [PATCH v2 1/2] qemu: Turn closeCallbacks into virObjectLockable

2013-02-20 Thread Eric Blake
On 02/19/2013 02:22 PM, Jiri Denemark wrote: To avoid having to hold the qemu driver lock while iterating through close callbacks and calling them. This fixes a real deadlock when a domain which is being migrated from another host gets autodestoyed as a result of broken connection to the other

[libvirt] [PATCH] keepalive: Guard against integer overflow

2013-02-20 Thread John Ferlan
Don't allow interval to be MAX_INT/1000 in virKeepAliveStart() Guard against possible overflow in virKeepAliveTimeout() by setting the timeout to be MAX_INT/1000 since the math following will multiply it by 1000. This is a follow-up of sorts from a Coverity change made last month:

[libvirt] [PATCH] libxl: Fix setting of disk backend

2013-02-20 Thread Jim Fehlig
The libxl driver was setting the backend field of libxl_device_disk structure to LIBXL_DISK_BACKEND_TAP when the driver element of disk configuration was not specified. This needlessly forces the use of blktap driver, which may not be loaded in dom0

[libvirt] [PATCHv2 6/6] interface: dev type support for bond interfaces

2013-02-20 Thread Doug Goldstein
Patch has been accepted into net-next's 3.9 queue to correctly expose bond interfaces with the 'bond' devtype. --- I'd consider this patch optional until the fix lands in Linus' tree. --- src/interface/interface_backend_udev.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[libvirt] [PATCHv2 3/6] interface: Refactor interface vlan to helper func

2013-02-20 Thread Doug Goldstein
Mechanical move to break up udevIfaceGetIfaceDef() into different helpers for each of the interface types to hopefully make the code easier to follow. This moves the vlan code to udevIfaceGetIfaceDefVlan(). --- src/interface/interface_backend_udev.c | 73 +- 1 file

[libvirt] [PATCHv2 4/6] interface: Improve udev backend device type id

2013-02-20 Thread Doug Goldstein
Refactored the interface device type identification to make it more clear about the operations. Add support for udev devtype to detect VLANs on Linux 3.7 and newer. Move VLAN detection based on device name to fallback case. --- src/interface/interface_backend_udev.c | 46

[libvirt] [PATCHv2 2/6] interface: udev bridge code error handling updates

2013-02-20 Thread Doug Goldstein
Based on feedback from Laine Stump, improve a number of the error handling cases to report the issue to the user instead of not generating data or giving vague errors. Added the bridge device name to every error message as well to make it clear which bridge failed. ---

[libvirt] [PATCHv2 5/6] interface: add bond support to udev backend

2013-02-20 Thread Doug Goldstein
The udev backend now supports bond interfaces. --- src/interface/interface_backend_udev.c | 264 - 1 file changed, 263 insertions(+), 1 deletion(-) diff --git a/src/interface/interface_backend_udev.c b/src/interface/interface_backend_udev.c index db4e7d1..9f1570c

Re: [libvirt] [PATCH] libxl: Fix setting of disk backend

2013-02-20 Thread Eric Blake
On 02/20/2013 01:31 PM, Jim Fehlig wrote: The libxl driver was setting the backend field of libxl_device_disk structure to LIBXL_DISK_BACKEND_TAP when the driver element of disk configuration was not specified. This needlessly forces the use of blktap driver, which may not be loaded in dom0

Re: [libvirt] [PATCH] keepalive: Guard against integer overflow

2013-02-20 Thread Eric Blake
On 02/20/2013 01:51 PM, John Ferlan wrote: Don't allow interval to be MAX_INT/1000 in virKeepAliveStart() Guard against possible overflow in virKeepAliveTimeout() by setting the timeout to be MAX_INT/1000 since the math following will multiply it by 1000. This is a follow-up of sorts

Re: [libvirt] [PATCH] keepalive: Guard against integer overflow

2013-02-20 Thread Eric Blake
On 02/20/2013 02:02 PM, Eric Blake wrote: On 02/20/2013 01:51 PM, John Ferlan wrote: Don't allow interval to be MAX_INT/1000 in virKeepAliveStart() Guard against possible overflow in virKeepAliveTimeout() by setting the timeout to be MAX_INT/1000 since the math following will multiply it by

Re: [libvirt] [PATCH] libxl: Fix setting of disk backend

2013-02-20 Thread Jim Fehlig
Eric Blake wrote: On 02/20/2013 01:31 PM, Jim Fehlig wrote: The libxl driver was setting the backend field of libxl_device_disk structure to LIBXL_DISK_BACKEND_TAP when the driver element of disk configuration was not specified. This needlessly forces the use of blktap driver, which may

Re: [libvirt] [PATCH] keepalive: Guard against integer overflow

2013-02-20 Thread John Ferlan
On 02/20/2013 03:51 PM, John Ferlan wrote: Don't allow interval to be MAX_INT/1000 in virKeepAliveStart() Guard against possible overflow in virKeepAliveTimeout() by setting the timeout to be MAX_INT/1000 since the math following will multiply it by 1000. This is a follow-up of sorts

[libvirt] [PATCH] qemu: check backing chains even when cgroup is omitted

2013-02-20 Thread Eric Blake
https://bugzilla.redhat.com/show_bug.cgi?id=896685 points out a regression caused by commit 38c4a9c - libvirt only labels the backing chain if the backing chain cache is populated, but the code to populate the cache was only conditionally performed if cgroup labeling was necessary. *

Re: [libvirt] [PATCH 02/16] qemu: Refactor error paths in virQEMUDriverCreateCapabilities

2013-02-20 Thread Eric Blake
On 02/20/2013 10:06 AM, Peter Krempa wrote: Change the error label to error and simplify some error paths. --- src/qemu/qemu_conf.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) ACK. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization

Re: [libvirt] [PATCH 01/16] conf: Improve core dump config error message

2013-02-20 Thread Eric Blake
On 02/20/2013 10:06 AM, Peter Krempa wrote: The message didn't seem to be much helpful --- src/conf/domain_conf.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) ACK. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library

Re: [libvirt] [PATCH 03/16] conf: Ensure that new devices are added to conf copy function

2013-02-20 Thread Eric Blake
On 02/20/2013 10:06 AM, Peter Krempa wrote: Use the correct type and get rid of default label in switch to make the compiler complain if a new device type is added. --- src/conf/domain_conf.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) ACK. -- Eric Blake eblake redhat

Re: [libvirt] [PATCH 06/16] conf: Refactor cpumask handling

2013-02-20 Thread Eric Blake
On 02/20/2013 10:06 AM, Peter Krempa wrote: Declare local variables at the start of the block and fix trivial formatting issues. --- src/conf/domain_conf.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) ACK. -- Eric Blake eblake redhat com+1-919-301-3266

Re: [libvirt] [PATCH v2 1/8] hellolibvirt: Update hellolibvirt example

2013-02-20 Thread Dave Allan
On Wed, Feb 20, 2013 at 12:38:38PM -0500, John Ferlan wrote: Update the code to be more in line with how code looks elsewhere in libvirt. Allow listing of domains, networks, storage pools, and network interfaces. I like the changes to make the style more in line with the rest of the codebase,

[libvirt] [PATCH] qemu: Fix the memory leak

2013-02-20 Thread Osier Yang
Found by John Ferlan (coverity script) --- Assuming an ACK from John, and it's trivial, so pushed --- src/qemu/qemu_conf.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 8299b79..33fd67d 100644 --- a/src/qemu/qemu_conf.c

Re: [libvirt] [PATCH] qemu: fix an off-by-one error in qemuDomainGetPercpuStats

2013-02-20 Thread Guannan Ren
On 02/20/2013 11:25 PM, Eric Blake wrote: On 02/20/2013 04:51 AM, Guannan Ren wrote: The max value of number of cpus to compute(id) should not be equal or greater than max cpu number. The bug ocurrs when id value is equal to max cpu number which s/ocurrs/occurs/ leads to the off-by-one error

[libvirt] libvirt maint branches

2013-02-20 Thread Doug Goldstein
Instead of hijacking another thread I figured I'd start a new one. I tried to push the branch I had made as requested by Jiri, but I don't appear to have access. $ git push origin v1.0.2-maint Counting objects: 30, done. Delta compression using up to 4 threads. Compressing objects: 100% (18/18),

Re: [libvirt] libvirt testing with autotest

2013-02-20 Thread Lucas Meneghel Rodrigues
On 02/20/2013 03:47 PM, Cole Robinson wrote: A few misc things: - The default libvirt tests seem to work fine as non-root, though every libvirt test is marked as 'root only'. I'm not sure what the practical effect of that is. Long story short, this is mostly due to virbr0 bridge access with

Re: [libvirt] [test-API][PATCH] Add 2 host node memory API cases

2013-02-20 Thread Guannan Ren
On 02/19/2013 05:59 PM, Wayne Sun wrote: add 2 host node memory cases and update conf - node_mem_param: tuning host node memory parameters. - node_memory: get host node memory info, including host free memory, node free memory and node memory stats. - numa_param conf is updated with the 2 new

Re: [libvirt] [PATCH v3 RESEND 01/12] qemu: Introduce NBD_SERVER capability

2013-02-20 Thread Jiri Denemark
On Mon, Feb 18, 2013 at 15:38:34 +0100, Michal Privoznik wrote: This just keeps track whether qemu knows nbd-server-* commands so we can use it during migration or not. --- src/qemu/qemu_capabilities.c | 4 +++- src/qemu/qemu_capabilities.h | 1 + 2 files changed, 4 insertions(+), 1

[libvirt] [PATCH] qemu: Do not ignore mandatory features in migration cookie

2013-02-20 Thread Jiri Denemark
Due to feature/features nasty typo, any features marked as mandatory by one side of a migration are silently considered optional by the other side. The following is the code that formats mandatory features in migration cookie: for (i = 0 ; i QEMU_MIGRATION_COOKIE_FLAG_LAST ; i++) {

Re: [libvirt] [PATCH] qemu: Do not ignore mandatory features in migration cookie

2013-02-20 Thread Michal Privoznik
On 20.02.2013 10:37, Jiri Denemark wrote: Due to feature/features nasty typo, any features marked as mandatory by one side of a migration are silently considered optional by the other side. The following is the code that formats mandatory features in migration cookie: for (i = 0 ; i

Re: [libvirt] VG backed storage pool start behavior.

2013-02-20 Thread Ján Tomko
On 02/18/13 23:11, Luke Varnadore wrote: Libvirt 1.0.2-3 I am unable to use vg storage pools that are shared with the host. I was able to do this without issue an update before this one. Wondering if anyone else is seeing this behavior. I am on an Arch Linux system but I can't see why

Re: [libvirt] building libvirt 1.0.2 without quite a few features - undefined reference to `curl_global_init'

2013-02-20 Thread Thierry Parmentelat
Hi again Looks like I claimed victory quite a liitle bit too early ;-) So, on f16 with the set of features turned off, I could rpmbuild but ran into an issue when trying to yum-install libvirt, because it required libvirt-daemon-driver-interface looks like this interface rpm is not created in

[libvirt] [PATCH] qemu: fix an off-by-one error in qemuDomainGetPercpuStats

2013-02-20 Thread Guannan Ren
The max value of number of cpus to compute(id) should not be equal or greater than max cpu number. The bug ocurrs when id value is equal to max cpu number which leads to the off-by-one error in the following for loop. # virsh cpu-stats guest --start 1 error: Failed to virDomainGetCPUStats()

Re: [libvirt] [PATCHv2] qemu: enable direct migration over IPv6

2013-02-20 Thread Viktor Mihajlovski
On 02/19/2013 02:17 PM, Ján Tomko wrote: I only wanted to check the first result, which is what QEMU on the source will do (until http://git.qemu.org/?p=qemu.git;h=233aa5c in 1.3.0). This would break migration if the family of the first address is different on the source and destination. I

Re: [libvirt] [PATCH 1/2] qemu: switch PCI address alocation to use virDevicePCIAddress

2013-02-20 Thread Ján Tomko
On 02/19/13 04:02, Laine Stump wrote: There were a lot of mechanical changes in this. Assuming that you've run make syntax-check, and tried out several cases of defining new domains with devices that have no pci address specified (with satisfactory results!), and that you fix the two small

[libvirt] [PATCH v2] qemu: Run lzop with '--ignore-warn'

2013-02-20 Thread Michal Privoznik
Currently, if lzop decompression binary produces a warning, it doesn't exit with zero status but 2 instead. Terrifying, but true. However, warnings may be ignored using '--ignore-warn' command line argument. Moreover, in which case, the exit status will be zero. --- src/qemu/qemu_driver.c | 62

[libvirt] [PATCH] maint: enforce private symbol section sorting

2013-02-20 Thread Eric Blake
Automating a sorting check is the only way to ensure we don't regress. Suggested by Dan Berrange. * src/check-symsorting.pl (check_sorting): Add a parameter, validate that groups are in order, and that files exist. * src/Makefile.am (check-symsorting): Adjust caller. * src/libvirt_private.syms:

Re: [libvirt] [PATCH v3 RESEND 02/12] Introduce NBD migration cookie

2013-02-20 Thread Jiri Denemark
On Mon, Feb 18, 2013 at 15:38:35 +0100, Michal Privoznik wrote: This migration cookie is meant for two purposes. The first is to be sent in begin phase from source to destination to let it know we support new implementation of VIR_MIGRATE_NON_SHARED_{DISK,INC} so destination can start NBD

Re: [libvirt] [PATCH v3 RESEND 05/12] qemu: Introduce nbd-server-stop command

2013-02-20 Thread Jiri Denemark
On Mon, Feb 18, 2013 at 15:38:38 +0100, Michal Privoznik wrote: This will be used after all migration work is done to stop NBD server running on destination. It doesn't take any arguments, just issues a command. --- src/qemu/qemu_monitor.c | 19 +++

Re: [libvirt] [PATCH v3 RESEND 03/12] qemu: Introduce nbd-server-start command

2013-02-20 Thread Jiri Denemark
On Mon, Feb 18, 2013 at 15:38:36 +0100, Michal Privoznik wrote: This will be used with new migration scheme. This patch creates basically just monitor stub functions. Wiring them into something useful is done in later patches. --- src/qemu/qemu_monitor.c | 22 +

Re: [libvirt] [PATCH v3 RESEND 04/12] qemu: Introduce nbd-server-add command

2013-02-20 Thread Jiri Denemark
On Mon, Feb 18, 2013 at 15:38:37 +0100, Michal Privoznik wrote: This will be used with new migration scheme. This patch creates basically just monitor stub functions. Wiring them into something useful is done in later patches. --- src/qemu/qemu_monitor.c | 22 ++

Re: [libvirt] [PATCH] maint: enforce private symbol section sorting

2013-02-20 Thread Daniel P. Berrange
On Wed, Feb 20, 2013 at 06:34:33AM -0700, Eric Blake wrote: Automating a sorting check is the only way to ensure we don't regress. Suggested by Dan Berrange. * src/check-symsorting.pl (check_sorting): Add a parameter, validate that groups are in order, and that files exist. *

Re: [libvirt] [PATCH v3 RESEND 06/12] qemu_migration: Introduce qemuMigrationStartNBDServer()

2013-02-20 Thread Jiri Denemark
On Mon, Feb 18, 2013 at 15:38:39 +0100, Michal Privoznik wrote: We need to start NBD server and feed it with all non-shared/, RW and source-full disks. Moreover, with new virPortAllocator we must ensure the borrowed port for NBD server will be returned if either migration completes or qemu

Re: [libvirt] [PATCH v3 RESEND 07/12] qemu_migration: Introduce qemuMigrationDriveMirror

2013-02-20 Thread Jiri Denemark
On Mon, Feb 18, 2013 at 15:38:40 +0100, Michal Privoznik wrote: This function does the source part of NBD magic. It invokes drive-mirror on each non shared and RW disk with a source and wait till the mirroring process completes. When it does we can proceed with migration. Currently, an

Re: [libvirt] [PATCH v3 RESEND 08/12] qemu_domain: Introduce qemuDomainGetDiskBlockInfo

2013-02-20 Thread Jiri Denemark
On Mon, Feb 18, 2013 at 15:38:41 +0100, Michal Privoznik wrote: This is just digging out important implementation from qemu driver's qemuDomainGetDiskBlockInfo() API as this functionality is going to be required in the next patch. --- src/qemu/qemu_domain.c | 127

Re: [libvirt] [PATCH v3 RESEND 09/12] qemu_migration: Check size prerequisites

2013-02-20 Thread Jiri Denemark
On Mon, Feb 18, 2013 at 15:38:42 +0100, Michal Privoznik wrote: With new NBD storage migration approach there are several requirements that need to be meet for successful use of the s/meet/met/ feature. One of them is - the file representing a disk, needs to have at least same size as on the

Re: [libvirt] [PATCH v3 RESEND 10/12] qemu_migration: Stop NBD server at Finish phase

2013-02-20 Thread Jiri Denemark
On Mon, Feb 18, 2013 at 15:38:43 +0100, Michal Privoznik wrote: At the end of migration, it is important to stop NBD server and thus release all allocated resources. --- src/qemu/qemu_migration.c | 25 + 1 file changed, 25 insertions(+) ACK Jirka -- libvir-list

Re: [libvirt] [PATCH v3 RESEND 11/12] qemu_migration: Cancel running jobs on failed migration

2013-02-20 Thread Jiri Denemark
On Mon, Feb 18, 2013 at 15:38:44 +0100, Michal Privoznik wrote: If a migration fails, we need to stop all block jobs running so qemu doesn't try to send data to destination over and over again. --- src/qemu/qemu_migration.c | 46 ++ 1 file changed,

Re: [libvirt] [PATCH v3 RESEND 12/12] qemu_migration: Unlink pre-created storage on error

2013-02-20 Thread Jiri Denemark
On Mon, Feb 18, 2013 at 15:38:45 +0100, Michal Privoznik wrote: If migratioin fails because of whatever reason and we've pre-created any disks, we should remove them instead of letting them lying around. Moreover, we need to save the disks sources into domain status file in case libvirtd gets

Re: [libvirt] [PATCH v3 RESEND 09/12] qemu_migration: Check size prerequisites

2013-02-20 Thread Jiri Denemark
On Wed, Feb 20, 2013 at 14:47:11 +0100, Jiri Denemark wrote: ... +static int +qemuMigrationPreCreateStorage(virQEMUDriverPtr driver, + virDomainObjPtr vm, + qemuMigrationCookiePtr mig) +{ +int ret = -1; +size_t i = 0;

Re: [libvirt] [PATCH v2] qemu: Run lzop with '--ignore-warn'

2013-02-20 Thread Jiri Denemark
On Wed, Feb 20, 2013 at 13:32:02 +0100, Michal Privoznik wrote: Currently, if lzop decompression binary produces a warning, it doesn't exit with zero status but 2 instead. Terrifying, but true. However, warnings may be ignored using '--ignore-warn' command line argument. Moreover, in which

Re: [libvirt] [PATCH] qemu: Do not ignore mandatory features in migration cookie

2013-02-20 Thread Jiri Denemark
On Wed, Feb 20, 2013 at 11:42:01 +0100, Michal Privoznik wrote: On 20.02.2013 10:37, Jiri Denemark wrote: Due to feature/features nasty typo, any features marked as mandatory by one side of a migration are silently considered optional by the other side. The following is the code that

Re: [libvirt] [PATCH] qemu: fix an off-by-one error in qemuDomainGetPercpuStats

2013-02-20 Thread Eric Blake
On 02/20/2013 04:51 AM, Guannan Ren wrote: The max value of number of cpus to compute(id) should not be equal or greater than max cpu number. The bug ocurrs when id value is equal to max cpu number which s/ocurrs/occurs/ leads to the off-by-one error in the following for loop. # virsh

Re: [libvirt] [PATCH 3/6 v4] qemu: Record names of domain which uses the shared disk in hash table

2013-02-20 Thread Daniel P. Berrange
On Wed, Feb 20, 2013 at 03:43:55PM +0800, Osier Yang wrote: The hash entry is changed from ref to {ref, @domains}. With this, the caller can simply call qemuRemoveSharedDisk, without afraid of removing the entry belongs to other domains. qemuProcessStart will obviously benifit from it on error

Re: [libvirt] building libvirt 1.0.2 without quite a few features - undefined reference to `curl_global_init'

2013-02-20 Thread Jiri Denemark
On Tue, Feb 19, 2013 at 15:43:57 -0600, Doug Goldstein wrote: On Tue, Feb 19, 2013 at 2:54 PM, Jiri Denemark jdene...@redhat.com wrote: On Tue, Feb 19, 2013 at 14:37:40 -0600, Doug Goldstein wrote: FWIW, I keep the patchset that I push into Gentoo now in a bit friendlier place to access:

Re: [libvirt] [PATCH] maint: enforce private symbol section sorting

2013-02-20 Thread Eric Blake
On 02/20/2013 06:41 AM, Daniel P. Berrange wrote: On Wed, Feb 20, 2013 at 06:34:33AM -0700, Eric Blake wrote: Automating a sorting check is the only way to ensure we don't regress. Suggested by Dan Berrange. -if (/^\s*$/) { +if (/^#/) { This can match plain comments, or

Re: [libvirt] libvirt-libxl driver defaulting to tap disk and not working (on Fedora 18 and rawhide)

2013-02-20 Thread Ian Campbell
if (l_disk-driverName) { ... } else { /* No driverName - default to raw/tap?? */ x_disk-format = LIBXL_DISK_FORMAT_RAW; x_disk-backend = LIBXL_DISK_BACKEND_TAP; } I recall some discussion about the choice of these defaults, but can't find

Re: [libvirt] [PATCH 0/6 v3] Shared disk table related fixes/improvements

2013-02-20 Thread Osier Yang
On 2013年02月19日 20:27, Osier Yang wrote: Inspires by the crash when using CD-ROM or Floppy with empty source, except the fixes for the crashes, this also enrichs the hash table with a list of names of domain which use the shared disk. And to keep the hash table to be in consistent state, this

Re: [libvirt] libvirt-libxl driver defaulting to tap disk and not working (on Fedora 18 and rawhide)

2013-02-20 Thread Jim Fehlig
Dario Faggioli wrote: Hi Jim, Everyone, I'm having some issues when trying out libvirt-libxl driver on my Fedora, bot on Fedora 18 and Fedorra rawhide (the former seems to be running 0.10.2.3, the later 1.0.2). Here's what happen: [root@localhost ~]# systemctl status xend.service

Re: [libvirt] VG backed storage pool start behavior.

2013-02-20 Thread Luke Varnadore
It was a distro specific issue. Arch Linux has the lvm tools in /usr/sbin instead of /sbin. I made links for lvs, vgs, and vgchange and the issue cleared up. Reported a bug for the package. On Wed, Feb 20, 2013 at 6:40 AM, Ján Tomko jto...@redhat.com wrote: On 02/18/13 23:11, Luke Varnadore

[libvirt] [PATCH 00/16] Add ability fill driver specific defaults when parsing the XML

2013-02-20 Thread Peter Krempa
This monster series cleans up a ton of stuff and then adds the ability to fill driver specific defaults by means of a callback. The usage is demonstrated on automaticaly filling default NIC type with qemu. The long term aim is to move all validations and default settings out of the parser.

[libvirt] [PATCH 03/16] conf: Ensure that new devices are added to conf copy function

2013-02-20 Thread Peter Krempa
Use the correct type and get rid of default label in switch to make the compiler complain if a new device type is added. --- src/conf/domain_conf.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index bd1ea25..218a28b

[libvirt] [PATCH 16/16] conf: Move validation of domain title

2013-02-20 Thread Peter Krempa
Use the helper to avoid doing this in the parser. --- src/conf/domain_conf.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index da04b7b..0689eff 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@

[libvirt] [PATCH 08/16] conf: Refactor ABI stability checking and break long lines

2013-02-20 Thread Peter Krempa
Get rid of the identical variable in the ABI stability checks in favor of return statements and break or refactor very long lines where possible. --- src/conf/domain_conf.c | 469 + 1 file changed, 200 insertions(+), 269 deletions(-) diff --git