[libvirt] [libvirt-python PATCH] Improve error output when use getTime with a nonzero flags.

2014-10-16 Thread Luyao Huang
: libvirtError: unsupported flags (0x1) in function qemuDomainGetTime Signed-off-by: Luyao Huang lhu...@redhat.com --- libvirt-override.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libvirt-override.c b/libvirt-override.c index 9ba87eb..eed8d50 100644 --- a/libvirt-override.c +++ b/libvirt

[libvirt] [libvirt-python v2 PATCH] Improve error output when use getTime with a nonzero flags.

2014-10-16 Thread Luyao Huang
: libvirtError: unsupported flags (0x1) in function qemuDomainGetTime v1: https://www.redhat.com/archives/libvir-list/2014-October/msg00482.html Signed-off-by: Luyao Huang lhu...@redhat.com --- libvirt-override.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libvirt-override.c b

[libvirt] [libvirt-python PATCH] Add a type check for time in libvirt_virDomainSetTime

2014-10-20 Thread Luyao Huang
When pass a number or other things to setTime,no error output,but set time to 0. Add a type check and give a clear error messages: TypeError: time must be dict Signed-off-by: Luyao Huang lhu...@redhat.com --- libvirt-override.c | 5 + 1 file changed, 5 insertions(+) diff --git a/libvirt

Re: [libvirt] [libvirt-python v2 PATCH] Improve error output when use getTime with a nonzero flags.

2014-10-20 Thread Luyao Huang
Thanks your help and useful messages. This issue is so small and i just want to fix the ret = NULL with no exception. So i want to make ret = -1 and make the SystemError: error return without exception set disappear. Thanks, Luyao Huang - Original Message - From: Peter Krempa pkre

[libvirt] [libvirt-python v3 PATCH] Improve error output when use getTime with a nonzero flags.

2014-10-20 Thread Luyao Huang
/libvir-list/2014-October/msg00497.html Signed-off-by: Luyao Huang lhu...@redhat.com --- libvirt-override.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libvirt-override.c b/libvirt-override.c index 9ba87eb..8690f4f 100644 --- a/libvirt-override.c +++ b/libvirt-override.c

[libvirt] [libvirt-python PATCH] Fix cannot use VIR_CONNECT_GET_ALL_DOMAINS_STATS_ENFORCE_STATS flags in domainListGetStats

2014-10-21 Thread Luyao Huang
' for a unsigned int, but i didn't change them. Signed-off-by: Luyao Huang lhu...@redhat.com --- libvirt-override.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libvirt-override.c b/libvirt-override.c index c887b71..6dacdac 100644 --- a/libvirt-override.c +++ b/libvirt

[libvirt] [python PATCH] Fix flags cannot get right value for blockCopy function

2014-10-21 Thread Luyao Huang
-off-by: Luyao Huang lhu...@redhat.com --- libvirt-override.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libvirt-override.c b/libvirt-override.c index c887b71..4999ac3 100644 --- a/libvirt-override.c +++ b/libvirt-override.c @@ -8175,8 +8175,7

[libvirt] [python v2 PATCH] Add dict check for setTime and allow pass one valid parameter

2014-10-27 Thread Luyao Huang
When pass None to time, it will set guest time to 0. When pass an empty dictionary, it will report error. Allow a one-element dictionary which contains 'seconds' or 'nseconds', setting JUST seconds will do the sane thing of passing 0 for nseconds, instead of erroring out. Signed-off-by: Luyao

Re: [libvirt] [libvirt-python PATCH] Add a type check for time in libvirt_virDomainSetTime

2014-10-27 Thread Luyao Huang
Thanks for your reply and i add check for one-element and 0-element. But seems this will make the code not succinct enough. V2: https://www.redhat.com/archives/libvir-list/2014-October/msg00815.html BTW,How about move the check to libvirt-override-virDomain.py? Thanks, Luyao Huang

[libvirt] [PATCH] Fix memory leak in cmdNetworkDHCPLeases

2014-10-29 Thread Luyao Huang
: vshCommandRun (virsh.c:1915) by 0x12A9E1: main (virsh.c:3699) Signed-off-by: Luyao Huang lhu...@redhat.com --- tools/virsh-network.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/virsh-network.c b/tools/virsh-network.c index 90392d3..8ff6fd8 100644 --- a/tools/virsh-network.c +++ b/tools

[libvirt] [python v3 PATCH] Add dict check for setTime and allow pass 'seconds' parameter

2014-10-30 Thread Luyao Huang
When pass None or a empty dictionary to time, it will report error.Allow a one-element dictionary which contains 'seconds',setting JUST seconds will do the sane thing of passing 0 for nseconds, instead of erroring out.If dict have a unkown key, it will report error. Signed-off-by: Luyao Huang

[libvirt] [PATCH] network: fix call virNetworkEventLifecycleNew when networkStartNetwork fail

2014-11-01 Thread Luyao Huang
When start a network fail, libvirt still call virNetworkEventLifecycleNew to send a event. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/network/bridge_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c

[libvirt] [PATCH] virsh: fix net-dhcp-leases no output in quiet mode

2014-11-01 Thread Luyao Huang
When run net-dhcp-leases in quiet mode, cannot get any output. # virsh -q net-dhcp-leases default Signed-off-by: Luyao Huang lhu...@redhat.com --- tools/virsh-network.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/virsh-network.c b/tools/virsh-network.c

[libvirt] [PATCH] domain: Improve error output for virDomainListGetStats

2014-11-03 Thread Luyao Huang
-* flags are mutually exclusive Signed-off-by: Luyao Huang lhu...@redhat.com --- src/libvirt-domain.c | 13 + 1 file changed, 13 insertions(+) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 7dc3146..6ae6dd2 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c

Re: [libvirt] [PATCH] domain: Improve error output for virDomainListGetStats

2014-11-04 Thread Luyao Huang
Thanks for pointing out the mistake.I will move the check in qemuConnectGetAllDomainStats, this won't make a old client cannot use the future server and will give a good error when use future client to connect to old server. Thanks, Luyao Huang - Original Message - From: Eric Blake ebl

[libvirt] [v2 PATCH] qemu: Improve error output for virDomainListGetStats

2014-11-04 Thread Luyao Huang
exclusive Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_driver.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 6acaea8..60c3882 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu

Re: [libvirt] [PATCH] domain: Improve error output for virDomainListGetStats

2014-11-04 Thread Luyao Huang
Thanks your advise :) and I have moved the check in qemuConnectGetAllDomainStats. And the v2: https://www.redhat.com/archives/libvir-list/2014-November/msg00069.html Thanks, Luyao Huang - Original Message - From: Peter Krempa pkre...@redhat.com To: Luyao Huang lhu...@redhat.com

[libvirt] [PATCH] Fix a mismatch attribute name

2014-11-07 Thread Luyao Huang
From libvirt.org we know this attribute named: interface_mac MAC address of the network interface, not unique Signed-off-by: Luyao Huang lhu...@redhat.com --- src/access/viraccessdriverpolkit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/access

[libvirt] [v2 PATCH] doc: Fix a mismatch attribute name

2014-11-07 Thread Luyao Huang
From virAccessDriverPolkitCheckInterface function, we know this attribute should named: interface_macaddr Signed-off-by: Luyao Huang lhu...@redhat.com --- docs/aclpolkit.html.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/aclpolkit.html.in b/docs/aclpolkit.html.in

[libvirt] [PATCH] security:selinux: Fix crash when tcon is NULL

2014-11-08 Thread Luyao Huang
is NULL. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/security/security_selinux.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c index f96be50..4fd09b8 100644 --- a/src/security/security_selinux.c +++ b/src/security

[libvirt] [PATCH] conf: Fix crash when src-hosts = NULL in virStorageFileBackendGlusterInit

2014-11-12 Thread Luyao Huang
in remoteDispatchDomainSnapshotCreateXML (server=optimized out, msg=optimized out, ret=0x7fc76a60, args=0x7fc760001f90, rerr=0x7fc77344dc80, client=optimized out) at remote_dispatch.h:8605 Signed-off-by: Luyao Huang lhu...@redhat.com --- src/conf/domain_conf.c | 7 ++- 1 file changed, 6

[libvirt] [PATCH] qemu: fix cannot get a hot-unplug disk blockdevio settings

2014-11-13 Thread Luyao Huang
When we try to get a hot-unplug disk blkdevio settings via qemuDomainGetBlockIoTune, libvirt will output a cannot find device error.Move the check after confirm vm is running. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_driver.c | 9 - 1 file changed, 4 insertions

Re: [libvirt] [PATCH] qemu: fix cannot get a hot-unplug disk blockdevio settings

2014-11-14 Thread Luyao Huang
On 11/15/2014 06:29 AM, John Ferlan wrote: On 11/13/2014 10:21 PM, Luyao Huang wrote: It would help to put the bz link in here: https://bugzilla.redhat.com/show_bug.cgi?id=1164080 When we try to get a hot-unplug disk blkdevio settings via qemuDomainGetBlockIoTune, libvirt will output

[libvirt] [PATCH] qemu: output error when try to hotplug unsupport console

2014-11-17 Thread Luyao Huang
console in qemuBuildConsoleChrDeviceStr. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_command.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 1399ce4..2bf4a83 100644 --- a/src/qemu/qemu_command.c

[libvirt] [PATCH] Doc: some small issue in the document

2014-11-27 Thread Luyao Huang
When i pasted some xml from libvirt.org, i found some small mistake. Signed-off-by: Luyao Huang lhu...@redhat.com --- docs/formatdomain.html.in | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 9c1d0f4..c08b244

[libvirt] [PATCH 0/2] fix attached vm cannot get a right label

2014-12-01 Thread Luyao Huang
' labelunconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023/label imagelabelsystem_u:object_r:svirt_image_t:s0-s0:c0.c1023/imagelabel /seclabel seclabel type='static' model='dac' relabel='yes' label+0:+0/label imagelabel+0:+0/imagelabel /seclabel Luyao Huang (2): qemu: fix some small issue

[libvirt] [PATCH 1/2] qemu: fix some small issue in qemuProcessAttach

2014-12-01 Thread Luyao Huang
. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_process.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 382d802..ee95adb 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c

[libvirt] [PATCH 2/2] security: Add a new func use stat to get process DAC label

2014-12-01 Thread Luyao Huang
. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/security/security_dac.c | 50 +++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/src/security/security_dac.c b/src/security/security_dac.c index 85253af..2977f71 100644 --- a/src

Re: [libvirt] [PATCH 2/2] security: Add a new func use stat to get process DAC label

2014-12-01 Thread Luyao Huang
On 12/01/2014 06:24 PM, Martin Kletzander wrote: On Mon, Dec 01, 2014 at 05:54:36PM +0800, Luyao Huang wrote: When use qemuProcessAttach to attach a qemu process, cannot get a right DAC label. Add a new func to get process label via stat func. Do not remove virDomainDefGetSecurityLabelDef

Re: [libvirt] [PATCH 2/2] security: Add a new func use stat to get process DAC label

2014-12-01 Thread Luyao Huang
On 12/01/2014 11:20 PM, Martin Kletzander wrote: On Mon, Dec 01, 2014 at 11:05:30PM +0800, Luyao Huang wrote: On 12/01/2014 06:24 PM, Martin Kletzander wrote: On Mon, Dec 01, 2014 at 05:54:36PM +0800, Luyao Huang wrote: When use qemuProcessAttach to attach a qemu process, cannot get a right

Re: [libvirt] [PATCH 1/2] qemu: fix some small issue in qemuProcessAttach

2014-12-01 Thread Luyao Huang
On 12/01/2014 06:27 PM, Martin Kletzander wrote: On Mon, Dec 01, 2014 at 11:17:54AM +0100, Martin Kletzander wrote: On Mon, Dec 01, 2014 at 05:54:35PM +0800, Luyao Huang wrote: There are some small issue in qemuProcessAttach: 1.Fix virSecurityManagerGetProcessLabel always get pid = 0, move

[libvirt] [PATCHv2 2/2] security: Add a new func use stat to get process DAC label

2014-12-03 Thread Luyao Huang
. v2 add support freeBSD. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/security/security_dac.c | 95 - 1 file changed, 93 insertions(+), 2 deletions(-) diff --git a/src/security/security_dac.c b/src/security/security_dac.c index 85253af..89cafa3

Re: [libvirt] [PATCH 1/2] qemu: fix some small issue in qemuProcessAttach

2014-12-03 Thread Luyao Huang
Sorry i didn't know that, i will pay attention next time. And i have send a v2(but i haven't work in FreeBSD before, so...): https://www.redhat.com/archives/libvir-list/2014-December/msg00207.html Thanks, Luyao Huang - Original Message - From: Martin Kletzander mklet...@redhat.com

[libvirt] [PATCH] storage: fix crash caused by no check return before set close

2014-12-03 Thread Luyao Huang
at remote_dispatch.h:14339 6 remoteDispatchStorageVolUploadHelper at remote_dispatch.h:14309 7 0x7f094524a192 in virNetServerProgramDispatchCall at rpc/virnetserverprogram.c:437 Signed-off-by: Luyao Huang lhu...@redhat.com --- src/storage/storage_driver.c | 5 +++-- 1 file changed, 3 insertions(+), 2

[libvirt] [PATCHv3 2/2] security: Add a new func use stat to get process DAC label

2014-12-05 Thread Luyao Huang
. v2 add support freeBSD. v3 use snprintf instead of VirAsprintf and move the error settings in virSecurityDACGetProcessLabelInternal. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/security/security_dac.c | 85 +++-- 1 file changed, 82 insertions

Re: [libvirt] [PATCHv3 2/2] security: Add a new func use stat to get process DAC label

2014-12-05 Thread Luyao Huang
On 12/06/2014 12:50 AM, Eric Blake wrote: On 12/05/2014 01:20 AM, Luyao Huang wrote: When use qemuProcessAttach to attach a qemu process, cannot get a right DAC label. Add a new func to get process label via stat func. Do not remove virDomainDefGetSecurityLabelDef before try to use stat to get

[libvirt] [PATCH] conf: forbid negative number in address(like controller, bus, slot...)

2014-12-08 Thread Luyao Huang
, I think we should forbid negative number in these place (we did this before, but after f18c02ec, virStrToLong_ui changed to allow negative number). So changed to use virStrToLong_uip in these place. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/conf/device_conf.c | 4 ++-- src/conf

[libvirt] [PATCHv2 1/2] qemu: output error when try to hotplug unsupport console

2014-12-08 Thread Luyao Huang
console in qemuBuildConsoleChrDeviceStr. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_command.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 1399ce4..7dced5f 100644 --- a/src/qemu/qemu_command.c

[libvirt] [PATCH 2/2] qemu: add a check when cold-plug a Chr device

2014-12-08 Thread Luyao Huang
Add a func just check the base target type which qemu support. But i still doubt this will be useful , we already have a check when we try to start the vm. And this check only check the target type, and the other things will be done in virDomainChrDefParseXML. Signed-off-by: Luyao Huang lhu

[libvirt] [PATCH 0/2]qemu: output error when try to hotplug/coldplug a unsupported device

2014-12-08 Thread Luyao Huang
unsupported Chr device when cold-plug, I think this maybe unnessary in this place, because we will check it when we start the guest and it will report a clear error.But if we use qemu* header func add a qemu unsupported things to qemu guest, it seems strange. Luyao Huang (2): qemu: output error when

[libvirt] [PATCHv4 2/2] security: Add a new func use stat to get process DAC label

2014-12-09 Thread Luyao Huang
. Signed-off-by: Luyao Huang lhu...@redhat.com --- v2 add support freeBSD. v3 use snprintf instead of VirAsprintf and move the error settings in virSecurityDACGetProcessLabelInternal. v4 remove errno.h include and thanks Eric advice move this version comment to this place. src/security

Re: [libvirt] [PATCH] conf: forbid negative number in address(like controller, bus, slot...)

2014-12-09 Thread Luyao Huang
On 12/09/2014 06:38 PM, Michal Privoznik wrote: On 08.12.2014 09:27, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1171582 When we edit a negative controller address number to a device, some of them will auto generate a controller with invalid index number. This will make

[libvirt] [PATCH] conf: goto error when value max_sectors too large

2014-12-11 Thread Luyao Huang
Output error when we try to set a too large max_sectors. Just like queues and cmd_per_lun here. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/conf/domain_conf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 2965d8d..d4ac301

[libvirt] [PATCH] conf: Ignore device address for model=none usb controller and memballon

2014-12-11 Thread Luyao Huang
It make no sense at all to have it there. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/conf/domain_conf.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index ec45b8c..2965d8d 100644 --- a/src/conf

[libvirt] [PATCH] conf: fix crash when match a network iscsi hostdev with a host iscsi hostdev

2014-12-14 Thread Luyao Huang
/domain_conf.c:10911 2 virDomainHostdevMatch at conf/domain_conf.c:10973 3 virDomainHostdevFind at conf/domain_conf.c:10998 4 0x7f84f6a10560 in qemuDomainAttachDeviceConfig at qemu/qemu_driver.c:7223 5 qemuDomainAttachDeviceFlags at qemu/qemu_driver.c:7554 Signed-off-by: Luyao Huang lhu

[libvirt] [PATCH] conf: fix virDomainLeaseIndex cannot work when both parameter have lockspaces present

2014-12-14 Thread Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1174096 When both parameter have lockspaces present, virDomainLeaseIndex will always -1 even there is a lease the same with the one we check. I think we shouldn't do 'continue' when the two lockspaces are the same. Signed-off-by: Luyao Huang lhu

[libvirt] [PATCH] qemu: fix use a nonexist address in qemuDomainAttachDeviceConfig

2014-12-15 Thread Luyao Huang
We free them before, then use it. This make we always do virDomainDefAddImplicitControllers when attach a disk. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu

[libvirt] [PATCH] qemu: Auto generate a controller when attach hostdev and chr device

2014-12-15 Thread Luyao Huang
start after we add them (although they can start at the second time). Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_driver.c | 4 1 file changed, 4 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index df3ba6d..62fb784 100644 --- a/src/qemu

Re: [libvirt] [PATCH] conf: fix crash when match a network iscsi hostdev with a host iscsi hostdev

2014-12-15 Thread Luyao Huang
On 12/15/2014 07:58 PM, John Ferlan wrote: On 12/14/2014 10:09 PM, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1174053 When we use attach-device to coldplug a network iscsi hostdev, libvirt will check if there is already a device in XML. But if the 'b' is a host iscsi

Re: [libvirt] [PATCH] conf: fix virDomainLeaseIndex cannot work when both parameter have lockspaces present

2014-12-15 Thread Luyao Huang
On 12/15/2014 09:27 PM, Michal Privoznik wrote: On 15.12.2014 07:46, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1174096 When both parameter have lockspaces present, virDomainLeaseIndex will always -1 even there is a lease the same with the one we check. I think we

[libvirt] [PATCH] conf: fix cannot start a guest have a shareable network iscsi hostdev

2014-12-15 Thread Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1174569 We should do nothing for the shareable network iscsi hostdev in qemuAddSharedHostdev and qemuRemoveSharedHostdev. Shareable for a network iscsi hostdev is not valid, so just ignore it. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu

Re: [libvirt] [PATCH] qemu: fix use a nonexist address in qemuDomainAttachDeviceConfig

2014-12-16 Thread Luyao Huang
On 12/16/2014 08:00 PM, Peter Krempa wrote: On 12/15/14 10:10, Luyao Huang wrote: We free them before, then use it. This make we always do We clear the pointer, not free. virDomainDefAddImplicitControllers when attach a disk. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu

Re: [libvirt] [PATCH] qemu: fix use a nonexist address in qemuDomainAttachDeviceConfig

2014-12-16 Thread Luyao Huang
On 12/16/2014 08:33 PM, Peter Krempa wrote: On 12/16/14 13:32, Luyao Huang wrote: On 12/16/2014 08:00 PM, Peter Krempa wrote: On 12/15/14 10:10, Luyao Huang wrote: We free them before, then use it. This make we always do We clear the pointer, not free. virDomainDefAddImplicitControllers

Re: [libvirt] [PATCH] conf: fix cannot start a guest have a shareable network iscsi hostdev

2014-12-17 Thread Luyao Huang
On 12/17/2014 06:27 PM, Michal Privoznik wrote: On 17.12.2014 11:04, lhuang wrote: On 12/16/2014 11:46 PM, Michal Privoznik wrote: On 16.12.2014 04:16, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1174569 We should do nothing for the shareable network iscsi hostdev

[libvirt] [PATCH] lxc: fix show the wrong xml when guest start failed

2014-12-21 Thread Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1176503 When guest start failed, libvirt will keep the current vm-def, this will make a issue that we cannot get a right xml after guest start failed. Pass the newDef to def will make it work well. Signed-off-by: Luyao Huang lhu...@redhat.com --- src

[libvirt] [PATCH] conf: Don't use the current state in def-data.network.actual when migrate

2014-12-24 Thread Luyao Huang
virDomainNetDefFormat, we won't get the current vm interface state. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/conf/domain_conf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index aafc05e..fffd6cd 100644 --- a/src/conf

[libvirt] [PATCH] qemu: fix tc old rules will be cleaned after set tc new rules fail

2014-12-30 Thread Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1177723 If tc cmd failed when we use qemuDomainSetInterfaceParameters, the old rules will be clean. Restore the old rules if tc failed. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_driver.c | 6 +- 1 file changed, 5 insertions

Re: [libvirt] [PATCH] qemu: fix tc old rules will be cleaned after set tc new rules fail

2014-12-30 Thread Luyao Huang
Please ignore this patch, i worked in a old upstream libvirt. Sorry for the noisy. Luyao - Original Message - From: Luyao Huang lhu...@redhat.com To: libvir-list@redhat.com Cc: Luyao Huang lhu...@redhat.com Sent: Tuesday, December 30, 2014 5:00:03 PM Subject: [libvirt] [PATCH] qemu: fix

[libvirt] [PATCHv2] qemu: fix tc old rules will be cleaned if set tc new rules fail

2014-12-30 Thread Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1177723 If tc cmd failed (maybe value too large) when we use virDomainSetInterfaceParameters , the old rules will be clean. Restore the old rules if tc failed. Signed-off-by: Luyao Huang lhu...@redhat.com --- v1 make a big mistake that i used a old

[libvirt] [PATCH 00/12]qemu: support hot-plug/unplug RNG device

2015-01-02 Thread Luyao Huang
qemu already support hot-plug and hot-unplug RNG device. These patch will make libvirt support hot-plug/unplug RNG device for qemu driver. Luyao Huang (12): qemu: introduce a new func qemuAssignDeviceRNGAlias for rng device qemu: rename qemuBuildRNGDeviceArgs to qemuBuildRNGDevStr and change

[libvirt] [PATCH 03/12] conf: introduce a new func virDomainRNGEquals

2015-01-02 Thread Luyao Huang
virDomainRNGEquals is a func which check if two rng device are the same. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/conf/domain_conf.c | 34 ++ src/conf/domain_conf.h | 3 +++ 2 files changed, 37 insertions(+) diff --git a/src/conf/domain_conf.c b/src

[libvirt] [PATCH 11/12] qemu: Implement RNG device hotplug on live level

2015-01-02 Thread Luyao Huang
We have enough patches for hotplug RNG device, maybe we can implement live hotplug of a RNG device. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_driver.c | 8 - src/qemu/qemu_hotplug.c | 92 + src/qemu/qemu_hotplug.h | 3

[libvirt] [PATCH 07/12] qemu: introduce 2 func qemuDomainRNGInsert and qemuDomainRNGRemove

2015-01-02 Thread Luyao Huang
qemu side functions, call virDomainRNGInsert and virDomainRNGRemove to help us. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_hotplug.c | 23 +++ src/qemu/qemu_hotplug.h | 7 +++ 2 files changed, 30 insertions(+) diff --git a/src/qemu/qemu_hotplug.c b

[libvirt] [PATCH 05/12] libvirt_private: add 4 new func in libvirt_private.syms

2015-01-02 Thread Luyao Huang
Signed-off-by: Luyao Huang lhu...@redhat.com --- src/libvirt_private.syms | 5 + 1 file changed, 5 insertions(+) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index aa776b4..deab4cf 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -375,7 +375,12

[libvirt] [PATCH 09/12] qemu_monitor: add 2 functions qemuMonitorDetachRNGDev and qemuMonitorAttachRNGDev

2015-01-02 Thread Luyao Huang
These 2 functions just do some basic check and then call qemuMonitorJSONAttachRNGDev and qemuMonitorDelObject to help us. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_monitor.c | 43 +++ src/qemu/qemu_monitor.h | 7 +++ 2 files

[libvirt] [PATCH 06/12] qemu: add id when build RNG device and rename object id

2015-01-02 Thread Luyao Huang
We didn't set a id when we build RNG device cmdline before. Give a id to every RNG device and we can hotunplug it via QMP cmd device_del. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_command.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src

[libvirt] [PATCH 04/12] conf: introduce 3 functions for RNG device

2015-01-02 Thread Luyao Huang
the 3 functions are: virDomainRNGInsert: Insert a RNG device to vm-def. virDomainRNGRemove: remove a RNG device in vm-def. virDomainRNGFind: find a RNG device in vm-def. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/conf/domain_conf.c | 44 src

[libvirt] [PATCH 12/12] qemu: Implement RNG device hotunplug on live level

2015-01-02 Thread Luyao Huang
We have enough patches for hotunplug RNG device, maybe we can implement live hotunplug of a RNG device. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_driver.c | 4 +- src/qemu/qemu_hotplug.c | 97 - src/qemu/qemu_hotplug.h | 4

[libvirt] [PATCH 10/12] audit: make function virDomainAuditRNG global

2015-01-02 Thread Luyao Huang
Signed-off-by: Luyao Huang lhu...@redhat.com --- src/conf/domain_audit.c | 2 +- src/conf/domain_audit.h | 7 +++ src/libvirt_private.syms | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_audit.c b/src/conf/domain_audit.c index fcf9df7..159ebf5 100644

[libvirt] [PATCH 08/12] qemu: introduce 2 functions for attach a rng object in json monitor

2015-01-02 Thread Luyao Huang
We need a new function to build a RNG device object, and need a function to build a props which will be used in qemuMonitorJSONAddObject. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_monitor_json.c | 58 src/qemu/qemu_monitor_json.h

[libvirt] [PATCH 02/12] qemu: rename qemuBuildRNGDeviceArgs to qemuBuildRNGDevStr and change something

2015-01-02 Thread Luyao Huang
rename qemuBuildRNGDeviceArgs to qemuBuildRNGDevStr, we need this function to build a cmdline. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_command.c | 33 - src/qemu/qemu_command.h | 4 2 files changed, 20 insertions(+), 17 deletions

[libvirt] [PATCH 01/12] qemu: introduce a new func qemuAssignDeviceRNGAlias for rng device

2015-01-02 Thread Luyao Huang
This function used to set a alias name for RNG device, usage just like other named qemuAssignDevice***Alias functions. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_command.c | 25 - src/qemu/qemu_command.h | 1 + 2 files changed, 25 insertions(+), 1

Re: [libvirt] [PATCH v3 1/2] qemu: output error when try to hotplug unsupport console

2015-01-22 Thread Luyao Huang
On 01/22/2015 06:19 PM, Peter Krempa wrote: On Thu, Jan 22, 2015 at 10:28:18 +0800, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1164627 When using 'virsh attach-device' to hotplug an unsupported console type into a qemu guest, the attachment will erroneously allows

[libvirt] [PATCH] conf: forget goto error when the node-name is not valid

2015-02-03 Thread Luyao Huang
Although it won't cause a issue now, the code won't touch this place. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/conf/domain_conf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 706e5d2..3a0b13e 100644 --- a/src/conf

[libvirt] [PATCH] conf: fix forget goto error when report a unsupport error

2015-02-03 Thread Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1188914 This will cause a issue that add a unsupport input device to a hypervisor which unsupport it, also will cause a wrong error message when the input device is not a mouse or keyboard. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/conf

Re: [libvirt] [PATCH] util: recheck the validating backend when the firewalld start/stop

2015-02-02 Thread Luyao Huang
On 02/02/2015 07:38 PM, Daniel P. Berrange wrote: On Mon, Feb 02, 2015 at 11:40:44AM +0800, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1188088 When the firewalld is running and then start the libvirtd, libvirt will set the current backend as VIR_FIREWALL_BACKEND_FIREWALLD

[libvirt] [PATCH] lxc: fix double close handshakefds[1]

2015-02-04 Thread Luyao Huang
Signed-off-by: Luyao Huang lhu...@redhat.com --- src/lxc/lxc_process.c | 5 - 1 file changed, 5 deletions(-) diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index 01da344..b385423 100644 --- a/src/lxc/lxc_process.c +++ b/src/lxc/lxc_process.c @@ -1270,11 +1270,6 @@ int

[libvirt] [PATCH v3] lxc: fix show the wrong xml when guest start failed

2015-02-04 Thread Luyao Huang
us clean the source and call the hooks if start a vm failed Signed-off-by: Luyao Huang lhu...@redhat.com --- v2: use virLXCProcessCleanup to free the source and call the hook. v3: rework the patch to suit the virLXCProcessStart code changed. src/lxc/lxc_process.c | 76

[libvirt] [PATCH] qemu: fix cannot set graphic passwd via qemuDomainSaveImageDefineXML

2015-01-20 Thread Luyao Huang
call qemuDomainDefCopy in qemuDomainSaveImageUpdateDef. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 5994558..abe3b9f 100644 --- a/src/qemu

[libvirt] [PATCH v3 1/2] qemu: output error when try to hotplug unsupport console

2015-01-21 Thread Luyao Huang
, Although a guest can be defined with an improper target, startup will cause failure. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_command.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index c041ee7

[libvirt] [PATCH v3 2/2] qemu: add a target type check when hot/cold-plug a Chr device

2015-01-21 Thread Luyao Huang
) And this check only check the target type, and other things have been checked in virDomainChrDefParseXML. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/libvirt_private.syms | 2 ++ src/qemu/qemu_hotplug.c | 67 2 files changed, 69 insertions(+) diff

[libvirt] [PATCH v3 0/9] qemu: support hot-plug/unplug RNG device

2015-01-16 Thread Luyao Huang
and backend object ID have the same basic alias name -rename need_remove to remove_chardev in qemuDomainAttachRNGDevice -add qemu capability check for RNG device backend Luyao Huang (9): qemu: Add helper to assign RNG device aliases qemu: refactor qemuBuildRNGDeviceArgs to allow reuse in RNG

[libvirt] [PATCH v3 8/9] qemu: Implement RNG device hotplug on live level

2015-01-16 Thread Luyao Huang
We have enough patches for hotplug RNG device, maybe we can implement live hotplug of a RNG device. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_driver.c | 8 +++- src/qemu/qemu_hotplug.c | 106 src/qemu/qemu_hotplug.h | 3

[libvirt] [PATCH v3 9/9] qemu: Implement RNG device hotunplug on live level

2015-01-16 Thread Luyao Huang
We have enough patches for hotunplug RNG device, maybe we can implement live hotunplug of a RNG device. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/libvirt_private.syms | 1 + src/qemu/qemu_driver.c | 4 +- src/qemu/qemu_hotplug.c | 112

[libvirt] [PATCH v3 6/9] qemu: add functions for attach/detach RNG device via qemu monitor

2015-01-16 Thread Luyao Huang
qemuMonitorAttachRNGDev and qemuMonitorDetachRNGDev functions just do some basic check and then call qemuMonitorJSONAttachRNGDev and qemuMonitorDelObject to help us. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_monitor.c | 43

[libvirt] [PATCH v3 5/9] qemu: add id when build RNG device and rename object id

2015-01-16 Thread Luyao Huang
We didn't set a id when we build RNG device cmdline before. Give a id to every RNG device and we can hotunplug it via QMP cmd device_del. And fix the tests. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_command.c | 12 ++-- tests

[libvirt] [PATCH v3 1/9] qemu: Add helper to assign RNG device aliases

2015-01-16 Thread Luyao Huang
This function is used to assign an alias for a RNG device. It will be later reused when hotplugging RNGs. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_command.c | 25 - src/qemu/qemu_command.h | 1 + 2 files changed, 25 insertions(+), 1 deletion

[libvirt] [PATCH v3 2/9] qemu: refactor qemuBuildRNGDeviceArgs to allow reuse in RNG hotplug

2015-01-16 Thread Luyao Huang
Rename qemuBuildRNGDeviceArgs to qemuBuildRNGDevStr and change the return type so that it can be reused in the device hotplug code later. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_command.c | 32 src/qemu/qemu_command.h | 4 2 files

[libvirt] [PATCH v3 4/9] conf: add 3 functions for insert, remove and find a RNG device

2015-01-16 Thread Luyao Huang
the 3 functions are: virDomainRNGInsert: Insert a RNG device to vm-def. virDomainRNGRemove: remove a RNG device in vm-def. virDomainRNGFind: find a RNG device in vm-def. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/conf/domain_conf.c | 42 ++ src

[libvirt] [PATCH v3 3/9] conf: Introduce function to compare RNG devices.

2015-01-16 Thread Luyao Huang
virDomainRNGEquals is a func which check if two rng device are the same. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/conf/domain_conf.c | 34 ++ src/conf/domain_conf.h | 3 +++ src/libvirt_private.syms | 1 + 3 files changed, 38 insertions(+) diff

[libvirt] [PATCH v3 7/9] audit: export virDomainAuditRNG

2015-01-16 Thread Luyao Huang
Signed-off-by: Luyao Huang lhu...@redhat.com --- src/conf/domain_audit.c | 2 +- src/conf/domain_audit.h | 7 +++ src/libvirt_private.syms | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_audit.c b/src/conf/domain_audit.c index fcf9df7..159ebf5 100644

[libvirt] [PATCH] qemu: fix fail to start vm with one cell use memdev and another not

2015-01-15 Thread Luyao Huang
will use memdev for all cells if there is at least one cell need this. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_command.c| 88 +- .../qemuxml2argv-numatune-memnode-no-memory.args | 3 +- 2 files changed, 55 insertions(+), 36

Re: [libvirt] [PATCH v3 1/2] qemu: output error when try to hotplug unsupport console

2015-01-22 Thread Luyao Huang
On 01/22/2015 09:25 PM, Peter Krempa wrote: On Thu, Jan 22, 2015 at 21:20:46 +0800, Luyao Huang wrote: On 01/22/2015 06:19 PM, Peter Krempa wrote: On Thu, Jan 22, 2015 at 10:28:18 +0800, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1164627 ... ACK, although the rest

Re: [libvirt] [PATCH 2/2] qemu: add a check when cold-plug a Chr device

2015-01-21 Thread Luyao Huang
On 01/21/2015 08:00 PM, Ján Tomko wrote: On 01/21/2015 04:10 AM, lhuang wrote: On 01/21/2015 03:00 AM, John Ferlan wrote: On 12/09/2014 01:48 AM, Luyao Huang wrote: Add a func just check the base target type which qemu support. But i still doubt this will be useful , we already have a check

[libvirt] [PATCH 1/4] util: introduce a new helper for get interface IPv6 address

2015-02-12 Thread Luyao Huang
Introduce a new function to help to get interface IPv6 address. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/libvirt_private.syms | 1 + src/util/virnetdev.c | 70 src/util/virnetdev.h | 2 ++ 3 files changed, 73 insertions

[libvirt] [PATCH 2/4] conf: introduce new family attribute in graphics listen for chose IP family

2015-02-12 Thread Luyao Huang
or network have a can be used ipv4 address ipv6: check if the interface or network have a can be used ipv6 address fix some test which will be break by this commit. Signed-off-by: Luyao Huang lhu...@redhat.com --- docs/formatdomain.html.in | 10 +- docs/schemas

[libvirt] [PATCH 0/4] add support for graphics to get a IPv6 address

2015-02-12 Thread Luyao Huang
'/ /graphics However we do not support get a IPv6 address for the network. add some helpers and rework networkGetNetworkAddress to make it can get a IPv6 address when we need. Luyao Huang (4): util: introduce a new helper for get interface IPv6 address conf: introduce new family attribute in graphics

[libvirt] [PATCH 3/4] network: rework networkGetNetworkAddress to make it can get IPv6 address

2015-02-12 Thread Luyao Huang
Export the required helpers and rework networkGetNetworkAddress to make it can get IPv6 address. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/conf/network_conf.c | 2 +- src/conf/network_conf.h | 1 + src/libvirt_private.syms| 1 + src/network/bridge_driver.c | 50

[libvirt] [PATCH 4/4] qemu: fix a error coverd issue in 2 place

2015-02-12 Thread Luyao Huang
we already set a more clearly error in networkGetNetworkAddress, so this error will cover our error in networkGetNetworkAddress. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_command.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/qemu

[libvirt] [PATCH] virsh: fix IP address in vncdisplay for listen type='network'

2015-02-15 Thread Luyao Huang
Just like the fix for domdisplay in commit 1ba815. --- tools/virsh-domain.c | 12 1 file changed, 12 insertions(+) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index dc4a863..2506b89 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -10269,6 +10269,18 @@

  1   2   3   4   >