Re: [libvirt] [test-API][PATCH] Add new cases for testing setSchedulerParametersFlags related API

2013-12-12 Thread Guannan Ren
On 2013年12月12日 16:29, Xuesong Zhang wrote: --- cases/sched_params.conf | 120 +++ repos/domain/sched_params.py | 136 --- repos/domain/sched_params_flag.py | 148 ++ 3 files

Re: [libvirt] [test-API][PATCH] Add new case for listAllVolumes and update releated conf

2013-12-11 Thread Guannan Ren
On 2013年12月12日 10:13, codong wrote: listAllVolumes is a new API in RHEL7, so add a new case for it. And add the case to releated conf to check the volumes list. modified: cases/storage_dir.conf modified: cases/storage_dir_vol_resize_delta.conf modified:

Re: [libvirt] [test-API][PATCH V2] Add blockjob related test functions and cases

2013-11-27 Thread Guannan Ren
On 2013年11月27日 10:56, Jincheng Miao wrote: * repos/domain/blkstatsflags.py * repos/domain/block_iotune.py * repos/domain/block_peek.py * repos/domain/block_resize.py * repos/domain/domain_blkio.py * cases/basic_blockjob.conf V1-V2: Removed diskpath params for

Re: [libvirt] [test-API][PATCH V2] Add blockjob related test functions and cases

2013-11-27 Thread Guannan Ren
On 2013年11月28日 13:25, Guannan Ren wrote: On 2013年11月27日 10:56, Jincheng Miao wrote: * repos/domain/blkstatsflags.py * repos/domain/block_iotune.py * repos/domain/block_peek.py * repos/domain/block_resize.py * repos/domain/domain_blkio.py * cases/basic_blockjob.conf V1-V2

Re: [libvirt] [libvirt-test-API][PATCH] Fix utils.exec_cmd output problem

2013-11-26 Thread Guannan Ren
On 2013年11月26日 17:17, Jincheng Miao wrote: Thanks for review, yes, I missed this situation: stdout is not the subprocess.PIPE. Since the stderr is always subprocess.PIPE, my another way is err after Popen.communicate(). The patch looks like: --- utils/utils.py | 2 ++--- 1 file changed, 2

Re: [libvirt] [libvirt-test-API][PATCH] Fix utils.exec_cmd output problem

2013-11-26 Thread Guannan Ren
On 2013年11月27日 14:11, Jincheng Miao wrote: - Original Message - Why to append standard error to standard output. It is not right in semantics. I think test-api should replace all commands modules with utils.exec_cmd. For commands modules, it merged stderr with stdout: def

Re: [libvirt] [libvirt-test-API][PATCH] Fix utils.exec_cmd output problem

2013-11-25 Thread Guannan Ren
On 2013年11月26日 09:32, Jincheng Miao wrote: ping gren - Original Message - As described before, this patch should be : --- utils/utils.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/utils/utils.py b/utils/utils.py index 147c1ef..ec09c33 100644 ---

Re: [libvirt] [test-API][PATCH] Add blockjob related cases

2013-11-25 Thread Guannan Ren
On 2013年11月26日 11:49, Jincheng Miao wrote: Add: * repos/domain/blkstatsflags.py * repos/domain/block_iotune.py * repos/domain/block_peek.py * repos/domain/block_resize.py * repos/domain/domain_blkio.py * cases/basic_blockjob.conf Modify: replace virsh commands to calling api

Re: [libvirt] [test-API][PATCH] add new patch for testing pinemulator API

2013-11-24 Thread Guannan Ren
On 2013年11月22日 14:08, Xuesong Zhang wrote: --- cases/pinemulator.conf | 46 + repos/domain/pinemulator.py | 84 + 2 files changed, 130 insertions(+) create mode 100755 cases/pinemulator.conf create mode 100755

Re: [libvirt] [PATCH v2 0/6]qemu: add usb-bot scsi controller support

2013-09-17 Thread Guannan Ren
On 09/10/2013 05:26 PM, Guannan Ren wrote: BZ:https://bugzilla.redhat.com/show_bug.cgi?id=917702 v2: After discussion in BZ, qemu guys hope the usb-bot(+usb-uas) can be supported although the absence of its hot-plug feature. In this patch, libvirt gives an unsupported error

[libvirt] [PATCH v2 3/6] qemu: add usb-bot support from disks points of view

2013-09-10 Thread Guannan Ren
usb-bot only supports 16 luns(0~15) and they must be contiguous, (using lun 0 and 2 without 1 doesn't work). In this case qemu doesn't throw an error, we can not find the lun 2 in guests. So Adding a checking function in libvirt to prevent from this case. --- src/conf/domain_conf.c | 59

[libvirt] [PATCH v2 4/6] qemu: refactor out function to build scsi device qemu commandline

2013-09-10 Thread Guannan Ren
--- src/qemu/qemu_command.c | 124 +++- 1 file changed, 48 insertions(+), 76 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 1a6accd..aa91f57 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@

[libvirt] [PATCH v2 2/6] qemu: add usb-bot model scsi controller

2013-09-10 Thread Guannan Ren
usb-bot is SCSI HBA which support only one SCSI target with ID 0. we can create one or more SCSI devices connected to it with -device as its luns. For usb-bot the limit is 15 luns. The difference from other SCSI controllers is that usb-bot needs usb-bus support. That means usb-bot is required to

[libvirt] [PATCH v2 0/6]qemu: add usb-bot scsi controller support

2013-09-10 Thread Guannan Ren
/libvir-list/2013-September/msg00020.html And as the missing of hot-plug feature, the replacement of usb-storage is not a urgent thing. disk attached to usb-storage supports hot-plug/unplug already. Guannan Ren(6) qemu: add usb-bot qemu cap flag qemu: add usb-bot model scsi controller support qemu

[libvirt] [PATCH v2 5/6] qemu: no hot-plug/unplug support currently for usb-bot

2013-09-10 Thread Guannan Ren
--- src/conf/domain_conf.c | 4 +++- src/qemu/qemu_hotplug.c | 14 ++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 7a4969e..60ca298 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -17118,7

[libvirt] [PATCH v2 6/6] tests: add xml2argv test for usb-bot scsi controller

2013-09-10 Thread Guannan Ren
--- .../qemuxml2argv-disk-scsi-usbbot.args | 11 .../qemuxml2argv-disk-scsi-usbbot.xml | 33 ++ tests/qemuxml2argvtest.c | 3 ++ 3 files changed, 47 insertions(+) create mode 100644

[libvirt] [PATCH v2 1/6] qemu: add usb-bot qemu cap flag

2013-09-10 Thread Guannan Ren
QEMU_CAPS_DEVICE_USB_BOT /* -device usb-bot */ --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index d94188a..5cd7d45 100644 --- a/src/qemu/qemu_capabilities.c

[libvirt] [PATCH 4/5] qemu: refactor out function to build scsi device qemu commandline

2013-09-02 Thread Guannan Ren
--- src/qemu/qemu_command.c | 124 +++- 1 file changed, 48 insertions(+), 76 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index f38e98f..e46baaf 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@

[libvirt] [PATCH 0/5]qemu: add usb-bot scsi controller support

2013-09-02 Thread Guannan Ren
. So this is the first part of the whole work. Next step will replace usb-storage with usb-bot when disk in xml uses usb bus like disk ... ... target bus='usb' /disk Guannan Ren(5) qemu: add usb-bot qemu cap flag qemu: add usb-bot model scsi controller support qemu: add usb-bot support

[libvirt] [PATCH 1/5] qemu: add usb-bot qemu cap flag

2013-09-02 Thread Guannan Ren
QEMU_CAPS_DEVICE_USB_BOT /* -device usb-bot */ --- src/qemu/qemu_capabilities.c | 3 +++ src/qemu/qemu_capabilities.h | 1 + 2 files changed, 4 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 7888e2d..6a775ee 100644 --- a/src/qemu/qemu_capabilities.c

[libvirt] [PATCH 5/5] tests: add xml2argv test for usb-bot scsi controller

2013-09-02 Thread Guannan Ren
--- .../qemuxml2argv-disk-scsi-usbbot.args | 10 +++ .../qemuxml2argv-disk-scsi-usbbot.xml | 33 ++ tests/qemuxml2argvtest.c | 3 ++ 3 files changed, 46 insertions(+) create mode 100644

[libvirt] [PATCH 2/5] qemu: add usb-bot model scsi controller support

2013-09-02 Thread Guannan Ren
usb-bot is SCSI HBA which support only one SCSI target with ID 0. we can create one or more SCSI devices connected to it with -device as its luns. For usb-bot the limit is 15 luns. The difference from other SCSI controllers is that usb-bot needs usb-bus support. That means usb-bot is required to

[libvirt] [PATCH 3/5] qemu: add usb-bot support from disks points of view

2013-09-02 Thread Guannan Ren
usb-bot only supports 16 luns(0~15) and they must be contiguous, (using lun 0 and 2 without 1 doesn't work). In this case qemu doesn't throw an error, we can not find the lun 2 in guests. So Adding a checking function in libvirt to prevent from this case. --- src/conf/domain_conf.c | 59

Re: [libvirt] [Qemu-devel] [PATCH 3/5] qemu: add usb-bot support from disks points of view

2013-09-02 Thread Guannan Ren
On 09/02/2013 08:57 PM, Daniel P. Berrange wrote: On Mon, Sep 02, 2013 at 05:38:42PM +0800, Guannan Ren wrote: usb-bot only supports 16 luns(0~15) and they must be contiguous, (using lun 0 and 2 without 1 doesn't work). In this case qemu doesn't throw an error, we can not find the lun 2

[libvirt] [PATCH] virsh: fix return value error of cpu-stats

2013-08-23 Thread Guannan Ren
virsh cpu-stats guest --start 0 --count 3 It outputs right but the return value is 1 rather than 0 echo $? 1 Found by running libvirt-autotest ./run -t libvirt --tests virsh_cpu_stats --- tools/virsh-domain.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git

Re: [libvirt] [PATCH] Test for object identity when checking for None in Python

2013-08-22 Thread Guannan Ren
On 08/22/2013 09:56 PM, Claudio Bley wrote: Consistently use is or is not to compare variables to None, because doing so is preferrable, as per PEP 8 (http://www.python.org/dev/peps/pep-0008/#programming-recommendations): Comparisons to singletons like None should always be done with is or is

[libvirt] [PATCH] util:report diskchain as broken if without enough permission

2013-08-20 Thread Guannan Ren
When backing files of a disk file are stored in NFS shared folder, qemu process requires at least the read permission. But in some rare situation, these backing files can not even be read If so, we should treat the diskchains as broken. This patch add a checking for this, report negative in such

Re: [libvirt] [PATCH] util:report diskchain as broken if without enough permission

2013-08-20 Thread Guannan Ren
On 08/21/2013 03:57 AM, Eric Blake wrote: On 08/20/2013 01:54 AM, Guannan Ren wrote: When backing files of a disk file are stored in NFS shared folder, qemu process requires at least the read permission. But in some rare situation, these backing files can not even be read If so, we should treat

Re: [libvirt] [PATCH v4 2/4] storage: report error rather than warning if backing files doesn't exist

2013-08-19 Thread Guannan Ren
On 07/17/2013 05:41 PM, Daniel P. Berrange wrote: On Wed, Jul 17, 2013 at 10:08:55AM +0800, Guannan Ren wrote: On 07/16/2013 04:40 PM, Daniel P. Berrange wrote: On Tue, Jul 16, 2013 at 08:14:54AM +0200, Martin Kletzander wrote: On 07/15/2013 05:31 PM, Ján Tomko wrote: On 07/02/2013 11:35 AM

[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

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

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 +++

Re: [libvirt] [test-API][PATCH] Add display of cases result to log.xml

2013-08-15 Thread Guannan Ren
On 08/15/2013 02:00 PM, Alex Jia wrote: Hi hongming, BTW, could we ignore module or function name in Test Procedure section, because the module and entry function are the same name, it's a deliberately design, but the Test Procedure looks like a duplicate naming for others. I agree with you.

Re: [libvirt] [test-API][PATCH] Add display of cases result to log.xml

2013-08-15 Thread Guannan Ren
On 08/15/2013 02:31 PM, Alex Jia wrote: Gren, I think it should be enough if we can know which test cases is run, and should hide some details such as checkpoint and clean function. Okay, anyway, we have detailed log to check. without the function name, the UI could become more concise. --

Re: [libvirt] [test-API][PATCH] Add display of cases result to log.xml

2013-08-14 Thread Guannan Ren
On 08/15/2013 01:47 PM, hongming wrote: Hi Guannan You can see the new test report from the following url. http://fileshare.englab.nay.redhat.com/pub/section3/libvirtauto/libvirt-test-API/log.xml Thanks Hongming Hi hongming, Patch looks good, ACK. Next time, please don't send

Re: [libvirt] [test-API][PATCH] Add network update test case

2013-08-11 Thread Guannan Ren
On 08/09/2013 05:28 PM, hongming zhang wrote: The patch add network update test case to cover network update api. modified: cases/basic_network.conf - The test suite covers add/modify/delete ip-dhcp-host in network. For other test scenario, they can be test via customing the conf file. new

Re: [libvirt] [PATCH v6 2/2] qemu: support to drop disk with 'optional' startupPolicy

2013-08-07 Thread Guannan Ren
On 08/06/2013 09:40 PM, Martin Kletzander wrote: On 08/02/2013 08:37 AM, Guannan Ren wrote: Go through disks of guest, if one disk doesn't exist or its backing chain is broken, with 'optional' startupPolicy, for CDROM and Floppy we only discard its source path definition in xml, for disks we

Re: [libvirt] [PATCH v6 2/2] qemu: support to drop disk with 'optional' startupPolicy

2013-08-06 Thread Guannan Ren
On 08/06/2013 09:40 PM, Martin Kletzander wrote: On 08/02/2013 08:37 AM, Guannan Ren wrote: Go through disks of guest, if one disk doesn't exist or its backing chain is broken, with 'optional' startupPolicy, for CDROM and Floppy we only discard its source path definition in xml, for disks we

[libvirt] [PATCH v6 2/2] qemu: support to drop disk with 'optional' startupPolicy

2013-08-02 Thread Guannan Ren
Go through disks of guest, if one disk doesn't exist or its backing chain is broken, with 'optional' startupPolicy, for CDROM and Floppy we only discard its source path definition in xml, for disks we drop it from disk list and free it. --- include/libvirt/libvirt.h.in | 1 +

[libvirt] [PATCH v5 0/2] add startupPolicy support for harddisks

2013-07-31 Thread Guannan Ren
, for disks, if missing, the checking function will drop their definitions, because qemu doesn't allow missing source path for hard disk. migration is not supported yet. Guannan Ren(2) [PATCH v5 1/2] conf: add startupPolicy attribute for harddisk [PATCH v5 2/2] qemu: support to drop disk

[libvirt] [PATCH v5 1/2] conf: add startupPolicy attribute for harddisk

2013-07-31 Thread Guannan Ren
Add startupPolicy attribute policy for harddisk with type file, block and dir. 'requisite' is not supported currently for hardisk. --- docs/formatdomain.html.in | 8 ++-- docs/schemas/domaincommon.rng | 6 ++ src/conf/domain_conf.c| 31 +++ 3

[libvirt] [PATCH v5 2/2] qemu: support to drop disk with 'optional' startupPolicy

2013-07-31 Thread Guannan Ren
Go through disks of guest, if one disk doesn't exist or its backing chain is broken, with 'optional' startupPolicy, for CDROM and Floppy we only discard its source path definition in xml, for disks we drop it from disk list and free it. --- include/libvirt/libvirt.h.in | 1 +

[libvirt] [PATCH v4 3/5] qemu: check presence of each disk and its backing file as well

2013-07-31 Thread Guannan Ren
v3-v4 fix code indentation issue. For disk with startupPolicy support, such as cdrom and floppy when its chain is broken, the startup policy will apply, otherwise, report an error. --- src/qemu/qemu_domain.c | 33 + src/qemu/qemu_process.c | 6 -- 2 files

Re: [libvirt] [PATCH v3 3/3] qemu: check presence of each disk and its backing file as well

2013-07-31 Thread Guannan Ren
On 07/31/2013 04:49 PM, Martin Kletzander wrote: On 07/30/2013 08:26 AM, Guannan Ren wrote: For disk with startupPolicy support, such as cdrom and floppy when its chain is broken, the startup policy will apply, otherwise, report an error. --- src/qemu/qemu_domain.c | 31

Re: [libvirt] [PATCH v3 3/3] qemu: check presence of each disk and its backing file as well

2013-07-31 Thread Guannan Ren
On 07/31/2013 04:49 PM, Martin Kletzander wrote: On 07/30/2013 08:26 AM, Guannan Ren wrote: For disk with startupPolicy support, such as cdrom and floppy when its chain is broken, the startup policy will apply, otherwise, report an error. --- src/qemu/qemu_domain.c | 31

[libvirt] [PATCH v3 3/3] qemu: check presence of each disk and its backing file as well

2013-07-30 Thread Guannan Ren
For disk with startupPolicy support, such as cdrom and floppy when its chain is broken, the startup policy will apply, otherwise, report an error. --- src/qemu/qemu_domain.c | 31 +-- src/qemu/qemu_process.c | 6 -- 2 files changed, 13 insertions(+), 24

Re: [libvirt] [PATCH v2 2/3] qemu: add helper functions for diskchain checking

2013-07-29 Thread Guannan Ren
On 07/29/2013 07:27 PM, Martin Kletzander wrote: On 07/26/2013 02:37 PM, Guannan Ren wrote: *src/util/virstoragefile.c: Add a helper function to get the first name of missing backing files, if the name is NULL, it means the diskchain is not broken. *src/qemu/qemu_domain.c

[libvirt] [PATCH v3 2/3] qemu: add helper functions for diskchain checking

2013-07-29 Thread Guannan Ren
*src/util/virstoragefile.c: Add a helper function to get the first name of missing backing files, if the name is NULL, it means the diskchain is not broken. *src/qemu/qemu_domain.c: qemuDiskChainCheckBroken(disk) to check if its chain is broken --- src/libvirt_private.syms | 1 +

Re: [libvirt] [v2 PATCH] caps: use -device for primary video when qemu =1.6

2013-07-28 Thread Guannan Ren
On 07/27/2013 12:11 AM, Doug Goldstein wrote: On Fri, Jul 26, 2013 at 10:17 AM, Eric Blake ebl...@redhat.com wrote: On 07/26/2013 06:53 AM, Guannan Ren wrote: https://bugzilla.redhat.com/show_bug.cgi?id=981094 The commit 0ad9025ef introduce qemu flag QEMU_CAPS_DEVICE_VIDEO_PRIMARY for using

[libvirt] [PATCH v2 0/3] ensure diskchain is not broken on guest bootup

2013-07-26 Thread Guannan Ren
domain rhel6qcow2 error: invalid argument: Backing file '/var/lib/libvirt/images/thirddisk' of \ image '/var/lib/libvirt/images/thirddisk.snap3' is missing. For storage pool, it still can list volumes out even if their diskchain is broken Guannan Ren(3) qemu: refactor

[libvirt] [PATCH v2 1/3] qemu: refactor qemuDomainCheckDiskPresence for only disk presence check

2013-07-26 Thread Guannan Ren
Refactor this function to make it focus on disk presence checking, including diskchain checking, and not only for CDROM and Floppy. This change is good for the following patches. --- src/qemu/qemu_domain.c | 98 +- 1 file changed, 58 insertions(+),

[libvirt] [PATCH v2 3/3] qemu: check presence of each disk and its backing file as well

2013-07-26 Thread Guannan Ren
For disk with startupPolicy support, such as cdrom and floppy when its chain is broken, the startup policy will apply, otherwise, report an error on chain issue. --- src/qemu/qemu_domain.c | 21 - src/qemu/qemu_process.c | 6 -- 2 files changed, 12 insertions(+), 15

[libvirt] [PATCH v2 2/3] qemu: add helper functions for diskchain checking

2013-07-26 Thread Guannan Ren
*src/util/virstoragefile.c: Add a helper function to get the first name of missing backing files, if the name is NULL, it means the diskchain is not broken. *src/qemu/qemu_domain.c: qemuDiskChainCheckBroken(disk) to check if its chain is broken --- src/libvirt_private.syms | 1 +

Re: [libvirt] [PATCH 2/4] qemu: report error if disk backing files doesn't exist

2013-07-26 Thread Guannan Ren
On 07/25/2013 10:17 PM, Martin Kletzander wrote: On 07/18/2013 01:32 PM, Guannan Ren wrote: s/doesn't/don't/ in $SUBJ Adding virFileAccessibleAs() to check if the backing file described in disk meta exist in real path. If not, report error. The uid and gid arguments don't take effect on F_OK

[libvirt] [v2 PATCH] caps: use -device for primary video when qemu =1.6

2013-07-26 Thread Guannan Ren
https://bugzilla.redhat.com/show_bug.cgi?id=981094 The commit 0ad9025ef introduce qemu flag QEMU_CAPS_DEVICE_VIDEO_PRIMARY for using -device VGA, -device cirrus-vga, -device vmware-svga and -device qxl-vga. In use, for -device qxl-vga, mouse doesn't display in guest window like the desciption in

Re: [libvirt] [PATCH] Don't overwrite errors in qemuTranslateDiskSourcePool

2013-07-24 Thread Guannan Ren
On 07/24/2013 04:43 PM, Ján Tomko wrote: Both virStoragePoolFree and virStorageVolFree reset the last error, which might lead to the cryptic message: An error occurred, but the cause is unknown When the volume wasn't found, virStorageVolFree was called with NULL, leading to an error: invalid

[libvirt] [PATCH] caps: use -device for primary video when qemu =1.6

2013-07-24 Thread Guannan Ren
https://bugzilla.redhat.com/show_bug.cgi?id=981094 The commit 0ad9025ef introduce qemu flag QEMU_CAPS_DEVICE_VIDEO_PRIMARY for using -device VGA, -device cirrus-vga, -device vmware-svga and -device qxl-vga. In use, for -device qxl-vga, mouse doesn't display in guest window like the desciption in

Re: [libvirt] [PATCH] virsh: fix change-media bug on disk block type

2013-07-23 Thread Guannan Ren
On 07/23/2013 12:20 AM, Eric Blake wrote: On 07/22/2013 01:40 AM, Guannan Ren wrote: Resolves:https://bugzilla.redhat.com/show_bug.cgi?id=923053 When cdrom is block type, the virsh change-media failed to insert source info because virsh uses source block='/dev/sdb'/ while the correct name

[libvirt] [PATCH] virsh: fix change-media bug on disk block type

2013-07-22 Thread Guannan Ren
Resolves:https://bugzilla.redhat.com/show_bug.cgi?id=923053 When cdrom is block type, the virsh change-media failed to insert source info because virsh uses source block='/dev/sdb'/ while the correct name of the attribute for block disks is dev. --- tools/virsh-domain.c | 6 -- 1 file

Re: [libvirt] [test-API][PATCH V3] Modify repos/network/network_list.py and add network_list case to conf

2013-07-22 Thread Guannan Ren
On 07/22/2013 03:53 PM, hongming zhang wrote: Modify the old network_list.py. The new network_list.py covers all flags of listAllNetworks and the following api. and add network_list to basic_network.conf. virNetwork: name() isActive() isPersistent() virConnect: listAllNetworks() V1- V2 1.Change

Re: [libvirt] [test-API][PATCH V2] Modify repos/network/network_list.py and add network_list case to conf

2013-07-21 Thread Guannan Ren
On 07/17/2013 04:46 PM, hongming zhang wrote: Modify the old network_list.py. The new network_list.py covers all flags of listAllNetworks and the following api. and add network_list to basic_network.conf. virNetwork: name() bridgeName() isActive() isPersistent() virConnect: listAllNetworks()

[libvirt] [PATCH 1/4] qemu: refactor qemuDomainCheckDiskPresence for only disk presence check

2013-07-18 Thread Guannan Ren
Refactor this function to make it focus on disk presence checking, including diskchain checking, and not only for CDROM and Floppy. This change is good for the following patches. --- src/qemu/qemu_domain.c | 99 ++ 1 file changed, 59 insertions(+),

[libvirt] [PATCH 3/4] qemu: check presence of each disk in chain

2013-07-18 Thread Guannan Ren
For disk with startupPolicy support, such as cdrom and floppy when its chain is broken, the startup policy will apply, otherwise, report error on chain issue. Force to collect diskchain metadata when qemu process start everytime. --- src/qemu/qemu_domain.c | 19 ++-

[libvirt] [PATCH 0/4] fix two issues about diskchain

2013-07-18 Thread Guannan Ren
1, Report an backing missing error on guest boot if its disks have broken backing file chain 2, List volume even if its diskchain is broken Guannan Ren(4) [PATCH 1/4] qemu: refactor qemuDomainCheckDiskPresence for only disk [PATCH 2/4] qemu: report error if disk backing files doesn't exist

[libvirt] [PATCH 2/4] qemu: report error if disk backing files doesn't exist

2013-07-18 Thread Guannan Ren
Adding virFileAccessibleAs() to check if the backing file described in disk meta exist in real path. If not, report error. The uid and gid arguments don't take effect on F_OK mode for access, so use gid and gid of current process. --- src/util/virstoragefile.c | 23 +++

[libvirt] [PATCH 4/4] storage: list volumes even if its diskchain is broken

2013-07-18 Thread Guannan Ren
--- src/storage/storage_backend_fs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c index d305b06..c6c019d 100644 --- a/src/storage/storage_backend_fs.c +++ b/src/storage/storage_backend_fs.c @@ -94,7

[libvirt] [v3 PATCH] storage: skip async-deleted volume while fs storage is being refreshed

2013-07-16 Thread Guannan Ren
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=977706 v1, v2 by Ján Tomko https://www.redhat.com/archives/libvir-list/2013-July/msg00639.html To get volume file fd in the fist place. The purpose of doing so is to ensure the async deletion of volume doesn't make impact on the following

Re: [libvirt] [PATCH] cgroup: Free line even if no characters were read

2013-07-16 Thread Guannan Ren
On 07/16/2013 08:14 PM, Ján Tomko wrote: Even if getline doesn't read any characters it allocates a buffer. ==404== 120 bytes in 1 blocks are definitely lost in loss record 1,344 of 1,671 ==404==at 0x4C2C71B: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==404==by

Re: [libvirt] [PATCH v4 2/4] storage: report error rather than warning if backing files doesn't exist

2013-07-16 Thread Guannan Ren
On 07/16/2013 04:40 PM, Daniel P. Berrange wrote: On Tue, Jul 16, 2013 at 08:14:54AM +0200, Martin Kletzander wrote: On 07/15/2013 05:31 PM, Ján Tomko wrote: On 07/02/2013 11:35 AM, Guannan Ren wrote: If one of backing files for disk source doesn't exist, the guest will not be able to find

Re: [libvirt] [test-API][PATCH] Modify repos/network/network_list.py and add network_list case to conf

2013-07-16 Thread Guannan Ren
On 07/16/2013 05:38 PM, hongming zhang wrote: Modify the old network_list.py. The new network_list.py covers all flags of listAllNetworks and the following api. and add network_list to basic_network.conf. virNetwork: name() bridgeName() isActive() isPersistent() virConnect: listAllNetworks() ---

Re: [libvirt] [PATCH v4 2/4] storage: report error rather than warning if backing files doesn't exist

2013-07-16 Thread Guannan Ren
On 07/15/2013 11:31 PM, Ján Tomko wrote: On 07/02/2013 11:35 AM, Guannan Ren wrote: If one of backing files for disk source doesn't exist, the guest will not be able to find and use the disk even though the disk still exists in guest xml definition. So reporting an error make more sense

Re: [libvirt] [PATCH] python: return dictionay without value in case of no blockjob

2013-07-15 Thread Guannan Ren
On 07/13/2013 01:36 AM, Michal Privoznik wrote: On 17.05.2013 08:30, Guannan Ren wrote: s/dictionay/dictionary/ in $SUBJ Currently, when there is no blockjob, dom.blockJobInfo('vda') still reports error because it didn't distinguish return value 0 from -1. s/didn't/doesn't

Re: [libvirt] [PATCH v4 0/4] Add startupPolicy attribute support for hard disks

2013-07-15 Thread Guannan Ren
On 07/02/2013 05:35 PM, Guannan Ren wrote: v3: https://www.redhat.com/archives/libvir-list/2013-June/thread.html v3 to v4: Rebase v2 to v3: Not only check disk source, startupPolicy should work if any backing file is missing. The commit 039a3283 break the limition

Re: [libvirt] [PATCH v4 1/4] conf: add startupPolicy attribute for harddisk

2013-07-15 Thread Guannan Ren
On 07/15/2013 09:31 PM, Martin Kletzander wrote: On 07/02/2013 11:35 AM, Guannan Ren wrote: Add startupPolicy attribute policy for harddisk with type file, block and dir. The network type disk is still not supported. --- docs/schemas/domaincommon.rng | 6 ++ src/conf/domain_conf.c

Re: [libvirt] [PATCH v4 2/4] storage: report error rather than warning if backing files doesn't exist

2013-07-15 Thread Guannan Ren
On 07/15/2013 09:31 PM, Martin Kletzander wrote: s/doesn't/don't/ in $SUBJ On 07/02/2013 11:35 AM, Guannan Ren wrote: If one of backing files for disk source doesn't exist, the guest will not be able to find and use the disk even though the disk still exists in guest xml definition. So

Re: [libvirt] [PATCH 16/32] Convert 'int i' to 'size_t i' in src/qemu files

2013-07-10 Thread Guannan Ren
On 07/08/2013 10:21 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Convert the type of loop iterators named 'i', 'j', k', 'ii', 'jj', 'kk', to be 'size_t' instead of 'int' or 'unsigned int', also santizing 'ii', 'jj', 'kk' to use the normal 'i', 'j', 'k' naming

Re: [libvirt] [PATCH 20/32] Convert 'int i' to 'size_t i' in src/nwfilter/ files

2013-07-10 Thread Guannan Ren
On 07/08/2013 10:21 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Convert the type of loop iterators named 'i', 'j', k', 'ii', 'jj', 'kk', to be 'size_t' instead of 'int' or 'unsigned int', also santizing 'ii', 'jj', 'kk' to use the normal 'i', 'j', 'k' naming

Re: [libvirt] [PATCH 21/32] Convert 'int i' to 'size_t i' in src/node_device/ files

2013-07-10 Thread Guannan Ren
On 07/08/2013 10:21 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Convert the type of loop iterators named 'i', 'j', k', 'ii', 'jj', 'kk', to be 'size_t' instead of 'int' or 'unsigned int', also santizing 'ii', 'jj', 'kk' to use the normal 'i', 'j', 'k' naming

Re: [libvirt] [PATCH 25/32] Convert 'int i' to 'size_t i' in src/network/ files

2013-07-10 Thread Guannan Ren
On 07/08/2013 10:21 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Convert the type of loop iterators named 'i', 'j', k', 'ii', 'jj', 'kk', to be 'size_t' instead of 'int' or 'unsigned int', also santizing 'ii', 'jj', 'kk' to use the normal 'i', 'j', 'k' naming

Re: [libvirt] [PATCH 30/32] Convert 'int i' to 'size_t i' in python/ files

2013-07-10 Thread Guannan Ren
On 07/08/2013 10:21 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Convert the type of loop iterators named 'i', 'j', k', 'ii', 'jj', 'kk', to be 'size_t' instead of 'int' or 'unsigned int', also santizing 'ii', 'jj', 'kk' to use the normal 'i', 'j', 'k' naming

Re: [libvirt] [PATCH 02/32] Convert 'int i' to 'size_t i' in src/conf/ files

2013-07-09 Thread Guannan Ren
On 07/08/2013 10:21 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Convert the type of loop iterators named 'i', 'j', k', 'ii', 'jj', 'kk', to be 'size_t' instead of 'int' or 'unsigned int', also santizing 'ii', 'jj', 'kk' to use the normal 'i', 'j', 'k' naming

Re: [libvirt] [PATCH 03/32] Convert 'int i' to 'size_t i' in src/util/ files

2013-07-09 Thread Guannan Ren
On 07/08/2013 10:21 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Convert the type of loop iterators named 'i', 'j', k', 'ii', 'jj', 'kk', to be 'size_t' instead of 'int' or 'unsigned int', also santizing 'ii', 'jj', 'kk' to use the normal 'i', 'j', 'k' naming

Re: [libvirt] [PATCH 05/32] Convert 'int i' to 'size_t i' in tools/ files

2013-07-09 Thread Guannan Ren
On 07/08/2013 10:21 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Convert the type of loop iterators named 'i', 'j', k', 'ii', 'jj', 'kk', to be 'size_t' instead of 'int' or 'unsigned int', also santizing 'ii', 'jj', 'kk' to use the normal 'i', 'j', 'k' naming

Re: [libvirt] [PATCH 06/32] Convert 'int i' to 'size_t i' in src/{xen, xenapi, xenxs} files

2013-07-09 Thread Guannan Ren
On 07/08/2013 10:21 PM, Daniel P. Berrange wrote: From: Daniel P. Berrangeberra...@redhat.com Convert the type of loop iterators named 'i', 'j', k', 'ii', 'jj', 'kk', to be 'size_t' instead of 'int' or 'unsigned int', also santizing 'ii', 'jj', 'kk' to use the normal 'i', 'j', 'k' naming

Re: [libvirt] [PATCH 08/32] Convert 'int i' to 'size_t i' in src/storage/ files

2013-07-09 Thread Guannan Ren
On 07/08/2013 10:21 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Convert the type of loop iterators named 'i', 'j', k', 'ii', 'jj', 'kk', to be 'size_t' instead of 'int' or 'unsigned int', also santizing 'ii', 'jj', 'kk' to use the normal 'i', 'j', 'k' naming

Re: [libvirt] [PATCH 09/32] Convert 'int i' to 'size_t i' in src/vbox/ files

2013-07-09 Thread Guannan Ren
On 07/08/2013 10:21 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Convert the type of loop iterators named 'i', 'j', k', 'ii', 'jj', 'kk', to be 'size_t' instead of 'int' or 'unsigned int', also santizing 'ii', 'jj', 'kk' to use the normal 'i', 'j', 'k' naming

Re: [libvirt] [PATCH 11/32] Convert 'int i' to 'size_t i' in src/test/ files

2013-07-09 Thread Guannan Ren
On 07/08/2013 10:21 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Convert the type of loop iterators named 'i', 'j', k', 'ii', 'jj', 'kk', to be 'size_t' instead of 'int' or 'unsigned int', also santizing 'ii', 'jj', 'kk' to use the normal 'i', 'j', 'k' naming

[libvirt] [PATCH v4 1/4] conf: add startupPolicy attribute for harddisk

2013-07-02 Thread Guannan Ren
Add startupPolicy attribute policy for harddisk with type file, block and dir. The network type disk is still not supported. --- docs/schemas/domaincommon.rng | 6 ++ src/conf/domain_conf.c| 20 +--- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git

[libvirt] [PATCH v4 0/4] Add startupPolicy attribute support for hard disks

2013-07-02 Thread Guannan Ren
levels as originally documented. For the 'optional' policy, there is a little difference from CDROM and Floppy which only drop its source path, for disks, if missing, the checking function will drop their definitions, because qemu doesn't allow missing source path for hard disk. Guannan Ren [PATCH

[libvirt] [PATCH v4 2/4] storage: report error rather than warning if backing files doesn't exist

2013-07-02 Thread Guannan Ren
If one of backing files for disk source doesn't exist, the guest will not be able to find and use the disk even though the disk still exists in guest xml definition. So reporting an error make more sense. Adding virFileAccessibleAs() to check if the backing file described in disk meta exist in

[libvirt] [PATCH v4 4/4] security: restore DAC for every disk file in disk chain

2013-07-02 Thread Guannan Ren
--- src/security/security_dac.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/security/security_dac.c b/src/security/security_dac.c index 0d6defc..577db8e 100644 --- a/src/security/security_dac.c +++ b/src/security/security_dac.c @@ -335,6 +335,16 @@ err:

[libvirt] [PATCH v4 3/4] qemu: drop disk with 'optional' startupPolicy if it is not present

2013-07-02 Thread Guannan Ren
Go through disks of guest, if one disk doesn't exist or its backing chain is broken, with 'optional' startupPolicy, for CDROM and Floppy we only discard its source path definition in xml, for disks we drop it from disk list and free it. Originally, for these disks without startupPolicy attribute,

Re: [libvirt] [PATCH] Crash of libvirtd by unprivileged user in virConnectListAllInterfaces

2013-07-02 Thread Guannan Ren
' object when any of the filtering flags cause an interface to be skipped over. For example when running the command 'virsh iface-list --inactive' This is a regression introduced in release 1.0.6 by commit 7ac2c4fe624f30f2c8270116513fa2ddab07631f Author: Guannan Ren g...@redhat.com Date: Tue

[libvirt] [PATCH v2 1/5] snapshot: define new API virDomainSnapshotDeleteByName

2013-07-01 Thread Guannan Ren
This is to delete a snapshot object atomically, the API accepts argments: domain object, snapshot name and flags. When name is NULL, the current snapshot object will be deleted include/libvirt/libvirt.h.in: Declare virDomainSnapshotDeleteByName src/driver.h: (virDrvDomainSnapshotDeleteByName)

[libvirt] [PATCH v2 2/5] snapshot: auto generate RPC calls for remoteDomainSnapshotDeleteByName

2013-07-01 Thread Guannan Ren
Let gendispatch.pl generate codes for both server side and client side. *src/remote/remote_driver.c: Add remoteDomainSnapshotDeleteByName into remote driver *src/remote/remote_protocol.x: New RPC procedure REMOTE_PROC_DOMAIN_SNAPSHOT_DELETE_BY_NAME and its argument structs

[libvirt] [PATCH v2 5/5] virsh: use virDomainSnapshotDeleteByName in cmdSnapshotDelete

2013-07-01 Thread Guannan Ren
--- tools/virsh-snapshot.c | 65 ++ 1 file changed, 55 insertions(+), 10 deletions(-) diff --git a/tools/virsh-snapshot.c b/tools/virsh-snapshot.c index 7e75772..15bdcd7 100644 --- a/tools/virsh-snapshot.c +++ b/tools/virsh-snapshot.c @@ -1966,37

[libvirt] [PATCH v2 0/5]Atomic API to delete snapshot object

2013-07-01 Thread Guannan Ren
virDomainSnapshotDeleteByName(virDomainPtr domain, const char *name, unsigned int flags); The existing virDomainSnapshotDelete API accepts the snapshot object being deleted as an argument that would be not API atomic. Guannan Ren(5) [PATCH v2 1/5

  1   2   3   4   5   6   7   8   9   >