[libvirt] [PATCH] virsh: Fix vcpupin command output wrong vcpu pinning info

2018-12-18 Thread Luyao Huang
Commit 3072ded3 changed the waya to format the vcpu pinning info and forget to get cpumap for each vcpu during the loop, that cause vcpupin command will display vcpu 0 info for other vcpus. Signed-off-by: Luyao Huang --- tools/virsh-domain.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion

[libvirt] [PATCH] qemu: domain: validate memory access during validate domain config

2018-08-20 Thread Luyao Huang
the memory access related check in the domain config validate function, and simplify the unit test xml to avoid other error. https://bugzilla.redhat.com/show_bug.cgi?id=1448149#c14 Signed-off-by: Luyao Huang --- src/qemu/qemu_domain.c | 55 +++--- tests

Re: [libvirt] [PATCH] conf: initialize character pointer xml value to avoid random crash

2018-07-05 Thread Luyao Huang
Thanks for your quick review ! :) Have a nice day ! Luyao - Original Message - From: "Michal Prívozník" To: "Luyao Huang" , libvir-list@redhat.com Sent: Thursday, July 5, 2018 5:11:41 PM Subject: Re: [libvirt] [PATCH] conf: initialize character pointer xml value to

Re: [libvirt] [PATCH] conf: initialize character pointer xml value to avoid random crash

2018-07-04 Thread Luyao Huang
What !! This can not be true :D Okay, looks like that github offline in a short time. BTW, CC libvirt-ci@ maybe better than libvirt-list@ (does this mail-list ever exist ?) BR, Luyao - Original Message - From: no-re...@patchew.org To: f...@redhat.com, lhu...@redhat.com Cc:

[libvirt] [PATCH] conf: initialize character pointer xml value to avoid random crash

2018-07-04 Thread Luyao Huang
rom /lib64/libc.so.6 Signed-off-by: Luyao Huang --- src/conf/domain_nwfilter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/domain_nwfilter.c b/src/conf/domain_nwfilter.c index 948b324..24b5f42 100644 --- a/src/conf/domain_nwfilter.c +++ b/src/conf/domain_nwfilter.

Re: [libvirt] [PATCH 0/3] some small fix for guest SEV related code

2018-06-20 Thread Luyao Huang
Thanks for your quick review ! BR, Luyao - Original Message - From: "Erik Skultety" To: "Luyao Huang" Cc: libvir-list@redhat.com Sent: Wednesday, June 20, 2018 7:23:26 PM Subject: Re: [libvirt] [PATCH 0/3] some small fix for guest SEV related code On Wed, Jun 20

[libvirt] [PATCH 2/3] qemu: improve the debug message when preparing SEV guest

2018-06-20 Thread Luyao Huang
Use 'preparing' instead of 'prepare' like other place in qemu_process.c. Signed-off-by: Luyao Huang --- src/qemu/qemu_process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 631254d..2967568 100644 --- a/src/qemu

[libvirt] [PATCH 3/3] docs: remove extra space in the SEV xml element example

2018-06-20 Thread Luyao Huang
Signed-off-by: Luyao Huang --- docs/formatdomain.html.in | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 7e710d7..89672a0 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -8481,11

[libvirt] [PATCH 1/3] qemu: correct the ret value

2018-06-20 Thread Luyao Huang
Set the return value to 0 when everything work as expected Signed-off-by: Luyao Huang --- src/qemu/qemu_process.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 93fd6ba..631254d 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu

[libvirt] [PATCH 0/3] some small fix for guest SEV related code

2018-06-20 Thread Luyao Huang
*** BLURB HERE *** Luyao Huang (3): qemu: correct the ret value qemu: improve the debug message when preparing SEV guest docs: remove extra space in the SEV xml element example docs/formatdomain.html.in | 10 +- src/qemu/qemu_process.c | 3 ++- 2 files changed, 7 insertions

Re: [libvirt] [PATCH] Add 2 systemtap script in EXTRA_DIST

2016-10-10 Thread Luyao Huang
Nice idea! Thanks for your help and review. Have a nice day! Luyao - Original Message - From: "Michal Privoznik" <mpriv...@redhat.com> To: "Luyao Huang" <lhu...@redhat.com>, libvir-list@redhat.com Sent: Monday, October 10, 2016 3:02:58 PM Subject: Re: [

[libvirt] [PATCH] Add 2 systemtap script in EXTRA_DIST

2016-10-09 Thread Luyao Huang
Then we will include these 2 useful script in VPATH build. Signed-off-by: Luyao Huang <lhu...@redhat.com> --- examples/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/Makefile.am b/examples/Makefile.am index bd8460d..ca6e039 100644 --- a/examples/Makefile.am

Re: [libvirt] [PATCH 0/9] Couple of vhost-user fixes and cleanups

2016-08-16 Thread Luyao Huang
Hi Michal, I remember i have used vhost-user-bridge to test vhost-user before. And you can find it in qemu source code tests/vhost-user-bridge.c, but i am not sure if you can avoid this crash with vhost-user-bridge :) BR, Luyao - Original Message - From: "Michal Privoznik"

[libvirt] [PATCH] tests: add missed directories in EXTRA_DIST

2016-07-12 Thread Luyao Huang
In commit ec5dcf2a and b0b4a35c, we have moved some xml to new directories, but forget fix the Makefile. Add 2 directories in EXTRA_DIST to fix broken vpath build. Signed-off-by: Luyao Huang <lhu...@redhat.com> --- tests/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a

[libvirt] [PATCH] virsh: fix cpu-stats command output format issue

2016-01-25 Thread Luyao Huang
14378.732785511 seconds https://bugzilla.redhat.com/show_bug.cgi?id=1301807 Signed-off-by: Luyao Huang <lhu...@redhat.com> --- tools/virsh-domain.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 1089a4d..c2146d2 100644 --- a/tools/virsh-do

[libvirt] somtimes libvirtd crashed when fail to start a guest, need help to debug

2015-12-08 Thread Luyao Huang
Dear list, I met a problem when test with the latest libvirt (build from current master branch), i found sometimes libvirtd crashed when guest fail to start. the reproduce way is very easy, but hard to meet: # cat /root/shdo2.sh #!/bin/sh while : do virsh start rhel7.0-rhel done # sh

[libvirt] [PATCHv2 0/4] Implement shared memory device (cold) hot-plug/unplug

2015-11-26 Thread Luyao Huang
v1: https://www.redhat.com/archives/libvir-list/2015-June/msg00830.html These patches implement the hot-plug/hot-unplug and cold-plug/cold-unplug for Inter-VM Shared Memory PCI device. Luyao Huang (4): conf: Add helpers to insert/remove/find shmem devices in domain def qemu: Implement shared

[libvirt] [PATCHv2 1/4] conf: Add helpers to insert/remove/find shmem devices in domain def

2015-11-26 Thread Luyao Huang
The helpers will be useful when implementing hotplug and coldplug of shared memory devices. Signed-off-by: Luyao Huang <lhu...@redhat.com> --- src/conf/domain_conf.c | 66 src/conf/domain_conf.h | 7 + src/libvirt_private.syms | 3

[libvirt] [PATCHv2 2/4] qemu: Implement shared memory device cold (un)plug

2015-11-26 Thread Luyao Huang
Add support for using the attach/detach device APIs on the inactive configuration to add/del shared memory devices. Signed-off-by: Luyao Huang <lhu...@redhat.com> --- src/libvirt_private.syms | 1 + src/qemu/qemu_driver.c | 21 +++-- 2 files changed, 20 insertions

[libvirt] [PATCHv2 4/4] qemu: Implement shared memory device hot-unplug

2015-11-26 Thread Luyao Huang
Signed-off-by: Luyao Huang <lhu...@redhat.com> --- src/qemu/qemu_driver.c | 4 ++- src/qemu/qemu_hotplug.c | 94 - src/qemu/qemu_hotplug.h | 3 ++ 3 files changed, 99 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_driver.c b/sr

[libvirt] [PATCHv2 3/4] qemu: Implement share memory device hot-plug

2015-11-26 Thread Luyao Huang
Signed-off-by: Luyao Huang <lhu...@redhat.com> --- src/qemu/qemu_driver.c | 10 - src/qemu/qemu_hotplug.c | 58 + src/qemu/qemu_hotplug.h | 3 +++ 3 files changed, 70 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c

Re: [libvirt] [libvirt-test-api][PATCH 0/2]Fix issues in the method of getting vcpu thread id of vcpupin_live and cpu_affinity

2015-10-29 Thread Luyao Huang
ACK to all of them BR, Luyao - Original Message - From: "Hongming Zhang" To: libvir-list@redhat.com Sent: Thursday, October 29, 2015 3:19:29 PM Subject: [libvirt] [libvirt-test-api][PATCH 0/2]Fix issues in the method of getting vcpu thread id of vcpupin_live

[libvirt] [PATCH] util: set error if DAD is not finished

2015-10-29 Thread Luyao Huang
If DAD not finished in 5 seconds, user will get an unknown error like this: # virsh net-start ipv6 error: Failed to start network ipv6 error: An error occurred, but the cause is unknown Call virReportError to set an error. Signed-off-by: Luyao Huang <lhu...@redhat.com> --- I found t

[libvirt] [PATCH] util: remove unnecessary code to avoid error overwrite

2015-10-28 Thread Luyao Huang
virCgroupRemove use VIR_ERROR to log the error and won't change the virLastErr in the thread, so no need do this. Signed-off-by: Luyao Huang <lhu...@redhat.com> --- src/util/vircgroup.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/src/util/vircgroup.c b/src/util/vircg

[libvirt] [PATCH] qemu: fix migration flags undefinesource cannot work

2015-10-27 Thread Luyao Huang
In commit f41be296, we moved vm->persistent check into qemuDomainRemoveInactive, but we didn't change the vm->persistent before call qemuDomainRemoveInactive in some place before and just call it to remove the inactive vm. Signed-off-by: Luyao Huang <lhu...@redhat.com> -

[libvirt] [PATCH] libvirt-domain: fix no error report when p2p migrate fail

2015-10-27 Thread Luyao Huang
After commit a26669d7, we only jump to error when virDomainMigrateUnmanagedParams return a value less than -1. this will make the migrate result always be success even we meet some problem. Signed-off-by: Luyao Huang <lhu...@redhat.com> --- src/libvirt-domain.c | 2 +- 1 file chan

[libvirt] [PATCH] libvirt-domain: fix the error reporting when use the localhost as target uri

2015-10-27 Thread Luyao Huang
Remove the extra %s in error message when call virReportInvalidArg(). Signed-off-by: Luyao Huang <lhu...@redhat.com> --- src/libvirt-domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 14aeb09..de7eb04 100644 ---

[libvirt] [PATCHv2] virsh: fix no error when pass a count <= 0 to setvcpus

2015-10-21 Thread Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1248277 When count <= 0, the client exit without set an error. Signed-off-by: Luyao Huang <lhu...@redhat.com> --- v2: - use vshCommandOptUInt to forbid negative number, and check if count is zero. (thanks Peter and Andrea) tools/virsh-dom

[libvirt] [PATCH] conf: Add serial target type to ABI stability check

2015-10-21 Thread Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1273686 There is no ABI check for serial target type attribute, just add it. Signed-off-by: Luyao Huang <lhu...@redhat.com> --- src/conf/domain_conf.c | 8 1 file changed, 8 insertions(+) diff --git a/src/conf/domain_conf.c b/sr

[libvirt] [PATCHv2 0/3] improve the error report for virNodeAllocPages and virNodeGetFreePages

2015-10-20 Thread Luyao Huang
v1: https://www.redhat.com/archives/libvir-list/2015-September/msg01054.html v2: -improve the error message -improve the code struct -add a new patch for rework the exist way to check node and page size Luyao Huang (3): util: split the virNumaGetHugePageInfoPath into separate function util

[libvirt] [PATCH 2/3] util: move the pagesize and node check and error report to one place

2015-10-20 Thread Luyao Huang
--pagesize 2047 --pagecount 1 error: operation failed: page size 2047 is not available Signed-off-by: Luyao Huang <lhu...@redhat.com> --- src/util/virnuma.c | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/src/util/virnuma.c b/src/util/virnuma.c

[libvirt] [PATCHv2 1/3] util: split the virNumaGetHugePageInfoPath into separate function

2015-10-20 Thread Luyao Huang
the virNumaGetHugePageInfoPath will build the directory of system path, but we don't want that. Introduce a new helper to build the dir path could avoid this issue. Signed-off-by: Luyao Huang <lhu...@redhat.com> --- src/util/virnuma.c | 51 +++

[libvirt] [PATCHv2 3/3] util: Produce friendlier error message to user

2015-10-20 Thread Luyao Huang
/node0/hugepages/hugepages-1kB/free_hugepages':No such file or directory Add two checks to catch this and therefore produce much more friendlier error messages. Signed-off-by: Luyao Huang <lhu...@redhat.com> --- src/util/virnuma.c | 38 ++ 1 file chang

[libvirt] [PATCH] conf: fix set the wrong fromconfig when specify addr in config

2015-10-19 Thread Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1238338#c6 If the user already specify address in xml, we will set the wrong $fromConfig, which will make libvirt output a wrong error message and make hot-plug fail when hot-plug a pci device (see commit 1e15be1 and 9a12b6c). Signed-off-by: Luyao

[libvirt] [PATCH] qemu: fix wrong nodeset info when numatune placement is auto

2015-10-12 Thread Luyao Huang
-by: Luyao Huang <lhu...@redhat.com> --- src/qemu/qemu_driver.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 8cd5ee3..8ca55dd 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -10177,6 +1

[libvirt] [PATCH 2/2] util: Produce friendlier error message to user

2015-09-29 Thread Luyao Huang
/hugepages/hugepages-1kB/free_hugepages': No such file or directory Add two checks to catch this and therefore produce much more friendlier error messages. Signed-off-by: Luyao Huang <lhu...@redhat.com> --- src/util/virnuma.c | 12 1 file changed, 12 insertions(+) diff --git

[libvirt] [PATCH 0/2] improve the error in 2 function

2015-09-29 Thread Luyao Huang
*** BLURB HERE *** Luyao Huang (2): util: split the virNumaGetHugePageInfoPath into separate function util: Produce friendlier error message to user src/util/virnuma.c | 54 ++ 1 file changed, 30 insertions(+), 24 deletions(-) -- 1.8.3.1

[libvirt] [PATCH 1/2] util: split the virNumaGetHugePageInfoPath into separate function

2015-09-29 Thread Luyao Huang
the virNumaGetHugePageInfoPath will build the directory of system path, but we don't want that. Introduce a new helper to build the dir path could avoid this issue. Signed-off-by: Luyao Huang <lhu...@redhat.com> --- src/util/virnuma.c | 42 ++ 1 file chang

[libvirt] [PATCH] Makefile: fix build fail when make rpm

2015-09-22 Thread Luyao Huang
Build fail and error like this: CC qemu/libvirt_driver_qemu_impl_la-qemu_command.lo qemu/qemu_capabilities.c:46:27: fatal error: qemu_capspriv.h: No such file or directory #include "qemu_capspriv.h" Add qemu_capspriv.h to source. Signed-off-by: Luyao Huang <lhu...@redhat.

[libvirt] [PATCH] conf: escape string for disk driver name attribute

2015-09-22 Thread Luyao Huang
Just like e92e5ba1, this attribute was missed. Signed-off-by: Luyao Huang <lhu...@redhat.com> --- src/conf/domain_conf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index a3b3ccb..85c2d0d 100644 --- a/sr

[libvirt] [libvirt-test-api][PATCH] Add a new test case for setUserPassword

2015-09-21 Thread Luyao Huang
Signed-off-by: Luyao Huang <lhu...@redhat.com> --- cases/linux_domain.conf | 22 repos/domain/set_user_passwd.py | 111 2 files changed, 133 insertions(+) create mode 100644 repos/domain/set_user_passwd.py diff --git a

[libvirt] [PATCH] Add a new test case for setUserPassword

2015-09-21 Thread Luyao Huang
Signed-off-by: Luyao Huang <lhu...@redhat.com> --- cases/linux_domain.conf | 22 repos/domain/set_user_passwd.py | 111 2 files changed, 133 insertions(+) create mode 100644 repos/domain/set_user_passwd.py diff --git a

Re: [libvirt] [PATCH] Add a new test case for setUserPassword

2015-09-21 Thread Luyao Huang
Please ignore this one, i have forgot set the header. - Original Message - From: "Luyao Huang" <lhu...@redhat.com> To: libvir-list@redhat.com Cc: "Luyao Huang" <lhu...@redhat.com> Sent: Monday, September 21, 2015 3:27:02 PM Subject: [libv

[libvirt] [libvirt-test-api][PATCHv2] Add new test case for allocPages API

2015-09-21 Thread Luyao Huang
Signed-off-by: Luyao Huang <lhu...@redhat.com> --- cases/test_connection.conf | 10 repos/virconn/connection_allocPages.py | 84 ++ 2 files changed, 94 insertions(+) create mode 100644 repos/virconn/connection_allocPages.py diff --git a

[libvirt] [libvirt-test-api][PATCH 1/2] introduce a new helper to parse mountinfo

2015-09-13 Thread Luyao Huang
And will return list like this : [{'devminor': '25', 'mountdir': '/sys/fs/cgroup/cpuset', 'devmajor': '0', 'mounttype': 'cgroup'},...] Signed-off-by: Luyao Huang <lhu...@redhat.com> --- utils/utils.py | 37 + 1 file changed, 37 insertions(+) diff

[libvirt] [libvirt-test-api][PATCH 2/2] Add a new test case for fsinfo API

2015-09-13 Thread Luyao Huang
Signed-off-by: Luyao Huang <lhu...@redhat.com> --- cases/linux_domain.conf | 10 + repos/domain/fsinfo.py | 103 2 files changed, 113 insertions(+) create mode 100644 repos/domain/fsinfo.py diff --git a/cases/linux_domain.conf b

[libvirt] [PATCH] conf: fix crash when parse a disordered numa settings

2015-09-07 Thread Luyao Huang
-by: Luyao Huang <lhu...@redhat.com> --- src/conf/numa_conf.c | 10 +--- .../qemuxml2argv-cpu-numa-disordered.xml | 26 +++ .../qemuxml2xmlout-cpu-numa-disordered.xml | 29 ++ tests/qemuxml2xml

[libvirt] [libvirt-python][PATCH] generator: fix build fail with old xml lib

2015-09-01 Thread Luyao Huang
will get error. Let's use 'YYY in XXX.keys()' to avoid this issue. Signed-off-by: Luyao Huang <lhu...@redhat.com> --- generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator.py b/generator.py index 2fc838c..d9ae17e 100755 --- a/generator.py +++ b/generator.py

[libvirt] [libvirt-test-api][PATCH] Add new test case for allocPages API

2015-08-28 Thread Luyao Huang
Signed-off-by: Luyao Huang lhu...@redhat.com --- cases/test_connection.conf | 4 ++ repos/virconn/connection_allocPages.py | 88 ++ 2 files changed, 92 insertions(+) create mode 100644 repos/virconn/connection_allocPages.py diff --git a/cases

[libvirt] [PATCHv2 1/5] conf: introduce seclabels in shmem device element

2015-08-27 Thread Luyao Huang
Introduce a new element in shmem device element, this could help users to change the shm label to a specified label. Signed-off-by: Luyao Huang lhu...@redhat.com --- docs/formatdomain.html.in | 7 ++ docs/schemas/domaincommon.rng | 3 + src/conf

[libvirt] [PATCHv2 3/5] util: introduce new helpers to manage shmem device

2015-08-27 Thread Luyao Huang
Signed-off-by: Luyao Huang lhu...@redhat.com --- configure.ac | 10 + po/POTFILES.in | 3 +- src/Makefile.am | 7 +- src/libvirt_private.syms | 24 ++ src/util/virshm.c| 739 +++ src/util/virshm.h

[libvirt] [PATCHv2 4/5] security: add security part for shmem device

2015-08-27 Thread Luyao Huang
A new api to help set/restore the shmem device label. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/libvirt_private.syms| 2 + src/security/security_dac.c | 100 src/security/security_driver.h | 9 src/security

[libvirt] [PATCHv2 2/5] conf: introduce shareable in shmem device element

2015-08-27 Thread Luyao Huang
Signed-off-by: Luyao Huang lhu...@redhat.com --- docs/formatdomain.html.in | 5 +++ docs/schemas/domaincommon.rng | 5 +++ src/conf/domain_conf.c | 6 +++ src/conf/domain_conf.h | 1

[libvirt] [PATCHv2 0/5] manage the shmem device source

2015-08-27 Thread Luyao Huang
, i think we could use that way in this place. Luyao Huang (5): conf: introduce seclabels in shmem device element conf: introduce shareable in shmem device element util: introduce new helpers to manage shmem device security: add security part for shmem device qemu: call the helpers

[libvirt] [PATCHv2 5/5] qemu: call the helpers in virshm.c to manage shmem device

2015-08-27 Thread Luyao Huang
Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_conf.h| 3 + src/qemu/qemu_driver.c | 4 ++ src/qemu/qemu_process.c | 157 3 files changed, 164 insertions(+) diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h index

[libvirt] [PATCHv2] qemu: fix not update weight in def after success

2015-08-18 Thread Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1253107 Call virCgroupGetBlkioWeight to re-read blkio.weight right after it are set in order to keep our internal structures up-to-date. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_driver.c | 3 ++- 1 file changed, 2 insertions

[libvirt] [PATCH] virsh: fix output the incorrect error after try failed

2015-08-17 Thread Luyao Huang
with matching id 123 The second line should be reset after call virshLookupDomainInternal, because after some tries we get domain pointer, so output error during we tried will make user confuse. Signed-off-by: Luyao Huang lhu...@redhat.com --- tools/virsh-domain.c | 2 ++ 1 file changed, 2 insertions

[libvirt] [PATCH 0/2] 2 small fix for domrename

2015-08-16 Thread Luyao Huang
*** BLURB HERE *** Luyao Huang (2): virsh: fix always return false in domrename libvirt-domain: forbid use virDomainRename in readonly connection src/libvirt-domain.c | 1 + tools/virsh-domain.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- 1.8.3.1 -- libvir-list mailing

[libvirt] [PATCH 2/2] libvirt-domain: forbid use virDomainRename in readonly connection

2015-08-16 Thread Luyao Huang
This function will change the guest name, we shouldn't allow the readonly user do this. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/libvirt-domain.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 9065dab..9314f85 100644 --- a/src

[libvirt] [PATCH 1/2] virsh: fix always return false in domrename

2015-08-16 Thread Luyao Huang
Signed-off-by: Luyao Huang lhu...@redhat.com --- tools/virsh-domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 173bb15..437e43e 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -9827,7 +9827,7

[libvirt] [PATCH] qemu: fix the error cover issue in qemuDomainAddCgroupForThread

2015-08-14 Thread Luyao Huang
Just like commit 704cf06, the error already will be set in virCgroup* function, and virCgroupAddTask will return -1, so We will always report error Operation not permitted in this place. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_driver.c | 3 --- 1 file changed, 3 deletions

[libvirt] [PATCH] qemu: add a check for nodeset in qemuDomainSetNumaParamsLive

2015-08-14 Thread Luyao Huang
We will try to set the node to cpuset.mems without check if it is available, since we already have helper to check this. Call virNumaNodesetIsAvailable to check if node is available, then try to change it in the cgroup. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_driver.c | 3

[libvirt] [PATCHv2 0/2] qemu: fix the audit log is not correct for memory device

2015-08-13 Thread Luyao Huang
in qemuDomainRemoveMemoryDevice, since i just see only one place need jump to audit, so i refactor the code (thanks John's advise). Luyao Huang (2): qemu: fix the audit log is not correct after hot-plug memory success qemu: fix the audit log is not correct after hot-unplug memory device src/qemu

[libvirt] [PATCHv2 1/2] qemu: fix the audit log is not correct after hot-plug memory success

2015-08-13 Thread Luyao Huang
log will not right in that case. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_hotplug.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 1ea397f..def3de8 100644 --- a/src/qemu/qemu_hotplug.c

[libvirt] [PATCHv2 2/2] qemu: fix the audit log is not correct after hot-unplug memory device

2015-08-13 Thread Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1226234#c3 We use virDomainDefGetMemoryActual to get the newmem , but when we failed to remove the memory device, the virDomainDefGetMemoryActual will still output the oldmem size, so the audit log will not right in that case. Signed-off-by: Luyao

[libvirt] [PATCH] qemu: fix not update weight in def after success

2015-08-12 Thread Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1253107 Update the weight in vm def to fix this. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_driver.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 7a984a8..0b984dc

[libvirt] [libvirt-test-api][PATCH 3/3] Add a new test case for ioThreadInfo

2015-08-12 Thread Luyao Huang
Signed-off-by: Luyao Huang lhu...@redhat.com --- cases/linux_domain.conf | 6 repos/domain/info_iothread.py | 80 +++ 2 files changed, 86 insertions(+) create mode 100644 repos/domain/info_iothread.py diff --git a/cases/linux_domain.conf b

[libvirt] [libvirt-test-api][PATCH 2/3] Add new test case for API pinIOThread

2015-08-12 Thread Luyao Huang
Signed-off-by: Luyao Huang lhu...@redhat.com --- cases/linux_domain.conf | 6 ++ repos/domain/pin_iothread.py | 158 +++ 2 files changed, 164 insertions(+) create mode 100644 repos/domain/pin_iothread.py diff --git a/cases/linux_domain.conf b/cases

[libvirt] [libvirt-test-api][PATCH 1/3] Introduce new test case for add/del IOthread

2015-08-12 Thread Luyao Huang
Signed-off-by: Luyao Huang lhu...@redhat.com --- cases/linux_domain.conf | 6 +++ repos/domain/add_del_iothread.py | 82 2 files changed, 88 insertions(+) create mode 100644 repos/domain/add_del_iothread.py diff --git a/cases/linux_domain.conf

[libvirt] [PATCH] lib: fix no zero arg check for iothread_id

2015-08-10 Thread Luyao Huang
it. Signed-off-by: Luyao Huang lhu...@redhat.com --- Is that okay to fix it in this place ? src/libvirt-domain.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 837933f..8506942 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -7987,6

Re: [libvirt] [PATCH] lib: fix no zero arg check for iothread_id

2015-08-10 Thread Luyao Huang
On 08/10/2015 09:17 PM, John Ferlan wrote: On 08/10/2015 05:23 AM, Peter Krempa wrote: On Mon, Aug 10, 2015 at 17:06:31 +0800, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1251886 We do not allow delete an iothread which id is 0 in virDomainDelIOThread, but allow

[libvirt] [PATCH] virsh: fix domfsinfo wrong output in quiet mode

2015-08-04 Thread Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1250287 When run domfsinfo in quiet mode, we cannot get any useful information (just get \n), this is because we didn't use vshPrint to print useful information. Signed-off-by: Luyao Huang lhu...@redhat.com --- tools/virsh-domain.c | 6 +++--- 1 file

Re: [libvirt] [PATCH 2/4] security: add security part for shmem device

2015-08-02 Thread Luyao Huang
Hi Marc-André On 07/27/2015 11:39 PM, Marc-André Lureau wrote: Hi On Thu, Jul 23, 2015 at 12:13 PM, Luyao Huanglhu...@redhat.com wrote: A new api to help set/restore the shmem deivce dac/selinux label. typo: deivce / device. thanks, i will fix this in next version Signed-off-by: Luyao

Re: [libvirt] [PATCH 2/4] security: add security part for shmem device

2015-08-02 Thread Luyao Huang
On 07/30/2015 06:00 PM, Daniel P. Berrange wrote: On Thu, Jul 23, 2015 at 06:13:47PM +0800, Luyao Huang wrote: A new api to help set/restore the shmem deivce dac/selinux label. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/libvirt_private.syms| 2 ++ src/security

Re: [libvirt] [PATCH 3/4] util: introduce new helpers to manage shmem device

2015-08-02 Thread Luyao Huang
Hi Marc-André On 07/27/2015 11:43 PM, Marc-André Lureau wrote: Hi On Thu, Jul 23, 2015 at 12:13 PM, Luyao Huang lhu...@redhat.com wrote: Signed-off-by: Luyao Huang lhu...@redhat.com --- configure.ac | 10 + po/POTFILES.in | 3 +- src/Makefile.am | 5

Re: [libvirt] [PATCH 3/4] util: introduce new helpers to manage shmem device

2015-08-02 Thread Luyao Huang
On 07/30/2015 06:12 PM, Daniel P. Berrange wrote: On Thu, Jul 23, 2015 at 06:13:48PM +0800, Luyao Huang wrote: Signed-off-by: Luyao Huang lhu...@redhat.com --- configure.ac | 10 + po/POTFILES.in | 3 +- src/Makefile.am | 5 +- src/libvirt_private.syms

Re: [libvirt] [PATCH 2/4] security: add security part for shmem device

2015-08-02 Thread Luyao Huang
On 07/30/2015 05:54 PM, Daniel P. Berrange wrote: On Thu, Jul 23, 2015 at 06:13:47PM +0800, Luyao Huang wrote: A new api to help set/restore the shmem deivce dac/selinux label. s/deivce/device/ Thanks, i will fix in next version Signed-off-by: Luyao Huang lhu...@redhat.com --- src

[libvirt] [python PATCH] examples: small fix for nodestats.py example

2015-07-30 Thread Luyao Huang
Add nodestats.py in MANIFEST.in and add a small description for nodestats.py in README Signed-off-by: Luyao Huang lhu...@redhat.com --- MANIFEST.in | 1 + examples/README | 3 +++ 2 files changed, 4 insertions(+) diff --git a/MANIFEST.in b/MANIFEST.in index b5ba783..0d66f9c 100644

[libvirt] [PATCH] virsh: fix no error when pass a count = 0 to setvcpus

2015-07-29 Thread Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1248277 When count = 0, the client exit without set an error. Signed-off-by: Luyao Huang lhu...@redhat.com --- tools/virsh-domain.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c

[libvirt] [PATCH 2/4] security: add security part for shmem device

2015-07-23 Thread Luyao Huang
A new api to help set/restore the shmem deivce dac/selinux label. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/libvirt_private.syms| 2 ++ src/security/security_dac.c | 67 +++ src/security/security_driver.h | 11 +++ src/security

[libvirt] [PATCH 1/4] conf: introduce seclabels in shmem device element

2015-07-23 Thread Luyao Huang
Introduce a new element in shmem device element, this could help users to change the shm label to a specified label. Signed-off-by: Luyao Huang lhu...@redhat.com --- docs/formatdomain.html.in | 7 ++ docs/schemas/domaincommon.rng | 3 +++ src/conf/domain_conf.c| 55

[libvirt] [PATCH 4/4] qemu: call the helpers in virshm.c to manage shmem device

2015-07-23 Thread Luyao Huang
Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_conf.h| 3 + src/qemu/qemu_driver.c | 4 ++ src/qemu/qemu_process.c | 158 3 files changed, 165 insertions(+) diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h index

[libvirt] [PATCH 3/4] util: introduce new helpers to manage shmem device

2015-07-23 Thread Luyao Huang
Signed-off-by: Luyao Huang lhu...@redhat.com --- configure.ac | 10 + po/POTFILES.in | 3 +- src/Makefile.am | 5 +- src/libvirt_private.syms | 16 ++ src/util/virshm.c| 623 +++ src/util/virshm.h

[libvirt] [PATCH 0/4] manage the shmem device source

2015-07-23 Thread Luyao Huang
progrem, then setup the ivshmem-server by libvirt. we cannot do nothing for the ivshmem-server right now. Luyao Huang (4): conf: introduce seclabels in shmem device element security: add security part for shmem device util: introduce new helpers to manage shmem device qemu: call

[libvirt] [PATCH] qemu: fix the error cover issue in SetMemoryParameters

2015-07-22 Thread Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1245476 We won't return the errno after commit 0d7f45ae, and the more clearly error will be set in the code in vircgroup*. Also We will always report error Operation not permitted, because the return is -1. Signed-off-by: Luyao Huang lhu...@redhat.com

[libvirt] [PATCH] qemu: fix some api cannot work when disable cpuset in conf

2015-07-20 Thread Luyao Huang
. hot add iothread. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_cgroup.c | 16 src/qemu/qemu_driver.c | 10 +++--- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c index 8ed74ee..640a223 100644

[libvirt] [PATCH] qemu: fix the audit log is not correct after hot-plug memory success

2015-07-17 Thread Luyao Huang
the audit log will not right in that case. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_hotplug.c | 30 +- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 1ea397f..cf7ffa9 100644

[libvirt] [PATCH 2/2] test: introduce a function in test driver to check get vcpupin info

2015-07-14 Thread Luyao Huang
As there is a regression in use vcpupin get info, introduce a new function to test the virsh client. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/test/test_driver.c | 55 ++ tests/vcpupin | 34 +++ 2

[libvirt] [PATCH 0/2] fix the error when get the vcpupin info and add a test

2015-07-14 Thread Luyao Huang
I was so ashamed of writing a incorrect commit '848ab68' and didn't test with it. Patch 1/2 fix the issue and Patch 2/2 introduce a test for it. Luyao Huang (2): virsh: really fix the error if vcpu number exceed the guest maxvcpu number test: introduce a function in test driver for check

[libvirt] [PATCH 1/2] virsh: really fix the error if vcpu number exceed the guest maxvcpu number

2015-07-14 Thread Luyao Huang
Commit '848ab68' left a issue: when we try to get a vcpupin info with no no flags or --current flags, we still will get the wrong error. Because VIR_DOMAIN_AFFECT_CURRENT is 0, so this check flags VIR_DOMAIN_AFFECT_CURRENT will always get false. Signed-off-by: Luyao Huang lhu...@redhat.com

[libvirt] [PATCH] qemu: fix no error settings if fail to find a disk match path

2015-07-08 Thread Luyao Huang
in the callers function. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_driver.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 900740e..f134248 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c

[libvirt] [PATCH] qemu: move the guest status check before agent config and status check

2015-07-03 Thread Luyao Huang
is not running will be better than agent is not connected. Move the guest status check more early to output error to point out guest status is not right. Also from the logic, a running vm is a basic requirement to use agent, we cannot use agent if vm is not running. Signed-off-by: Luyao Huang lhu

[libvirt] [libvirt-test-api][PATCH] Introduce new test case for setMemoryStatsPeriod

2015-07-02 Thread Luyao Huang
Signed-off-by: Luyao Huang lhu...@redhat.com --- cases/linux_domain.conf | 6 +++ repos/domain/set_memory_period.py | 84 +++ 2 files changed, 90 insertions(+) create mode 100644 repos/domain/set_memory_period.py diff --git a/cases

[libvirt] [PATCH] qemu: remove deadcode in qemuDomain{HelperGetVcpus|GetIOThreadsLive}

2015-07-02 Thread Luyao Huang
We set hostcpus but not use them. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_driver.c | 8 1 file changed, 8 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 7a04e67..3f002b3 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu

[libvirt] [PATCH] util:qemu: fix IOThreadinfo always get failed when get running vm status

2015-06-29 Thread Luyao Huang
, virProcessGetAffinity() will use default value (262144 or 1024) to create bitmap. This issue was introduced in commit 825df8c. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_driver.c | 4 ++-- src/util/virprocess.c | 7 --- src/util/virprocess.h | 2 +- 3 files changed, 7

[libvirt] [PATCH] qemu: fix not end the job after use OpenGraphics(FD) and get fail when exit monitor

2015-06-29 Thread Luyao Huang
If guest unexpect exit(qemu process be killed) and get failed when exit the monitor, guest job still handled by old function, this will make guest cannot start later. Need call qemuDomainObjEndJob to release job status before unref vm. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu

[libvirt] [PATCH] virsh: report error if vcpu number exceed the guest maxvcpu number

2015-06-28 Thread Luyao Huang
-by: Luyao Huang lhu...@redhat.com --- tools/virsh-domain.c | 5 + 1 file changed, 5 insertions(+) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 27d62e9..681fc1a 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -6497,6 +6497,11 @@ cmdVcpuPin(vshControl *ctl

[libvirt] [PATCH] qemu:conf: introduce a function to delete vcpu sched

2015-06-24 Thread Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1235180 We have API allow vpu to be deleted, but an vcpu may be included in some domain vcpu sched, so add a new API to allow removing an iothread from some entry. Split the virDomainIOThreadSchedDelId to reuse some code. Signed-off-by: Luyao Huang

[libvirt] [PATCH] qemu: fix wrong remove guest cfg if migrate fail

2015-06-24 Thread Luyao Huang
If we get fail in qemuMigrationPrepareAny, we forget check if the vm is persistent then always call qemuDomainRemoveInactive to clean the inactive settings. Add a check to avoid this. This issue was introduce in commit 540c339. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu

[libvirt] [PATCH] conf: improve the way we format blkiotune and cputune

2015-06-23 Thread Luyao Huang
Just refactor existing code to use a child buf instead of check all element before format blkiotune and cputune. This will avoid the more and more bigger element check during we introduce new elements in blkiotune and cputune in the future. Signed-off-by: Luyao Huang lhu...@redhat.com --- src

  1   2   3   4   >