Re: [libvirt] [PATCH 00/10] test: Mock snapshot APIs and misc improvements

2013-08-16 Thread Cole Robinson
On 08/09/2013 01:03 PM, Daniel P. Berrange wrote: > On Wed, Aug 07, 2013 at 07:28:54PM -0400, Cole Robinson wrote: >> This series implements snapshot APIs for the test driver, and adds >> some misc improvements, like specifying domain state in the passed >> in driver XML. > > Good addition, the te

[libvirt] [PATCH] virsh: detect programming errors with option parsing

2013-08-16 Thread Eric Blake
Noticed while reviewing another patch that had an accidental mismatch due to refactoring. An audit of the code showed that very few callers of vshCommandOpt were expecting a return of -2, indicating programmer error, and of those that DID check, they just propagated that status to yet another call

Re: [libvirt] [PATCH v3] Add flag to BaselineCPU API to return detailed CPU features

2013-08-16 Thread Eric Blake
On 08/16/2013 03:51 PM, Don Dugger wrote: > On Fri, Aug 16, 2013 at 03:31:14PM -0600, Eric Blake wrote: > ... >> >> (hmm, maybe virsh can add some sanity checking code to make sure we >> aren't querying for a mismatched name; but that would be a followup >> patch...) >> > > If you can explain this

Re: [libvirt] [PATCH v3] Add flag to BaselineCPU API to return detailed CPU features

2013-08-16 Thread Don Dugger
On Fri, Aug 16, 2013 at 03:31:14PM -0600, Eric Blake wrote: ... > > (hmm, maybe virsh can add some sanity checking code to make sure we > aren't querying for a mismatched name; but that would be a followup > patch...) > If you can explain this a little I can try and address it. Since I exposed

[libvirt] [PATCH] libxl: implement NUMA capabilities reporting

2013-08-16 Thread Jim Fehlig
From: Dario Faggioli Starting from Xen 4.2, libxl has all the bits and pieces in place for retrieving an adequate amount of information about the host NUMA topology. It is therefore possible, after a bit of shuffling, to arrange those information in the way libvirt wants to present them to the ou

Re: [libvirt] [PATCH v3] Add flag to BaselineCPU API to return detailed CPU features

2013-08-16 Thread Don Dugger
Eric- Tnx much. I apologize for the `virsh' nit, I was doing all my testing against the API directly and got slightly out of sync on the `virsh' command. Again, tnx for cleaning up and pushing this, I appreciate it. On Fri, Aug 16, 2013 at 03:31:14PM -0600, Eric Blake wrote: ... > > Those are

Re: [libvirt] [PATCH v3] Add flag to BaselineCPU API to return detailed CPU features

2013-08-16 Thread Eric Blake
On 08/02/2013 01:08 PM, Don Dugger wrote: > > Currently the virConnectBaselineCPU API does not expose the CPU features > that are part of the CPU's model. This patch adds a new flag, > VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, that causes the API to explictly s/explictly/explicitly > list all f

Re: [libvirt] virDomainAttachDevice error during disk hotplug

2013-08-16 Thread Doug Goldstein
On Fri, Aug 16, 2013 at 8:30 AM, Daniel P. Berrange wrote: > On Fri, Aug 16, 2013 at 06:51:21PM +0530, Deepak C Shetty wrote: > > On 08/10/2013 06:20 PM, Deepak C Shetty wrote: > > >2013-08-10 11:19:41.772+: 1091: debug : > > >qemuMonitorIOProcess:345 : QEMU_MONITOR_IO_PROCESS: > > >mon=0x7f92

Re: [libvirt] [PATCH v3] Add flag to BaselineCPU API to return detailed CPU features

2013-08-16 Thread Eric Blake
On 08/16/2013 08:39 AM, Don Dugger wrote: > Still hoping that someone can reveiw this patch. I'm reviewing it today. >> >> Currently the virConnectBaselineCPU API does not expose the CPU features >> that are part of the CPU's model. This patch adds a new flag, >> VIR_CONNECT_BASELINE_CPU_EXPAND_

Re: [libvirt] [PATCH] maint: slightly reduce configure size

2013-08-16 Thread Eric Blake
On 08/16/2013 04:37 AM, Daniel P. Berrange wrote: > On Thu, Aug 15, 2013 at 03:11:39PM -0600, Eric Blake wrote: >> Rather than inlining gl_WARN_ADD loads of time, we can shave about >> 17k size off of the configure script by delaying it to a cleanup >> shell loop. >> >> * m4/virt-compile-warnings.m

Re: [libvirt] [PATCH] storage: Update pool metadata after adding/removing/resizing volume

2013-08-16 Thread Eric Blake
On 08/16/2013 06:08 AM, Osier Yang wrote: > RHEL6.5: https://bugzilla.redhat.com/show_bug.cgi?id=965442 Links to a private bug aren't considered very nice on a public list or git repo. > > One has to refresh the pool to get the correct pool info after > adding/removing/resizing a volume, this up

Re: [libvirt] [PATCH] libxl: refactor capabilities code

2013-08-16 Thread Jim Fehlig
Eric Blake wrote: > On 08/12/2013 02:15 PM, Jim Fehlig wrote: > >> Cleanup the libxl capabilities code to be a bit more extensible, >> splitting out the creation of host and guest capabilities. This >> should make it easier to implement additional capabilities in the >> future, such as NUMA top

Re: [libvirt] [PATCH 3/6] Report secret usage error message similarly

2013-08-16 Thread Ján Tomko
On 08/08/2013 02:43 AM, John Ferlan wrote: > Each of the modules handled reporting error messages from the secret fetching > slightly differently with respect to the error. Provide a similar message > for each error case and provide as much data as possible. > --- > src/qemu/qemu_command.c

Re: [libvirt] [PATCH 5/6] docs: Update formatsecrets to include more examples of each type

2013-08-16 Thread Ján Tomko
On 08/08/2013 02:43 AM, John Ferlan wrote: > Update formatsecret docs to describe the various options and provide examples > in order to set up secrets for each type of secret. > --- > docs/formatsecret.html.in | 156 > ++ > 1 file changed, 145 insertio

Re: [libvirt] [PATCHv2 2/2] cgroup: Don't fail to start a VM when DBus isn't compiled in or running

2013-08-16 Thread Daniel P. Berrange
On Fri, Aug 16, 2013 at 04:48:31PM +0200, Peter Krempa wrote: > The systemd code to create cgroups has fallback means built in, but > fails to engage them if a host isn't running DBus or libvirtd is > compiled without DBus (yes, you still don't need to run DBus). > > This patch changes the return

Re: [libvirt] [PATCH 6/6] docs: Update iSCSI storage pool example

2013-08-16 Thread Ján Tomko
On 08/08/2013 02:43 AM, John Ferlan wrote: > Update the iSCSI storage pool example to include the secret > --- > docs/formatstorage.html.in | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > ACK Jan -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/li

Re: [libvirt] [PATCH 4/6] docs: Update the formatdomain disk examples

2013-08-16 Thread Ján Tomko
On 08/08/2013 02:43 AM, John Ferlan wrote: > Add more iSCSI examples including having a secret attached. There are 4 new > examples one for each way to have an iSCSI - a network disk using virtio, ^ Missing punctuation. > a passthrough network lun using scsi, a volume disk using "mode='

Re: [libvirt] [openstack-dev] [nova] live-snapshot/cloning of virtual machines

2013-08-16 Thread Andres Lagar-Cavilla
> On Fri, Aug 16, 2013 at 11:05:19AM +0100, Daniel P. Berrange wrote: >> On Wed, Aug 14, 2013 at 04:53:01PM -0700, Vishvananda Ishaya wrote: >>> Hi Everyone, >>> >>> I have been trying for some time to get the code for the live-snapshot >>> blueprint[1] >>> in. Going through the review process fo

[libvirt] [PATCHv2 0/2] Fix starting of VM's on hosts without DBus compiled in or enabled

2013-08-16 Thread Peter Krempa
Hi, this series fixes regression on hosts without DBus that was introduced by the refactor to use systemd.machined to create cgroups. Version 2: As errors can't be unlogged, this version enhances the error reporting code to add conditional error logging. The only remaining issue is that if a u

[libvirt] [PATCHv2 2/2] cgroup: Don't fail to start a VM when DBus isn't compiled in or running

2013-08-16 Thread Peter Krempa
The systemd code to create cgroups has fallback means built in, but fails to engage them if a host isn't running DBus or libvirtd is compiled without DBus (yes, you still don't need to run DBus). This patch changes the return value in case DBus isn't available to so that the fallback code can be a

[libvirt] [PATCHv2 1/2] virerror: Add support for suppressing reporting of errors

2013-08-16 Thread Peter Krempa
It might be desired to suppress reporting of errors in some cases when the failure isn't fatal but report them in other cases. This patch adds plumbing to simplify doing this and still allows to view the error when in debug mode. The new helper virReportErrorConditional() takes a new first argume

Re: [libvirt] [PATCH v3] Add flag to BaselineCPU API to return detailed CPU features

2013-08-16 Thread Don Dugger
Still hoping that someone can reveiw this patch. On Fri, Aug 02, 2013 at 01:08:19PM -0600, n0ano wrote: > > Currently the virConnectBaselineCPU API does not expose the CPU features > that are part of the CPU's model. This patch adds a new flag, > VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, that ca

Re: [libvirt] virDomainAttachDevice error during disk hotplug

2013-08-16 Thread Deepak C Shetty
On 08/16/2013 07:51 PM, Daniel P. Berrange wrote: On Sat, Aug 10, 2013 at 05:38:20PM +0530, Deepak C Shetty wrote: Hi All, I am trying to do a hotplug of a disk from VDSM (which uses libvirt to get things done). I hit the below error "operation failed: open disk image file failed" comign fr

Re: [libvirt] virDomainAttachDevice error during disk hotplug

2013-08-16 Thread Daniel P. Berrange
On Sat, Aug 10, 2013 at 05:38:20PM +0530, Deepak C Shetty wrote: > Hi All, > I am trying to do a hotplug of a disk from VDSM (which uses > libvirt to get things done). > I hit the below error "operation failed: open disk image file > failed" comign from virDomainAttachDevice. > > Some backgrou

Re: [libvirt] virDomainAttachDevice error during disk hotplug

2013-08-16 Thread Deepak C Shetty
On 08/16/2013 06:59 PM, Daniel P. Berrange wrote: On Sat, Aug 10, 2013 at 05:38:20PM +0530, Deepak C Shetty wrote: Hi All, I am trying to do a hotplug of a disk from VDSM (which uses libvirt to get things done). I hit the below error "operation failed: open disk image file failed" comign fr

Re: [libvirt] [PATCH 1/6] virsh: Print cephx and iscsi usage

2013-08-16 Thread Ján Tomko
On 08/08/2013 02:43 AM, John Ferlan wrote: > When using virsh secret-list - if the secret types are cephx or iscsi, > then allow fetch/print of the usage information. Prior to the change > the following would print: > > UUID Usage > -

Re: [libvirt] [PATCH 2/6] qemu_conf: Fix broken logic for adding passthrough iscsi lun

2013-08-16 Thread Ján Tomko
On 08/08/2013 02:43 AM, John Ferlan wrote: > Following XML would fail : > > > > > > > > > > With the message: > > error: Failed to start domain iscsilun > error: Unable to get device ID 'iqn.2013-07.com.example:iscsi/1': No such > file or directory

Re: [libvirt] virDomainAttachDevice error during disk hotplug

2013-08-16 Thread Daniel P. Berrange
On Fri, Aug 16, 2013 at 06:51:21PM +0530, Deepak C Shetty wrote: > On 08/10/2013 06:20 PM, Deepak C Shetty wrote: > >2013-08-10 11:19:41.772+: 1091: debug : > >qemuMonitorIOProcess:345 : QEMU_MONITOR_IO_PROCESS: > >mon=0x7f92f0007830 buf={"return": "could not open disk image > >/var/run/vdsm/33

Re: [libvirt] virDomainAttachDevice error during disk hotplug

2013-08-16 Thread Daniel P. Berrange
On Sat, Aug 10, 2013 at 05:38:20PM +0530, Deepak C Shetty wrote: > Hi All, > I am trying to do a hotplug of a disk from VDSM (which uses > libvirt to get things done). > I hit the below error "operation failed: open disk image file > failed" comign from virDomainAttachDevice. > 1) The qemu-img

Re: [libvirt] virDomainAttachDevice error during disk hotplug

2013-08-16 Thread Deepak C Shetty
On 08/10/2013 06:20 PM, Deepak C Shetty wrote: 2013-08-10 11:19:41.772+: 1091: debug : qemuMonitorIOProcess:345 : QEMU_MONITOR_IO_PROCESS: mon=0x7f92f0007830 buf={"return": "could not open disk image /var/run/vdsm/017d-1278-4bfb-8129-62bded257399: Invalid argument\r\n", "id": "libvirt-6

Re: [libvirt] [PATCH 0/3] Fix bitmap parsing code and add tests

2013-08-16 Thread Peter Krempa
On 08/16/13 12:39, Daniel P. Berrange wrote: > On Fri, Aug 16, 2013 at 12:32:06PM +0200, Peter Krempa wrote: >> The bitmap parsing code might cause a crash of the application using it. >> Fix it and add tests so that it doesn't happen again. >> >> Peter Krempa (3): >> virbitmap: Refactor virBitma

[libvirt] [PATCH] storage: Update pool metadata after adding/removing/resizing volume

2013-08-16 Thread Osier Yang
RHEL6.5: https://bugzilla.redhat.com/show_bug.cgi?id=965442 One has to refresh the pool to get the correct pool info after adding/removing/resizing a volume, this updates the pool metadata (allocation, available) after those operation are done. v1: https://www.redhat.com/archives/libvir-list/20

Re: [libvirt] [PATCH 3/3] virbitmaptest: Add test for out of bounds condition

2013-08-16 Thread Eric Blake
On 08/16/2013 04:32 AM, Peter Krempa wrote: > Previous patch fixed an issue where when parsing a bitmap from the a s/where/where,/ s/the a/a/ > string the bounds of the bitmap weren't checked. That flaw resulted into s/string/string,/ > crashes. This test tests that case to avoid it in the futu

Re: [libvirt] [PATCH] util: Fix crash of libvirtd when running numatune with invalid nodeset

2013-08-16 Thread Eric Blake
On 08/16/2013 01:47 AM, Alex Jia wrote: > This issue is introduced by commit 0fc8909, the virBitmapIsSet() needs caller > to ensure 'b < bitmap->max_bit', but it's lost in the virBitmapParse() caller, > this will cause crash of libvirtd, with the patch, libvirtd no crash and can > get a expected er

Re: [libvirt] [PATCH 0/3] Fix bitmap parsing code and add tests

2013-08-16 Thread Daniel P. Berrange
On Fri, Aug 16, 2013 at 12:32:06PM +0200, Peter Krempa wrote: > The bitmap parsing code might cause a crash of the application using it. > Fix it and add tests so that it doesn't happen again. > > Peter Krempa (3): > virbitmap: Refactor virBitmapParse to avoid access beyond bounds of > array

Re: [libvirt] [PATCH] maint: slightly reduce configure size

2013-08-16 Thread Daniel P. Berrange
On Thu, Aug 15, 2013 at 03:11:39PM -0600, Eric Blake wrote: > Rather than inlining gl_WARN_ADD loads of time, we can shave about > 17k size off of the configure script by delaying it to a cleanup > shell loop. > > * m4/virt-compile-warnings.m4 (LIBVIRT_COMPILE_WARNINGS): Track a > list of things t

Re: [libvirt] [openstack-dev] [nova] live-snapshot/cloning of virtual machines

2013-08-16 Thread Richard W.M. Jones
On Fri, Aug 16, 2013 at 11:05:19AM +0100, Daniel P. Berrange wrote: > On Wed, Aug 14, 2013 at 04:53:01PM -0700, Vishvananda Ishaya wrote: > > Hi Everyone, > > > > I have been trying for some time to get the code for the live-snapshot > > blueprint[1] > > in. Going through the review process for t

[libvirt] [PATCH 2/3] virbitmaptest: Fix function header formatting

2013-08-16 Thread Peter Krempa
--- tests/virbitmaptest.c | 26 ++ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/tests/virbitmaptest.c b/tests/virbitmaptest.c index 9c7329e..8cfd8b5 100644 --- a/tests/virbitmaptest.c +++ b/tests/virbitmaptest.c @@ -1,4 +1,6 @@ /* + * virbitmaptest.c: Tes

[libvirt] [PATCH 3/3] virbitmaptest: Add test for out of bounds condition

2013-08-16 Thread Peter Krempa
Previous patch fixed an issue where when parsing a bitmap from the a string the bounds of the bitmap weren't checked. That flaw resulted into crashes. This test tests that case to avoid it in the future. --- tests/virbitmaptest.c | 34 ++ 1 file changed, 34 insertio

[libvirt] [PATCH 1/3] virbitmap: Refactor virBitmapParse to avoid access beyond bounds of array

2013-08-16 Thread Peter Krempa
The virBitmapParse function was calling virBitmapIsSet() function that requires the caller to check the bounds of the bitmap without checking them. This resulted into crashes when parsing a bitmap string that was exceeding the bounds used as argument. This patch refactors the function to use virBi

[libvirt] [PATCH 0/3] Fix bitmap parsing code and add tests

2013-08-16 Thread Peter Krempa
The bitmap parsing code might cause a crash of the application using it. Fix it and add tests so that it doesn't happen again. Peter Krempa (3): virbitmap: Refactor virBitmapParse to avoid access beyond bounds of array virbitmaptest: Fix function header formatting virbitmaptest: Add test

Re: [libvirt] [openstack-dev] [nova] live-snapshot/cloning of virtual machines

2013-08-16 Thread Daniel P. Berrange
On Wed, Aug 14, 2013 at 04:53:01PM -0700, Vishvananda Ishaya wrote: > Hi Everyone, > > I have been trying for some time to get the code for the live-snapshot > blueprint[1] > in. Going through the review process for the rpc and interface code[2] was > easy. I > suspect the api-extension code[3]

Re: [libvirt] [PATCH] util: Fix crash of libvirtd when running numatune with invalid nodeset

2013-08-16 Thread Peter Krempa
On 08/16/13 09:47, Alex Jia wrote: > This issue is introduced by commit 0fc8909, the virBitmapIsSet() needs caller > to ensure 'b < bitmap->max_bit', but it's lost in the virBitmapParse() caller, > this will cause crash of libvirtd, with the patch, libvirtd no crash and can > get a expected error "

Re: [libvirt] [test-API][PATCH] Fix the repeating display of testcase name issue when generating log.xml

2013-08-16 Thread hongming
On 08/16/2013 04:04 PM, Guannan Ren wrote: On 08/16/2013 02:36 PM, Hongming Zhang wrote: modified: src/log_generator.py --- src/log_generator.py |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/log_generator.py b/src/log_generator.py index de18654..7685da7 1006

Re: [libvirt] [PATCH] virsh-domain: Fix memleak in cmdCPUBaseline

2013-08-16 Thread Alex Jia
ACK. -- Regards, Alex - Original Message - From: "Peter Krempa" To: libvir-list@redhat.com Cc: "Peter Krempa" Sent: Friday, August 16, 2013 4:38:59 PM Subject: [libvirt] [PATCH] virsh-domain: Fix memleak in cmdCPUBaseline https://bugzilla.redhat.com/show_bug.cgi?id=997765 ==134

[libvirt] [PATCH] virsh-domain: Fix memleak in cmdCPUBaseline

2013-08-16 Thread Peter Krempa
https://bugzilla.redhat.com/show_bug.cgi?id=997765 ==1349431== 8 bytes in 1 blocks are definitely lost in loss record 11 of 760 ==1349431==at 0x4C2A554: calloc (vg_replace_malloc.c:593) ==1349431==by 0x4E9AA3E: virAllocN (in /usr/lib64/libvirt.so.0.1001.1) ==1349431==by 0x4EF28C4: virX

Re: [libvirt] [test-API][PATCH] Fix the repeating display of testcase name issue when generating log.xml

2013-08-16 Thread Guannan Ren
On 08/16/2013 02:36 PM, Hongming Zhang wrote: modified: src/log_generator.py --- src/log_generator.py |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/log_generator.py b/src/log_generator.py index de18654..7685da7 100644 --- a/src/log_generator.py +++ b/src/log_

[libvirt] [PATCH 3/4] tests: add startuppolicy testcases for single harddisk

2013-08-16 Thread Guannan Ren
--- tests/qemustartuppolicytest.c | 4 .../domain-input-disk-absent-policy-mandatory.xml | 27 + .../domain-input-disk-absent-policy-optional.xml | 27 + .../domain-input-disk-present-policy-none.xml | 27 ++

[libvirt] [PATCH 4/4] tests: add startuppolicy testcase for multiple mixed harddisks

2013-08-16 Thread Guannan Ren
--- tests/qemustartuppolicytest.c | 4 +++ ...ixed-multiple-disks-absent-policy-mandatory.xml | 36 ++ ...mixed-multiple-disks-absent-policy-optional.xml | 36 ++ ...input-multiple-disks-absent-policy-optional.xml | 36 +

[libvirt] [PATCH 1/4] tests: add qemustartuppolicy testcase

2013-08-16 Thread Guannan Ren
--- tests/Makefile.am | 10 +- tests/qemustartuppolicytest.c | 218 + .../domain-input-cdrom-present-policy-optional.xml | 28 +++ ...domain-output-cdrom-present-policy-optional.xml | 29 +++ 4 files changed, 283 insertio

[libvirt] tests: add qemu startupPolicy testcase

2013-08-16 Thread Guannan Ren
Add a group of testcase of startupPolicy features for CDROM and Harddisk. It compares the output xml string after checking the presence of disk and applying startupPolicy with expected xml string. New file: tests/qemustartuppolicytest.c TestData: tests/qemustartuppolicytestdata/ Guannan Ren(4)

[libvirt] [PATCH 2/4] tests: add startuppolicy testcases for cdrom

2013-08-16 Thread Guannan Ren
--- tests/qemustartuppolicytest.c | 4 +++ .../domain-input-cdrom-absent-policy-mandatory.xml | 28 + .../domain-input-cdrom-absent-policy-optional.xml | 28 + .../domain-input-cdrom-absent-policy-requisite.xml | 28 +++

[libvirt] [PATCH] util: Fix crash of libvirtd when running numatune with invalid nodeset

2013-08-16 Thread Alex Jia
This issue is introduced by commit 0fc8909, the virBitmapIsSet() needs caller to ensure 'b < bitmap->max_bit', but it's lost in the virBitmapParse() caller, this will cause crash of libvirtd, with the patch, libvirtd no crash and can get a expected error "Failed to parse nodeset". How to reproduce