[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] [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

[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:

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

Re: [libvirt] [PATCH] qemu: Refactor qemuDomainSetMemoryParameters

2013-02-22 Thread John Ferlan
On 02/18/2013 10:18 AM, Peter Krempa wrote: The new TypedParam helper APIs allow to simplify this function significantly. This patch integrates the fix in 75e5bec97b3045e4f926248d5c742f8a50d0f9 by correctly ordering the setting functions instead of reordering the parameters. ---

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

2013-02-22 Thread John Ferlan
On 02/20/2013 08:05 PM, Dave Allan wrote: 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

Re: [libvirt] [PATCH 1/5] storage: move flag setting after declarations

2013-02-22 Thread John Ferlan
On 02/18/2013 09:27 AM, Ján Tomko wrote: --- src/storage/storage_backend.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) ACK John -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 2/5] storage: separate qemu-img command generation and execution

2013-02-22 Thread John Ferlan
On 02/18/2013 09:27 AM, Ján Tomko wrote: This allows us to create a test for the generated command line. --- src/storage/storage_backend.c | 98 ++- src/storage/storage_backend.h | 8 2 files changed, 67 insertions(+), 39 deletions(-) ACK

Re: [libvirt] [PATCH 3/5] storage: add test for qemu-img command line generation

2013-02-22 Thread John Ferlan
On 02/18/2013 09:27 AM, Ján Tomko wrote: --- tests/Makefile.am | 9 + tests/storagevolxml2argvdata/pool-dir.xml | 18 ++ tests/storagevolxml2argvdata/qcow2-flag.argv | 1 + .../qcow2-nobacking-convert-flag.argv | 1 +

Re: [libvirt] [PATCH 4/5] storage: move qemu-img options before positional arguments

2013-02-22 Thread John Ferlan
On 02/18/2013 09:27 AM, Ján Tomko wrote: Modify the expected output of storagevolxml2argv tests as well. --- src/storage/storage_backend.c | 21 ++--- tests/storagevolxml2argvdata/qcow2-flag.argv| 2 +- .../qcow2-nobacking-convert-flag.argv

Re: [libvirt] [PATCH 5/5] storage: qemu-img: change INFO to DEBUG

2013-02-22 Thread John Ferlan
On 02/18/2013 09:27 AM, Ján Tomko wrote: For really old qemu-img binaries which do not support specifying the format of the backing file, display a DEBUG message instead of INFO that this can't be done. --- src/storage/storage_backend.c | 4 ++-- 1 file changed, 2 insertions(+), 2

Re: [libvirt] [PATCHv2 0/8] VirtIO RNG device support

2013-02-22 Thread John Ferlan
On 02/21/2013 09:47 AM, Peter Krempa wrote: Version 2 fixes comments by John and several improvements I noticed. There's 1 new patch in this series. See patch notes for more info. Peter Krempa (8): conf: Add fake switch statement to warn for new device types doc: schema: Add basic

[libvirt] [PATCH v3 1/8] libvirt: Update headers for doc

2013-02-26 Thread John Ferlan
Update the function prototypes to include a message about the client needing to free() returned name fields. Fix the all domains example flags values. v3-v2 diff: Separted this out to it's own patch. --- src/libvirt.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-)

[libvirt] [PATCH v3 9/8] hellolibvirt: Adjust some comments and condition usage

2013-02-26 Thread John Ferlan
v3-v2 difference: Reduced the amount of change to a few comments and adjusting the (NULL == xxx) and (-1 == xxx) checks Since these are just documentation changes - once ACK'd is it OK to push now or should I wait for after the freeze? Tks, John ---

Re: [libvirt] [PATCH v3 9/8] hellolibvirt: Adjust some comments and condition usage

2013-02-27 Thread John Ferlan
On 02/26/2013 07:54 PM, Eric Blake wrote: On 02/26/2013 07:20 AM, John Ferlan wrote: I would have put '---' here, since... The information was only in the email not part of the git history. In the future I'll remember to put that after the '---'. examples/hellolibvirt/hellolibvirt.c

Re: [libvirt] [PATCH 0/8] Web page updates/changes

2013-03-04 Thread John Ferlan
On 02/18/2013 09:14 PM, John Ferlan wrote: docs/api.html.in | 261 +-- docs/drivers.html.in | 1 + docs/index.html.in | 6 + docs/internals.html.in | 102 +- docs/libvirt

[libvirt] [PATCH 3/3] sheepdog: Add Coverity filter

2013-03-05 Thread John Ferlan
Add a Coverity dead_error_condition tag since it's not possible for next to be NULL at that point and thus exit the while loop. If next were NULL the condition to set it would have done the return -1. --- src/storage/storage_backend_sheepdog.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

[libvirt] [PATCH 2/3] libxl_driver: Resolve Coverity errors

2013-03-05 Thread John Ferlan
1. The virObjectLock() call was unconditional, but Unlock was conditional on vm being valid. Removed the check 2. A call to virDomainEventNewFromObj() isn't guaranteed to return an event - that check needs to be made prior to libxlDomainEventQueue() of the event. Did not add

[libvirt] [PATCH 1/3] libxl_conf: Resolve Coverity issue with call to regcomp()

2013-03-05 Thread John Ferlan
--- src/libxl/libxl_conf.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index 4ce5dec..b208dd8 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -769,10 +769,19 @@ error: virCapsPtr

[libvirt] [PATCH 0/3] Resolve some recently uncovered Coverity warnings

2013-03-05 Thread John Ferlan
regarding these types of discoveries. John Ferlan (3): libxl_conf: Resolve Coverity issue with call to regcomp() libxl_driver: Resolve Coverity errors sheepdog: Add Coverity filter src/libxl/libxl_conf.c | 11 ++- src/libxl/libxl_driver.c | 10

Re: [libvirt] [PATCH 0/3] Resolve some recently uncovered Coverity warnings

2013-03-05 Thread John Ferlan
On 03/05/2013 07:43 AM, John Ferlan wrote: src/libxl/libxl_conf.c | 11 ++- src/libxl/libxl_driver.c | 10 ++ src/storage/storage_backend_sheepdog.c | 2 ++ 3 files changed, 18 insertions(+), 5 deletions(-) Changed sheepdog to use break

Re: [libvirt] [PATCH] storage: Fix memory leak in error path

2013-03-06 Thread John Ferlan
On 03/06/2013 06:59 AM, Jiri Denemark wrote: This also renames cleanup label as error since it is only used for error path rather then being common for both success and error paths. --- src/storage/storage_backend_logical.c | 15 --- 1 file changed, 8 insertions(+), 7

Re: [libvirt] [PATCH] storage: Fix memory leak in error path

2013-03-06 Thread John Ferlan
On 03/06/2013 07:35 AM, John Ferlan wrote: On 03/06/2013 06:59 AM, Jiri Denemark wrote: +virFreeError(err); Not that it matters here, but I did find at least one path where a virSaveLastError() didn't call virFreeError() (e.g in storage_backend_logical.c). Oy - wrong window - gotta

Re: [libvirt] [PATCH] storage: Cleanup logical volume creation code

2013-03-06 Thread John Ferlan
On 03/06/2013 08:04 AM, Jiri Denemark wrote: This patch plugs two memory leaks, removes some useless and confusing constructs and renames renames cleanup label as error since it is only used for error path rather then being common for both success and error paths. ---

[libvirt] [PATCH] Resolve valgrind error

2013-03-06 Thread John Ferlan
Resolves the following valgrind error from qemuxml2argvtest: ==20393== 5 bytes in 1 blocks are definitely lost in loss record 2 of 60 ==20393==at 0x4A0883C: malloc (vg_replace_malloc.c:270) ==20393==by 0x38D690A167: __vasprintf_chk (in /usr/lib64/libc-2.16.so) ==20393==by 0x4CB0D97:

Re: [libvirt] [PATCH] storage: Cleanup logical volume creation code

2013-03-06 Thread John Ferlan
On 03/06/2013 08:59 AM, Jiri Denemark wrote: On Wed, Mar 06, 2013 at 08:46:15 -0500, John Ferlan wrote: On 03/06/2013 08:04 AM, Jiri Denemark wrote: Oops, you're right. Looks like a bad day today :-) Is this an ACK or do you need yet another version for adding cmd = NULL? Jirka Sorry

Re: [libvirt] [PATCH] Resolve valgrind error

2013-03-06 Thread John Ferlan
On 03/06/2013 09:21 AM, Guannan Ren wrote: On 03/06/2013 09:49 PM, John Ferlan wrote: --- src/conf/domain_conf.c | 1 + 1 file changed, 1 insertion(+) ACK Guannan Pushed, thanks John -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman

Re: [libvirt] [PATCH] Add support for disks backed by plain files in LXC

2013-03-07 Thread John Ferlan
On 03/07/2013 06:41 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com By using a loopback device, disks backed by plain files can be made available to LXC containers. We make no attempt to auto-detect format if driver type=raw/ is not set, instead we unconditionally

Re: [libvirt] [PATCH 1/1] Clean redundant code about VCPU string checking

2013-03-18 Thread John Ferlan
On 03/18/2013 05:57 AM, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com Now that VCPU number are removed from qemu_monitor_text.c. VCPU string checking also should be removed. Report-by: John Ferlan jfer...@redhat.com Signed-off-by: Li Zhang zhlci...@linux.vnet.ibm.com

Re: [libvirt] [PATCH] storage: fix unlikely memory leak in rbd backend

2013-03-18 Thread John Ferlan
On 03/18/2013 04:07 PM, Laine Stump wrote: virStorageBackendRBDRefreshPool() first allocates an array big enough to hold 1024 names, then calls rbd_list(), which returns ERANGE if the array isn't big enough. When that happens, the VIR_ALLOC_N is called again with a larger size. Unfortunately,

Re: [libvirt] [PATCH 1/7] Setup LXC cgroups in two phases

2013-03-19 Thread John Ferlan
On 03/15/2013 12:32 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Currently the LXC controller creates the cgroup, configures the resources and adds the task all in one go. This is not sufficiently flexible for the forthcoming NBD integration. We need to make

Re: [libvirt] [PATCH 2/7] Add support for storage format in FS driver

2013-03-19 Thread John Ferlan
On 03/15/2013 12:32 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Extend the driver element in filesystem devices to allow a storage format to be set. The new attribute uses 'format' to reflect the storage format. This is different from the driver element in

Re: [libvirt] [PATCH 3/7] Re-arrange code setting up ifs/disk loop devices for LXC

2013-03-19 Thread John Ferlan
On 03/15/2013 12:32 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The current code for setting up loop devices to LXC disks first does a switch() based on the disk format, then looks at the disk driver name. Reverse this so it first looks at the driver name, and

Re: [libvirt] [PATCH 4/7] Add a helper API for setting up a NBD device with qemu-nbd

2013-03-19 Thread John Ferlan
On 03/15/2013 12:32 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Add a virFileNBDDeviceAssociate method, which given a filename will setup a NBD device, using qemu-nbd as the server. Signed-off-by: Daniel P. Berrange berra...@redhat.com ---

Re: [libvirt] [PATCH 5/7] Add 'nbd' as a valid filesystem driver type

2013-03-19 Thread John Ferlan
On 03/15/2013 12:32 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The filesystem element can now accept a driver type='nbd'/ as an alternative to 'loop'. The benefit of NBD is support for non-raw disk image formats. Signed-off-by: Daniel P. Berrange

Re: [libvirt] [PATCH 7/7] Do not prematurely close loop devices in LXC controller

2013-03-19 Thread John Ferlan
On 03/15/2013 12:32 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The LXC controller is closing loop devices as soon as the container has started. This is fine if the loop device was setup as a mounted filesystem, but if we're just passing through the loop

Re: [libvirt] [PATCH 6/7] Support NBD backed disks/filesystems in LXC driver

2013-03-19 Thread John Ferlan
On 03/15/2013 12:32 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The LXC driver can already configure disk or filesystem devices to use the loop device. This extends it to also allow for use of the NBD device, to support non-raw formats. Signed-off-by: Daniel

Re: [libvirt] [PATCH] virsh: Add a helper to parse cpulist

2013-04-01 Thread John Ferlan
On 03/28/2013 07:36 AM, Osier Yang wrote: vcpupin and emulatorpin use same code to parse the cpulist, this How about The 'virsh vcpupin' and 'virsh emulatorpin' commands use the same code to parse the cpulist. This patch abstracts the same code as a helper. Along with various code style

[libvirt] [PATCH] Resolve valgrind failure

2013-04-01 Thread John Ferlan
Code added by commit id '523207fe8' TEST: qemuxml2argvtest 40 80 120 160

Re: [libvirt] [PATCH] Resolve valgrind failure

2013-04-01 Thread John Ferlan
On 04/01/2013 02:29 PM, Eric Blake wrote: On 04/01/2013 11:38 AM, John Ferlan wrote: Code added by commit id '523207fe8' Definitely helpful. Interesting side note is that running the test singularly via 'make -C tests check TESTS=qemuxml2argvtest' didn't trip the valgrind error; however

Re: [libvirt] [PATCH 2/3] qemu: Error out if the bitmap for pinning is all clear

2013-04-02 Thread John Ferlan
On 04/02/2013 01:42 AM, Osier Yang wrote: For both live and config changes of vcpupin and emulatorpin, an all clear bitmap doesn't make sense, and it can just cause corruptions. E.g (similar for emulatorpin). % virsh vcpupin hame 0 8,^8 --config % virsh vcpupin hame VCPU: CPU Affinity

Re: [libvirt] [PATCH 3/3] virsh: Prohibit all clear cpumap

2013-04-02 Thread John Ferlan
On 04/02/2013 01:42 AM, Osier Yang wrote: This prohibits all clear cpumap eariler in virsh, for both vcpupin and emulatorpin. --- tools/virsh-domain.c | 35 ++- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/tools/virsh-domain.c

Re: [libvirt] [PATCH 1/3] util: Add a helper to check if all bits of a bitmap are clear

2013-04-02 Thread John Ferlan
On 04/02/2013 01:42 AM, Osier Yang wrote: --- src/libvirt_private.syms | 1 + src/util/virbitmap.c | 30 ++ src/util/virbitmap.h | 3 +++ 3 files changed, 34 insertions(+) Since there already is a virBitmapIsAllSet() - why isn't it used? I see

Re: [libvirt] [PATCH v3 1/2] Optimize machine option to set more options with it

2013-04-03 Thread John Ferlan
On 04/02/2013 09:50 PM, Li Zhang wrote: On 2013年04月02日 20:52, Eric Blake wrote: On 04/02/2013 04:05 AM, Daniel P. Berrange wrote: On Fri, Mar 29, 2013 at 01:22:46PM +0800, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com Currently, -machine option is used only when dump-guest-core

Re: [libvirt] [PATCH 1/7] New XML attributes for storage pool source adapter

2013-04-05 Thread John Ferlan
On 03/25/2013 12:43 PM, Osier Yang wrote: This introduces 4 new attributes for storage pool source adapter. E.g. adapter type='fc_host' parent='scsi_host5' wwnn='2000c9831b4b' wwpn='1000c9831b4b'/ Attribute 'type' can be either 'scsi_host' or 'fc_host', and defaults to

Re: [libvirt] [PATCH 2/7] storage: Make the adapter name be consistent with node device driver

2013-04-05 Thread John Ferlan
On 03/25/2013 12:43 PM, Osier Yang wrote: node device driver names the HBA like scsi_host5, but storage driver uses host5, which could make the user confused. This changes them to be consistent. However, for back-compat reason, adapter name like host5 is still supported. v1 - v2: * Use

Re: [libvirt] [PATCH 3/7] storage: Move virStorageBackendSCSIGetHostNumber into iscsi backend

2013-04-05 Thread John Ferlan
On 03/25/2013 12:43 PM, Osier Yang wrote: It's only used by iscsi backend. --- src/storage/storage_backend_iscsi.c | 39 - src/storage/storage_backend_scsi.c | 39 - src/storage/storage_backend_scsi.h | 3 --- 3

Re: [libvirt] [PATCH 4/7] phyp: Prohibit fc_host adapter for phyp driver

2013-04-05 Thread John Ferlan
On 03/25/2013 12:43 PM, Osier Yang wrote: It's possible to support fc_host adapter for phyp driver too, but at this stage I'd like to not allow it when I'm not that clear how it works. --- src/phyp/phyp_driver.c | 7 +++ 1 file changed, 7 insertions(+) diff --git

Re: [libvirt] [PATCH 5/7] util: Add helper to get the scsi host name by iterating over sysfs

2013-04-05 Thread John Ferlan
On 03/25/2013 12:43 PM, Osier Yang wrote: The helper iterates over sysfs, to find out the matched scsi host name by comparing the wwnn,wwpn pair. It will be used by checkPool and refreshPool of storage scsi backend. New helper getAdapterName is introduced in storage_backend_scsi.c, which uses

Re: [libvirt] [PATCH 6/7] storage: Add startPool and stopPool for scsi backend

2013-04-05 Thread John Ferlan
On 03/25/2013 12:43 PM, Osier Yang wrote: startPool creates the vHBA if it's not existed yet, stopPool destroys s/it's not exists/it does not exist/ the vHBA. Also to support autostart, checkPool will creates the vHBA s/creates/create if it's not existed yet. s/it's not existed/it does not

Re: [libvirt] [PATCH 7/7] storage: Guess the parent if it's not specified for vHBA

2013-04-05 Thread John Ferlan
On 03/25/2013 12:43 PM, Osier Yang wrote: This finds the parent for vHBA by iterating over all the HBA which supports vport_ops capability on the host, and return the first one which is online, not saturated (vports in use is less than max_vports). --- src/libvirt_private.syms |

Re: [libvirt] [PATCH v2] qemu: Support multiple queue virtio-scsi

2013-04-05 Thread John Ferlan
On 04/05/2013 12:21 PM, Osier Yang wrote: This introduce a new attribute num_queues (same with the good name QEMU uses) for virtio-scsi controller. An example of the XML: controller type='scsi' index='0' model='virtio-scsi' num_queues='8'/ The corresponding QEMU command line: -device

[libvirt] [PATCH] Add error handling to optional arguments in cmdCPUStats

2013-04-05 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=907732 Also added informational message when count value is larger than number of CPUs present. Original code commit '31047e2b' quietly changes it and continues on. Prior to this patch, no errors were seen for following sequences virsh cpu-stats

Re: [libvirt] [PATCH 1/8] conf: New helper virDomainDiskSourceDefFormat to format the disk source

2013-04-05 Thread John Ferlan
On 04/04/2013 03:37 PM, Osier Yang wrote: The code to format disk source is long enough to have a helper. --- src/conf/domain_conf.c | 174 ++--- 1 file changed, 92 insertions(+), 82 deletions(-) ACK John -- libvir-list mailing list

Re: [libvirt] [PATCH 2/8] Introduce new XMLs to specify disk source using libvirt storage

2013-04-05 Thread John Ferlan
On 04/04/2013 03:37 PM, Osier Yang wrote: With this patch, one can specify the disk source using libvirt storage like: disk type='volume' device='disk' driver name='qemu' type='raw' cache='none'/ source pool='default' volume='fc18.img'/ target dev='vdb' bus='virtio'/ /disk

Re: [libvirt] [PATCH 2/8] Introduce new XMLs to specify disk source using libvirt storage

2013-04-05 Thread John Ferlan
On 04/04/2013 03:37 PM, Osier Yang wrote: With this patch, one can specify the disk source using libvirt storage like: disk type='volume' device='disk' driver name='qemu' type='raw' cache='none'/ source pool='default' volume='fc18.img'/ target dev='vdb' bus='virtio'/ /disk

Re: [libvirt] [PATCH 3/8] qemu: Translate the pool disk source when building drive string

2013-04-05 Thread John Ferlan
On 04/04/2013 03:37 PM, Osier Yang wrote: This adds a new helper qemuTranslateDiskSourcePool which uses the storage pool/vol APIs to tranlsate the disk source before building s/tranlsate/translate/ the drive string. Network volume is not supported yet. Disk chain for volume type disk may be

Re: [libvirt] [PATCH 4/8] Support startupPolicy for 'volume' disk

2013-04-05 Thread John Ferlan
On 04/04/2013 03:37 PM, Osier Yang wrote: startupPolicy is only valid for file type storage volume, otherwise it fails on starting the domain. --- docs/formatdomain.html.in| 7 --- docs/schemas/domaincommon.rng| 3 +++

Re: [libvirt] [PATCH 3/8] qemu: Translate the pool disk source when building drive string

2013-04-05 Thread John Ferlan
On 04/05/2013 07:32 PM, Eric Blake wrote: On 04/05/2013 05:24 PM, John Ferlan wrote: On 04/04/2013 03:37 PM, Osier Yang wrote: This adds a new helper qemuTranslateDiskSourcePool which uses the storage pool/vol APIs to tranlsate the disk source before building s/tranlsate/translate

Re: [libvirt] [PATCH 5/8] Support seclabels for volume type disk

2013-04-05 Thread John Ferlan
On 04/04/2013 03:37 PM, Osier Yang wrote: seclabels is only valid for 'file' or 'block' type storage volume. --- docs/formatdomain.html.in| 6 -- docs/schemas/domaincommon.rng| 3 +++ src/conf/domain_conf.c

Re: [libvirt] [PATCH 6/8] qemu: Translate the pool disk source earlier

2013-04-05 Thread John Ferlan
On 04/04/2013 03:38 PM, Osier Yang wrote: To support shareable for volume type disk, we have to translate the source before trying to add the shared disk entry. To archieve s/archeive/achieve/ the goal, this moves the helper qemuTranslateDiskSourcePool into src/qemu/qemu_conf.c, and

Re: [libvirt] [PATCH 7/8] qemu: Support shareable volume type disk

2013-04-05 Thread John Ferlan
On 04/04/2013 03:38 PM, Osier Yang wrote: Since the source is already translated before. This just adds the checking. Move !disk-shared and !disk-src to improve the performance a bit. --- src/qemu/qemu_conf.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) ACK,

Re: [libvirt] [PATCH 0/8 v2] Glue domain and storage

2013-04-05 Thread John Ferlan
On 04/05/2013 12:30 PM, Osier Yang wrote: Like 7/8, 8/8, 9/8, there must be many places which also should be modified to not prevent the new volume type disk out of the door, but it's hard to find them out at once, disk related stuffs are always hairy. Anyway, it doesn't affect to let the

Re: [libvirt] [PATCH 8/8] qemu: Support sgio setting for volume type disk

2013-04-05 Thread John Ferlan
On 04/04/2013 03:38 PM, Osier Yang wrote: --- src/qemu/qemu_process.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) Perhaps a MACRO would be better to describe: !(disk-type == VIR_DOMAIN_DISK_TYPE_VOLUME + disk-srcpool + disk-srcpool-voltype ==

Re: [libvirt] [PATCH 9/8] qemu: Allow volume type disk for device 'lun'

2013-04-05 Thread John Ferlan
On 04/05/2013 01:07 PM, Osier Yang wrote: This allows one use block type volume as the disk source for device 'lun'. --- src/qemu/qemu_command.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) ACK - seems reasonable. John diff --git a/src/qemu/qemu_command.c

[libvirt] [PATCH v2 1/2] Remove extraneous comma in info_cpu_stats and opts_cpu_stats

2013-04-08 Thread John Ferlan
--- tools/virsh-domain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index c088468..e6e6877 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -6111,7 +6111,7 @@ static const vshCmdInfo info_cpu_stats[] = {

[libvirt] [PATCH v2 0/2] Add error handling to optional arguments in cmdCPUStats

2013-04-08 Thread John Ferlan
to delineate between bad argument and invalid value (eg, negative CPU start number or count) - Only display the # cpus message when too large a value is supplied John Ferlan (2): Remove extraneous comma in info_cpu_stats and opts_cpu_stats Add error handling to optional arguments in cmdCPUStats

[libvirt] [PATCH v2 2/2] Add error handling to optional arguments in cmdCPUStats

2013-04-08 Thread John Ferlan
--- tools/virsh-domain.c | 29 ++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index e6e6877..6d760f2 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -6144,15 +6144,35 @@

[libvirt] [PATCH 0/2] Add version comparison method for virsh_version output

2013-04-09 Thread John Ferlan
kept both interfaces. The vxml change is just an informative message that showed me the name of the image that was failing - I had created 'default-kvm-dimage.img' and tests were failing to find 'default-kvm-dimage' to place into the cimtest storage pool. John Ferlan (2): vxml: Add which volume

[libvirt] [PATCH 1/2] vxml: Add which volume could not be found to error message

2013-04-09 Thread John Ferlan
--- suites/libvirt-cim/lib/XenKvmLib/vxml.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/suites/libvirt-cim/lib/XenKvmLib/vxml.py b/suites/libvirt-cim/lib/XenKvmLib/vxml.py index 51a4166..82ab501 100644 --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py +++

[libvirt] [PATCH 2/2] Add and utilize virsh_version_cmp

2013-04-09 Thread John Ferlan
The string version comparisons failed when determining if 0.10.2 was a greater version than 0.4.1 (and other similar checks). Needed to create a version comparison method that did the right thing. Also, not change to 12_create_netfs_storagevolume_errs.py to use or logic rather than and logic on

Re: [libvirt] [PATCH v2 0/2] Add error handling to optional arguments in cmdCPUStats

2013-04-11 Thread John Ferlan
Thanks for the review - adjusted/removed the -cpu value check w/r/t: patch 1/2 - every other structure in the module didn't have the trailing comma so that was a consistency thing. pushed John -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH 0/6] cleanup: About including header

2013-04-15 Thread John Ferlan
On 04/15/2013 02:28 AM, Osier Yang wrote: *** BLURB HERE *** Osier Yang (6): cleanup: Remove the duplicate header cleanup: Only include testutils.h once cleanup: Don't include libvirt/libvirt.h cleanup: Don't include libvirt/virterror.h syntax-check: Don't include duplicate

[libvirt] [PATCH 2/2] virsh: Add check for domain state before attempting suspend

2013-04-15 Thread John Ferlan
--- tools/virsh-domain.c | 24 ++-- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index f41a74b..a201316 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -2627,18 +2627,30 @@ cmdSuspend(vshControl

[libvirt] [PATCH] Resolve valgrind error

2013-04-15 Thread John Ferlan
Commit id '1acfc171' resulted in the following valgrind failure: ==25317== 136 (24 direct, 112 indirect) bytes in 1 blocks are definitely lost in loss record 4 of 4 ==25317==at 0x4A06B6F: calloc (vg_replace_malloc.c:593) ==25317==by 0x4C6F851: virAlloc (viralloc.c:124) ==25317==by

[libvirt] [PATCH 0/2] Check domain status before virsh suspend or resume

2013-04-15 Thread John Ferlan
for both? John Ferlan (2): virsh: Add check for domain state before attempting resume virsh: Add check for domain state before attempting suspend tools/virsh-domain.c | 40 +++- 1 file changed, 31 insertions(+), 9 deletions(-) -- 1.8.1.4 -- libvir-list mailing

[libvirt] [PATCH 1/2] virsh: Add check for domain state before attempting resume

2013-04-15 Thread John Ferlan
--- tools/virsh-domain.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 4d0cc8f..f41a74b 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -4530,19 +4530,29 @@ static bool cmdResume(vshControl

Re: [libvirt] [PATCH] Resolve valgrind error

2013-04-16 Thread John Ferlan
On 04/15/2013 12:49 PM, John Ferlan wrote: Commit id '1acfc171' resulted in the following valgrind failure: ==25317== 136 (24 direct, 112 indirect) bytes in 1 blocks are definitely lost in loss record 4 of 4 ==25317==at 0x4A06B6F: calloc (vg_replace_malloc.c:593) ==25317

[libvirt] [PATCH] Fix build breaker with ATTRIBUTE_NONNULL defs

2013-04-16 Thread John Ferlan
Using ./autogen.sh --system lv_cv_static_analysis=yes for my daily Coverity builds resulted in the following error when building: In file included from util/vircgrouppriv.h:32:0, from util/vircgroup.c:44: util/vircgroup.h:59:5: error: nonnull argument with out-of-range operand

[libvirt] [PATCH 2/4] Adjust comments to describe on_poweroff and on_reboot action

2013-04-24 Thread John Ferlan
--- src/libvirt.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/libvirt.c b/src/libvirt.c index c236152..4bd6c9a 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -3184,9 +3184,11 @@ error: * virDomainShutdown: * @domain: a domain object * - *

[libvirt] [PATCH 4/4] docs: Update formatdomain for lifecycle events

2013-04-24 Thread John Ferlan
--- docs/formatdomain.html.in | 30 ++ 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 888c005..2c876ed 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -957,7 +957,13

[libvirt] [PATCH 3/4] Handle the domain event 'on_reboot' and 'on_poweroff' settings

2013-04-24 Thread John Ferlan
--- src/qemu/qemu_driver.c | 26 ++ 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index ba5600d..084412f 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -1697,6 +1697,8 @@ static int

[libvirt] [PATCH 1/4] Adjust usage of qemu -no-reboot and -no-shutdown options

2013-04-24 Thread John Ferlan
During building of the qemu command line determine whether to add/use the '-no-reboot' option only if each of the 'on' events want to to destroy the domain; otherwise, use the '-no-shutdown' option. Prior to this change both could be on the command line, which while allowed could be construed as

[libvirt] [PATCH 0/4] Fix issues with guest lifecycle event action settings

2013-04-24 Thread John Ferlan
settings of the domain. John Ferlan (4): Adjust usage of qemu -no-reboot and -no-shutdown options Adjust comments to describe on_poweroff and on_reboot action Handle the domain event 'on_reboot' and 'on_poweroff' settings docs: Update formatdomain for lifecycle events docs

[libvirt] [PATCH] Resolve valgrind error

2013-04-29 Thread John Ferlan
As a result of commit id '19c345f2', 'make -C tests valgrind' has the following for qemuxml2argvtest: ==22482== 197 (80 direct, 117 indirect) bytes in 1 blocks are definitely lost in loss record 101 of 120 ==22482==at 0x4A06B6F: calloc (vg_replace_malloc.c:593) ==22482==by 0x4C6F301:

Re: [libvirt] [PATCH] Resolve valgrind error

2013-04-29 Thread John Ferlan
On 04/29/2013 08:45 AM, Michal Privoznik wrote: On 29.04.2013 14:35, John Ferlan wrote: As a result of commit id '19c345f2', 'make -C tests valgrind' has the following for qemuxml2argvtest: ==22482== 197 (80 direct, 117 indirect) bytes in 1 blocks are definitely lost in loss record 101

Re: [libvirt] [PATCH v2 10/37] Adapt to VIR_STRDUP in src/lxc/*

2013-04-29 Thread John Ferlan
On 04/29/2013 09:50 AM, Michal Privoznik wrote: --- src/lxc/lxc_cgroup.c | 2 +- src/lxc/lxc_conf.c | 18 +- src/lxc/lxc_container.c | 8 src/lxc/lxc_controller.c | 6 +++--- src/lxc/lxc_driver.c | 7 ++- src/lxc/lxc_process.c| 4 ++--

Re: [libvirt] [PATCH v2 12/37] Adapt to VIR_STRDUP in src/node_device/*

2013-04-29 Thread John Ferlan
On 04/29/2013 09:50 AM, Michal Privoznik wrote: --- src/node_device/node_device_driver.c | 28 -- src/node_device/node_device_hal.c| 13 ++--- src/node_device/node_device_udev.c | 102 +++ 3 files changed, 60 insertions(+), 83 deletions(-)

Re: [libvirt] [PATCH v2 23/37] Adapt to VIR_STRDUP in src/storage/*

2013-04-30 Thread John Ferlan
On 04/29/2013 09:50 AM, Michal Privoznik wrote: --- src/storage/parthelper.c | 7 --- src/storage/storage_backend.c | 16 ++-- src/storage/storage_backend_disk.c| 14 +++--- src/storage/storage_backend_fs.c | 17 -

Re: [libvirt] [PATCH v2 27/37] Adapt to VIR_STRDUP in src/vbox/*

2013-04-30 Thread John Ferlan
On 04/29/2013 09:50 AM, Michal Privoznik wrote: --- src/vbox/vbox_XPCOMCGlue.c | 4 +- src/vbox/vbox_tmpl.c | 190 +++-- 2 files changed, 98 insertions(+), 96 deletions(-) ... diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c

Re: [libvirt] [PATCH v2 32/37] Adapt to VIR_STRDUP in src/xenxs/*

2013-04-30 Thread John Ferlan
On 04/29/2013 09:50 AM, Michal Privoznik wrote: --- src/xenxs/xen_sxpr.c | 107 +-- src/xenxs/xen_xm.c | 43 ++--- 2 files changed, 65 insertions(+), 85 deletions(-) diff --git a/src/xenxs/xen_sxpr.c

Re: [libvirt] [PATCH v2 35/37] Introduce syntax-check rule to prefer VIR_STRDUP over strdup

2013-04-30 Thread John Ferlan
On 04/29/2013 09:50 AM, Michal Privoznik wrote: --- cfg.mk | 8 1 file changed, 8 insertions(+) diff --git a/cfg.mk b/cfg.mk index d499ded..4c6d85c 100644 --- a/cfg.mk +++ b/cfg.mk @@ -383,6 +383,11 @@ sc_prohibit_asprintf: halt='use virAsprintf, not as'printf

Re: [libvirt] [PATCH v2 37/37] viralloc.c: Do report OOM error in VIR_ALLOC and friends

2013-04-30 Thread John Ferlan
On 04/29/2013 09:50 AM, Michal Privoznik wrote: For cases where caller doesn't want to repor an OOM error, he should use s/repor/report s/he should// VIR_ALLOC_QUIET or variants. --- HACKING | 4 ++ docs/hacking.html.in| 6 +++ po/POTFILES.in

Re: [libvirt] [PATCH v2 00/37] Change OOM reporting

2013-04-30 Thread John Ferlan
On 04/29/2013 09:50 AM, Michal Privoznik wrote: Previously, the first version dropped virReportOOMError from almost everywhere. This series don't set such high goal yet. It just prepares ground for doing so. The worst case scenario is the OOM error is reported twice. Once in VIR_ALLOC,

Re: [libvirt] [PATCH v2 1/2] Add VNC WebSocket support

2013-04-30 Thread John Ferlan
On 04/30/2013 10:42 AM, Martin Kletzander wrote: Adding support for new attribute 'websocket' in the 'graphics' element, the attribute value is the port to listen on with '-1' meaning auto-allocation, '0' meaning no websockets. Signed-off-by: Martin Kletzander mklet...@redhat.com ---

Re: [libvirt] [PATCH v2 2/2] qemu: Add VNC WebSocket support

2013-04-30 Thread John Ferlan
On 04/30/2013 10:42 AM, Martin Kletzander wrote: Adding a VNC WebSocket support for QEMU driver. This funcitonality is s/funcitonality/functionality in upstream qemu from commit described as v1.3.0-982-g7536ee4, so the capability is being recognized based on QEMU version for now.

[libvirt] [PATCH] Need to call virFreeError after virSaveLastError

2013-04-30 Thread John Ferlan
This is a followup to https://www.redhat.com/archives/libvir-list/2013-April/msg02004.html which noted that bridge_driver.c also had a missing virFreeError() call --- src/network/bridge_driver.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/network/bridge_driver.c

[libvirt] [PATCH 2/4] docs: Update description of SMBIOS fields

2013-04-30 Thread John Ferlan
--- docs/formatdomain.html.in | 48 +++ 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 017d2b9..2e16a64 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@

[libvirt] [PATCH 0/4] Extra validation for the sysinfo section

2013-04-30 Thread John Ferlan
, if supplied, is in either mm/dd/yy or mm/dd/ format. If the year portion of the string is two digits, the year is assumed to be 19yy. NOTE: The mm/dd/ format is required for SMBIOS version 2.3 and later John Ferlan (4): docs: Fix syntax in sysinfo description docs: Update description

[libvirt] [PATCH 4/4] Need better validation of sysinfo uuid

2013-04-30 Thread John Ferlan
If the sysinfo system table 'uuid' field is improperly formatted, then qemu will fail to start the guest with the error: virsh start dom error: Failed to start domain dom error: internal error process exited while connecting to monitor: Invalid SMBIOS UUID string In this case the system_uuid

  1   2   3   4   5   6   7   8   9   10   >