Re: [libvirt] [PATCH] domain: add limit description of parameter 'size' for blockPeek and memoryPeek

2017-09-12 Thread Chen Hanxiao
At 2017-09-05 22:01:56, "Chen Hanxiao" wrote: >From: Chen Hanxiao > > We had 'size' limits for virDomainMemoryPeek > and virDomainBlockPeek by macro > REMOTE_DOMAIN_BLOCK_PEEK_BUFFER_MAX and > REMOTE_DOMAIN_MEMORY_PEEK_BUFFER_MAX. > > The descr

[libvirt] [PATCH] virsh: domifaddr: clarify description of --full option

2017-10-16 Thread Chen Hanxiao
From: Chen Hanxiao Option --full will always display the name and MAC address of the interface. Both virsh help and virsh man page didn't mention that. Signed-off-by: Chen Hanxiao --- tools/virsh-domain-monitor.c | 2 +- tools/virsh.pod | 6 +++--- 2 files chang

[libvirt] [PATCH] qemu: Add support for hot unplug redirdev device

2017-11-10 Thread Chen Hanxiao
From: Chen Hanxiao We lacked of hot unplugging redirdev device. This patch adds support for it. We could use detach-device --live now. Signed-off-by: Chen Hanxiao --- src/qemu/qemu_driver.c | 4 +- src/qemu/qemu_hotplug.c | 111 src

[libvirt] [PATCH] hooks: Fix a wrong description

2017-11-14 Thread Chen Hanxiao
From: Chen Hanxiao In the definition of virHookQemuOpType and virHookNetworkOpType, we should use 'stopped' rather than 'shutdown'. Signed-off-by: Chen Hanxiao --- docs/hooks.html.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hooks.html.in

Re: [libvirt] [PATCH] qemu: Add support for hot unplug redirdev device

2017-11-19 Thread Chen Hanxiao
At 2017-11-10 16:35:59, "Chen Hanxiao" wrote: >From: Chen Hanxiao > > We lacked of hot unplugging redirdev device. > This patch adds support for it. > We could use detach-device --live now. > >Signed-off-by: Chen Hanxiao ping Regards, - Chen -- libvi

[libvirt] [PATCH] set-lifecycle-action: add description of type and action

2018-06-21 Thread Chen Hanxiao
From: Chen Hanxiao In [1], are described as "on_poweroff", "on_reboot", "on_crash". but we accept "poweroff", "reboot" and "crash". This patch adds docs about them. [1]: https://libvirt.org/formatdomain.html#elementsE

Re: [libvirt] [PATCH] set-lifecycle-action: add description of type and action

2018-06-26 Thread Chen Hanxiao
At 2018-06-21 19:28:55, "Chen Hanxiao" wrote: >From: Chen Hanxiao > >In [1], are described as "on_poweroff", > "on_reboot", "on_crash". > but we accept "poweroff", "reboot" and "crash". >This

Re: [libvirt] [PATCH] util:Fix with process number and pid file do not match

2018-07-03 Thread Chen Hanxiao
At 2018-07-03 15:36:19, "Michal Prívozník" wrote: >On 07/02/2018 01:08 PM, dubo163 wrote: >> From: dubobo >> >> the libvirtd pid file is not match the os process pid number >> which is smaller than before. >> >> this would be exist if the libvirtd process coredump or the os >> process was kill

Re: [libvirt] [PATCH] qemu: Add support for hot unplug redirdev device

2017-11-26 Thread Chen Hanxiao
At 2017-11-20 11:08:54, "Chen Hanxiao" wrote: > >At 2017-11-10 16:35:59, "Chen Hanxiao" wrote: >>From: Chen Hanxiao >> >> We lacked of hot unplugging redirdev device. >> This patch adds support for it. >> We could use detach-devi

[libvirt] [PATCH] qemu_agent: report VIR_ERR_AGENT_UNSYNCED if guest_sync failed.

2017-11-29 Thread Chen Hanxiao
From: Chen Hanxiao Commit 5e5019bf removed this kind of error. But we've already protected race condition by qemuDomainObjEnterAgent, it was very unlikely to revieve a sync from other calls. For call from virDomain*, it's better to show this error if we really got a mismatch sync.

Re: [libvirt] [PATCH] qemu_agent: report VIR_ERR_AGENT_UNSYNCED if guest_sync failed.

2017-11-30 Thread Chen Hanxiao
At 2017-11-30 14:11:36, "Nikolay Shirokovskiy" wrote: > > >On 30.11.2017 06:08, Chen Hanxiao wrote: >> From: Chen Hanxiao >> >> Commit 5e5019bf removed this kind of error. >> >> But we've already protected race condition by qemuDomainOb

[libvirt] [RESEND PATCH] qemu: Add support for hot unplug redirdev device

2017-12-04 Thread Chen Hanxiao
From: Chen Hanxiao We lacked of hot unplugging redirdev device. This patch add support for it. We could use detach-device --live now. Signed-off-by: Chen Hanxiao --- rebase on 3.10 src/qemu/qemu_driver.c | 4 +- src/qemu/qemu_hotplug.c | 111

[libvirt] [PATCH v2] qemu: Add support for hot unplug redirdev device

2017-12-06 Thread Chen Hanxiao
From: Chen Hanxiao We lacked of hot unplugging redirdev device. This patch add support for it. We could use detach-device --live now. Signed-off-by: Chen Hanxiao --- v2: add news section docs/news.xml | 9 src/qemu/qemu_driver.c | 4 +- src/qemu/qemu_hotplug.c | 111

[libvirt] [PATCH] virerror: mark VIR_ERR_AGENT_UNSYNCED as DEPRECATED

2017-12-06 Thread Chen Hanxiao
From: Chen Hanxiao Since commit 5e5019bf, we've no longer use VIR_ERR_AGENT_UNSYNCED anymore. Mark it as DEPRECATED. Signed-off-by: Chen Hanxiao --- include/libvirt/virterror.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/libvirt/virterror.h b/include/li

Re: [libvirt] [PATCH] virerror: mark VIR_ERR_AGENT_UNSYNCED as DEPRECATED

2017-12-07 Thread Chen Hanxiao
At 2017-12-07 17:30:15, "Michal Privoznik" wrote: >On 12/07/2017 02:59 AM, Chen Hanxiao wrote: >> From: Chen Hanxiao >> >> Since commit 5e5019bf, we've no longer use >> VIR_ERR_AGENT_UNSYNCED anymore. >> Mark it as DEPRECATED. >> >

Re: [libvirt] [PATCH v2] qemu: Add support for hot unplug redirdev device

2017-12-07 Thread Chen Hanxiao
At 2017-12-07 17:35:42, "Peter Krempa" wrote: >On Thu, Dec 07, 2017 at 09:26:12 +0800, Chen Hanxiao wrote: >> From: Chen Hanxiao >> >> We lacked of hot unplugging redirdev device. >> This patch add support for it. >> We could use detach-de

[libvirt] [PATCH v2.1 0/2] Add support for hot unplug redirdev

2017-12-07 Thread Chen Hanxiao
v2.1: split original patch into a patchset, put News in a seperate patch Chen Hanxiao (2): qemu: Add support for hot unplug redirdev device news: add change of hot unplug redirdev docs/news.xml | 9 src/qemu/qemu_driver.c | 4 +- src/qemu/qemu_hotplug.c | 111

[libvirt] [PATCH v2.1 2/2] news: add change of hot unplug redirdev

2017-12-07 Thread Chen Hanxiao
From: Chen Hanxiao Add hot unplug redirdev in news 'New features' section Signed-off-by: Chen Hanxiao --- v2.1: put news part into a seperate patch docs/news.xml | 9 + 1 file changed, 9 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 0ec9857e2..ec32dc

[libvirt] [PATCH v2.1 1/2] qemu: Add support for hot unplug redirdev device

2017-12-07 Thread Chen Hanxiao
From: Chen Hanxiao We lacked of hot unplugging redirdev device. This patch add support for it. We could use detach-device --live now. Signed-off-by: Chen Hanxiao --- v2.1: rebase on master src/qemu/qemu_driver.c | 4 +- src/qemu/qemu_hotplug.c | 111

Re: [libvirt] [PATCH v2.1 0/2] Add support for hot unplug redirdev

2017-12-12 Thread Chen Hanxiao
At 2017-12-07 18:42:37, "Chen Hanxiao" wrote: >v2.1: >split original patch into a patchset, put News in a seperate patch > >Chen Hanxiao (2): > qemu: Add support for hot unplug redirdev device > news: add change of hot unplug redirdev > > docs/news.x

[libvirt] [PATCH] qemu: hotplug: unify "not found" logs when detaching device

2017-12-14 Thread Chen Hanxiao
From: Chen Hanxiao Some services, such as Nova, check whether device was not found by errror messages "not found". [1] This patch unify logs of qemuDomainDetachDeviceLive, which will be helpful. [1] https://github.com/openstack/nova/blob/master/nova/virt/libvirt/guest.py#L406 Sig

Re: [libvirt] [PATCH] qemu: hotplug: unify "not found" logs when detaching device

2017-12-15 Thread Chen Hanxiao
At 2017-12-16 09:26:32, "John Ferlan" wrote: > > >On 12/14/2017 06:16 AM, Chen Hanxiao wrote: >> From: Chen Hanxiao >> >> Some services, such as Nova, check whether device was not found >> by errror messages "not found&

[libvirt] [PATCH] deamon: TLS: use default value if ca_file, cert_file or key_file not set

2017-12-17 Thread Chen Hanxiao
From: Chen Hanxiao As the description of daemon/libvirtd.conf, setting key_file, cert_file or key_file will override the default value. But if we set any one of them, we need to set all the rest of them. This patch set default value to them as daemon/libvirtd.conf described. Signed-off-by

Re: [libvirt] [PATCH] qemu: Introduce qemuDomainDelChardevTLSObjects

2017-12-19 Thread Chen Hanxiao
ining the copy and pasted code. > >Signed-off-by: John Ferlan >--- > > An offshoot of the redirdev hot unplug patches from Chen Hanxiao. > Let's create a helper that can remove the TLS chardev objects for > the specific devices that may have used them. > Reviewed-by: Chen Ha

Re: [libvirt] [PATCH] qemu: hotplug: unify "not found" logs when detaching device

2017-12-20 Thread Chen Hanxiao
At 2017-12-18 21:57:11, "John Ferlan" wrote: > > >On 12/15/2017 09:50 PM, Chen Hanxiao wrote: >> >> >> At 2017-12-16 09:26:32, "John Ferlan" wrote: >>> >>> >>> On 12/14/2017 06:16 AM, Chen Hanxiao wrote: >>>&g

[libvirt] [PATCH] qemu_hotplug: use VIR_ERR_NO_DEVICE when target detaching device is not found

2017-12-20 Thread Chen Hanxiao
From: Chen Hanxiao We used VIR_ERR_OPERATION_FAILED when target detaching device is not found. That error code VIR_ERR_OPERATION_FAILED is widely used, so the tools powered by libvirt, such as nova, can't catch the exact errors from libvirt. This patch uses VIR_ERR_NO_DEVICE instead. Signe

Re: [libvirt] [PATCH v2/1] qemu: Move TCP and haveTLS checks into qemuDomainDelChardevTLSObjects

2017-12-20 Thread Chen Hanxiao
t; the morning" I realized I could/should have taken the next step to check > the chardev source for TCP and haveTLS being set similar to how the Add > code does things. So that's what this patch does. > Ahh, more helpful helper. Reviewed-by: Chen Hanxiao Regards, - Chen --

[libvirt] [PATCH v3 1/2] qemu: Add support for hot unplugging redirdev device which can use the detach-device --live

2017-12-22 Thread Chen Hanxiao
From: Chen Hanxiao We lacked of hot unplugging redirdev device. This patch add support for it. We could use detach-device --live now. Signed-off-by: Chen Hanxiao --- v3: use helper qemuDomainDelChardevTLSObjects address John's comments v2: rebase on master src/qemu/qemu_driver.c

[libvirt] [PATCH v3 2/2] news: add change of hot unplug redirdev

2017-12-22 Thread Chen Hanxiao
From: Chen Hanxiao Add hot unplug redirdev in news 'Improvements' section Signed-off-by: Chen Hanxiao --- v3: move it into 'Improvements' section docs/news.xml | 11 +++ 1 file changed, 11 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index bb611b7

[libvirt] [PATCH v3 0/2] qemu: Add support for hot unplugging

2017-12-22 Thread Chen Hanxiao
v3: use helper qemuDomainDelChardevTLSObjects and address some comments v2: rebased on master Chen Hanxiao (2): qemu: Add support for hot unplugging redirdev device which can use the detach-device --live news: add change of hot unplug redirdev docs/news.xml | 11

[libvirt] [PATCH] util: fix a wrong description

2017-12-23 Thread Chen Hanxiao
From: Chen Hanxiao We don't have @result. Use the right one: @matches Signed-off-by: Chen Hanxiao --- src/util/virstring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virstring.c b/src/util/virstring.c index b2ebce27f..0cb06bdc9 100644 --- a/src

[libvirt] [PATCH] domain_conf: skip boot order check of CD-ROM or floppy device

2017-12-25 Thread Chen Hanxiao
From: Chen Hanxiao If we insert or eject a CD-ROM/floppy device with a boot order, we may get: unsupported configuration: boot order 2 is already used by another device This check should be skipped in this case. Signed-off-by: Chen Hanxiao --- src/conf/domain_conf.c | 16

Re: [libvirt] [PATCH] util: fix a wrong description

2018-01-03 Thread Chen Hanxiao
At 2018-01-03 17:46:02, "Ján Tomko" wrote: >On Sat, Dec 23, 2017 at 05:49:08PM +0800, Chen Hanxiao wrote: >>From: Chen Hanxiao >> >>We don't have @result. Use the right one: @matches >> >>Signed-off-by: Chen Hanxiao >>--- >> src/

[libvirt] [PATCH] util: fix another wrong description

2018-01-03 Thread Chen Hanxiao
From: Chen Hanxiao commit 9026d1152c236ac7a7ab25845220a8e14d6bc630 forgot to change the referenced @result variable. This patch completed this. Signed-off-by: Chen Hanxiao --- src/util/virstring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virstring.c b/src

[libvirt] [PATCH v4 2/2] news: add change of hot unplug redirdev

2018-01-04 Thread Chen Hanxiao
From: Chen Hanxiao Reviewed-by: John Ferlan Signed-off-by: Chen Hanxiao --- v4: remove part v3: move it into 'Improvements' section docs/news.xml | 5 + 1 file changed, 5 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index bb611b7ba..838dd5b39 100644 --- a/doc

[libvirt] [PATCH v4 1/2] qemu: Add support for hot unplugging redirdev device which can use the detach-device --live

2018-01-04 Thread Chen Hanxiao
From: Chen Hanxiao Commit id '162efa1a' added support hotplug a redirdev, but did not add the hot unplug. This patch will add that support to allow usage of the detach-device --live on the device. Reviewed-by: John Ferlan Signed-off-by: Chen Hanxiao --- v4: commit message chang

[libvirt] [PATCH v4 0/2] qemu: Add support for hot unplugging redirdev

2018-01-04 Thread Chen Hanxiao
v4: update commit messages and news v3: use helper qemuDomainDelChardevTLSObjects and address some comments v2: rebased on master Chen Hanxiao (2): qemu: Add support for hot unplugging redirdev device which can use the detach-device --live news: add change of hot unplug redirdev

[libvirt] [PATCH v2 2/2] qemu_hotplug: introduce VIR_ERR_DEVICE_MISSING for failing to find desired device

2018-01-05 Thread Chen Hanxiao
From: Chen Hanxiao We used VIR_ERR_OPERATION_FAILED when target detaching device is not found. That error code VIR_ERR_OPERATION_FAILED is widely used, so the tools powered by libvirt, such as nova, can't catch the exact errors from libvirt. This patch introduce VIR_ERR_DEVICE_MISSING for

[libvirt] [PATCH v2 0/2] qemu_hotplug: introduce VIR_ERR_DEVICE_MISSING for failing to find the desired device

2018-01-05 Thread Chen Hanxiao
We used VIR_ERR_OPERATION_INVALID for failing to find the desired device. But this error code is widely used. This brings troubles to the project(i.e nova) powered by libvirt, they had to analyze error messages to find out what had happened. Chen Hanxiao (2): qemu_hotplug: more proper error

[libvirt] [PATCH v2 1/2] qemu_hotplug: more proper error messages when target detaching device is not found

2018-01-05 Thread Chen Hanxiao
From: Chen Hanxiao More proper/detail error messages updated. Signed-off-by: Chen Hanxiao --- src/libvirt_private.syms | 2 ++ src/qemu/qemu_hotplug.c | 42 +- 2 files changed, 31 insertions(+), 13 deletions(-) diff --git a/src/libvirt_private.syms b

[libvirt] [PATCH v4.1 2/2] news: add change of hot unplug redirdev

2018-01-05 Thread Chen Hanxiao
From: Chen Hanxiao Reviewed-by: John Ferlan Signed-off-by: Chen Hanxiao --- v4: remove part v3: move it into 'Improvements' section docs/news.xml | 5 + 1 file changed, 5 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index bb611b7ba..838dd5b39 100644 --- a/doc

[libvirt] [PATCH v4.1 0/2] qemu: Add support for hot unplugging redirdev

2018-01-05 Thread Chen Hanxiao
v4.1: call qemuDomainRemoveRedirdevDevice in qemuDomainRemoveDevice v4: update commit messages and news v3: use helper qemuDomainDelChardevTLSObjects and address some comments v2: rebased on master Chen Hanxiao (2): qemu: Add support for hot unplugging redirdev device which can use

[libvirt] [PATCH v4.1 1/2] qemu: Add support for hot unplugging redirdev device which can use the detach-device --live

2018-01-05 Thread Chen Hanxiao
From: Chen Hanxiao Commit id '162efa1a' added support hotplug a redirdev, but did not add the hot unplug. This patch will add that support to allow usage of the detach-device --live on the device. Reviewed-by: John Ferlan Signed-off-by: Chen Hanxiao --- v4

Re: [libvirt] [PATCH v3 1/2] qemu: Add support for hot unplugging redirdev device which can use the detach-device --live

2018-01-05 Thread Chen Hanxiao
在 2018-01-05 21:16:20,"John Ferlan" 写道: > > >On 01/05/2018 05:40 AM, Ján Tomko wrote: >> On Fri, Dec 22, 2017 at 04:04:03PM +0800, Chen Hanxiao wrote: >>> From: Chen Hanxiao >>> [...] >>> +    if ((ret = qemuDomainWaitForDeviceRemoval(vm)) ==

Re: [libvirt] [PATCH] domain_conf: skip boot order check of CD-ROM or floppy device

2018-01-05 Thread Chen Hanxiao
At 2018-01-05 23:01:50, "John Ferlan" wrote: > > >On 12/25/2017 06:21 AM, Chen Hanxiao wrote: >> From: Chen Hanxiao >> >> If we insert or eject a CD-ROM/floppy device with a boot order, >> we may get: >> unsupported configuration: boot orde

[libvirt] [PATCH v2] domain_conf: skip boot order check of CD-ROM or floppy device when change-media

2018-01-11 Thread Chen Hanxiao
From: Chen Hanxiao If we insert or eject a CD-ROM/floppy device by: 'virsh change-media VM --eject/--insert some.iso --live', and the original CD-ROM device was configed with a boot order, we may get: unsupported configuration: boot order 2 is already used by another device We ju

Re: [libvirt] [PATCH v2] domain_conf: skip boot order check of CD-ROM or floppy device when change-media

2018-01-12 Thread Chen Hanxiao
At 2018-01-11 21:36:29, "Ján Tomko" wrote: >On Thu, Jan 11, 2018 at 06:16:37PM +0800, Chen Hanxiao wrote: >>From: Chen Hanxiao >> >>If we insert or eject a CD-ROM/floppy device by: >> 'virsh change-media VM --eject/--insert some.iso --live', >&

[libvirt] [resend][PATCH] deamon: use default value if ca_file, cert_file or key_file not set

2018-01-12 Thread Chen Hanxiao
From: Chen Hanxiao As the description of daemon/libvirtd.conf, setting key_file, cert_file or key_file will override the default value. But if we set any one of them, we need to set all the rest of them. This patch set default value to them as daemon/libvirtd.conf described. Signed-off-by

Re: [libvirt] [resend][PATCH] deamon: use default value if ca_file, cert_file or key_file not set

2018-01-12 Thread Chen Hanxiao
At 2018-01-12 17:44:38, "Jiri Denemark" wrote: >On Fri, Jan 12, 2018 at 17:09:10 +0800, Chen Hanxiao wrote: >> From: Chen Hanxiao >> >> As the description of daemon/libvirtd.conf, setting >> key_file, cert_file or key_file will override the default value.

[libvirt] [PATCH] libvirtd: clarify the TLS conf default vaule setting

2018-01-12 Thread Chen Hanxiao
From: Chen Hanxiao As the description of daemon/libvirtd.conf, setting key_file, cert_file or key_file will override the default value. But if we set any one of them, we need to set all the rest of them. This patch clarify that description. Signed-off-by: Chen Hanxiao --- daemon

[libvirt] [PATCH v2] libvirtd: clarify the TLS conf default vaule setting

2018-01-12 Thread Chen Hanxiao
From: Chen Hanxiao As the description of daemon/libvirtd.conf, setting key_file, cert_file or key_file will override the default value. But if we set any one of them, we need to set all the rest of them. This patch clarify that description. Signed-off-by: Chen Hanxiao --- v2: fix a typo

[libvirt] [PATCH v3] libvirtd: clarify the TLS conf default value setting

2018-01-21 Thread Chen Hanxiao
From: Chen Hanxiao Provide more details related to the requirement that setting one of the values requires setting all of them. Signed-off-by: Chen Hanxiao --- v3: description updated follow John's comments v2: fix a typo daemon/libvirtd.conf | 14 ++ 1 file change

[libvirt] [PATCH v3 5/5] news: Add VIR_ERR_DEVICE_MISSING change as improvements

2018-01-22 Thread Chen Hanxiao
From: Chen Hanxiao Signed-off-by: Chen Hanxiao --- docs/news.xml | 5 + 1 file changed, 5 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index b4d980624..5798f42d8 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -37,6 +37,11

[libvirt] [PATCH v3 3/5] qemu: Use VIR_ERR_DEVICE_MISSING for various hotplug messages

2018-01-22 Thread Chen Hanxiao
From: Chen Hanxiao Modify OPERATION_FAILED error codes to use DEVICE_MISSING instead. Signed-off-by: Chen Hanxiao --- v3: modify virDomainNetFindIdx to use VIR_ERR_DEVICE_MISSING src/conf/domain_conf.c | 8 src/qemu/qemu_hotplug.c | 24 2 files changed

[libvirt] [PATCH v3 0/5] Introduce VIR_ERR_DEVICE_MISSING

2018-01-22 Thread Chen Hanxiao
Use Introduce VIR_ERR_DEVICE_MISSING for hotplug and detach device error message. Chen Hanxiao (5): qemu: Add some more details for hotplug errors when device not found qemu: Introduce VIR_ERR_DEVICE_MISSING qemu: Use VIR_ERR_DEVICE_MISSING for various hotplug messages qemu: Use

[libvirt] [PATCH v3 2/5] qemu: Introduce VIR_ERR_DEVICE_MISSING

2018-01-22 Thread Chen Hanxiao
From: Chen Hanxiao Add new error code to be able to allow consumers (such as Nova) to be able to key of a specific error code rather than needing to search the error message." Signed-off-by: Chen Hanxiao --- v3: commit message updated include/libvirt/virterror.h | 1 + src/util/virer

[libvirt] [PATCH v3 4/5] qemu: Use VIR_ERR_DEVICE_MISSING for various DetachDeviceConfig messages

2018-01-22 Thread Chen Hanxiao
From: Chen Hanxiao Modify OPERATION_FAILED error codes to use DEVICE_MISSING instead. Signed-off-by: Chen Hanxiao --- src/qemu/qemu_driver.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index

[libvirt] [PATCH v3 1/5] qemu: Add some more details for hotplug errors when device not found

2018-01-22 Thread Chen Hanxiao
From: Chen Hanxiao More proper/detail error messages updated. Signed-off-by: Chen Hanxiao --- v3: subject changed. some description of logs changed. src/libvirt_private.syms | 2 ++ src/qemu/qemu_hotplug.c | 35 +++ 2 files changed, 25 insertions(+), 12

[libvirt] [PATCH] qemu: get VM's ip address from the output of arp command

2018-01-23 Thread Chen Hanxiao
From: Chen Hanxiao Introduce VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP to get ip address of VM from the output of `arp -an` command. We can use: domifaddr f26-cloud --source arp to get the address. Signed-off-by: Chen Hanxiao --- include/libvirt/libvirt-domain.h | 1 + src/qemu

Re: [libvirt] [PATCH] qemu: get VM's ip address from the output of arp command

2018-01-24 Thread Chen Hanxiao
At 2018-01-24 02:01:27, "Martin Kletzander" wrote: >On Tue, Jan 23, 2018 at 03:40:02PM +0800, Chen Hanxiao wrote: >>From: Chen Hanxiao >> >>Introduce VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP to get ip address >>of VM from the output of `arp -an`

[libvirt] [PATCH v2 4/4] news: qemu: use arp table of host to get the IP address of guests

2018-01-24 Thread Chen Hanxiao
From: Chen Hanxiao Signed-off-by: Chen Hanxiao --- docs/news.xml | 5 + 1 file changed, 5 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index b9e04c632..105917f4d 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -47,6 +47,11 @@ interfaces, NWFilters, and so on

[libvirt] [PATCH v2 2/4] qemu: introduce qemuARPGetInterfaces to get IP from host's arp table

2018-01-24 Thread Chen Hanxiao
From: Chen Hanxiao introduce VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP to get ip address of VM from the output of /proc/net/arp Signed-off-by: Chen Hanxiao --- include/libvirt/libvirt-domain.h | 1 + src/qemu/qemu_driver.c | 75 2 files changed

[libvirt] [PATCH v2 3/4] virsh: add --source arp to domifaddr

2018-01-24 Thread Chen Hanxiao
From: Chen Hanxiao We can use: domifaddr f26-cloud --source arp to get the address. Signed-off-by: Chen Hanxiao --- tools/virsh-domain-monitor.c | 2 ++ tools/virsh.pod | 7 --- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/virsh-domain-monitor.c b

[libvirt] [PATCH v2 1/4] util: introduce helper to parse /proc/net/arp

2018-01-24 Thread Chen Hanxiao
From: Chen Hanxiao introduce helper to parse /proc/net/arp and store it in struct virArpTable. Signed-off-by: Chen Hanxiao --- src/libvirt_private.syms | 2 ++ src/util/virmacaddr.c| 67 src/util/virmacaddr.h| 18 + 3 files

[libvirt] [PATCH v2 0/4] qemu: use arp table of host to get the

2018-01-24 Thread Chen Hanxiao
introduce VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP to get ip address of VM from the output of /proc/net/arp Chen Hanxiao (4): util: introduce helper to parse /proc/net/arp qemu: introduce qemuARPGetInterfaces to get IP from host's arp table virsh: add --source arp to domifaddr news:

[libvirt] [PATCH v3 1/4] util: introduce helper to parse /proc/net/arp

2018-01-29 Thread Chen Hanxiao
From: Chen Hanxiao introduce helper to parse /proc/net/arp and store it in struct virArpTable. Signed-off-by: Chen Hanxiao --- v3: s/virGetArpTable/virArpTableGet alloc virArpTable in virArpTableGet return ENOSUPP on none-Linux platform move helpers to virarptable.[ch] po/POTFILES.in

[libvirt] [PATCH v3 2/4] qemu: introduce qemuARPGetInterfaces to get IP from host's arp table

2018-01-29 Thread Chen Hanxiao
From: Chen Hanxiao introduce VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP to get ip address of VM from the output of /proc/net/arp Signed-off-by: Chen Hanxiao --- v3: add docs in virDomainInterfaceAddresses remove error label show network interface which did not match the arp table include

[libvirt] [PATCH v3 3/4] virsh: add --source arp to domifaddr

2018-01-29 Thread Chen Hanxiao
From: Chen Hanxiao We can use: domifaddr f26-cloud --source arp to get the address. Acked-by: Michal Privoznik Signed-off-by: Chen Hanxiao --- tools/virsh-domain-monitor.c | 2 ++ tools/virsh.pod | 7 --- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tools

[libvirt] [PATCH v3 4/4] news: qemu: use arp table of host to get the IP address of guests

2018-01-29 Thread Chen Hanxiao
From: Chen Hanxiao Signed-off-by: Chen Hanxiao --- v3: more verbose description docs/news.xml | 9 + 1 file changed, 9 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 2268fdf79..706546e6d 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -56,6 +56,15

[libvirt] [PATCH v3 0/4] qemu: use arp table of host to get the

2018-01-29 Thread Chen Hanxiao
introduce VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP to get ip address of VM from the output of /proc/net/arp Chen Hanxiao (4): util: introduce helper to parse /proc/net/arp qemu: introduce qemuARPGetInterfaces to get IP from host's arp table virsh: add --source arp to domifaddr news:

Re: [libvirt] [PATCH v3 2/5] qemu: Introduce VIR_ERR_DEVICE_MISSING

2018-01-31 Thread Chen Hanxiao
At 2018-01-31 23:32:35, "John Ferlan" wrote: > > >On 01/22/2018 11:24 PM, Chen Hanxiao wrote: >> From: Chen Hanxiao >> >> Add new error code to be able to allow consumers (such as Nova) to be >> able to key of a specific error code rather

Re: [libvirt] [PATCH v3 3/5] qemu: Use VIR_ERR_DEVICE_MISSING for various hotplug messages

2018-01-31 Thread Chen Hanxiao
At 2018-01-31 23:33:35, "John Ferlan" wrote: > > >On 01/22/2018 11:24 PM, Chen Hanxiao wrote: >> From: Chen Hanxiao >> >> Modify OPERATION_FAILED error codes to use DEVICE_MISSING instead. > >I'll modify this one to: > >Modify

[libvirt] [PATCH perl] perl: Add ERR_DEVICE_MISSING constants

2018-01-31 Thread Chen Hanxiao
From: Chen Hanxiao Signed-off-by: Chen Hanxiao --- Changes | 2 +- Virt.xs | 1 + lib/Sys/Virt/Error.pm | 4 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index eda3ec5..22d5752 100644 --- a/Changes +++ b/Changes @@ -2,7 +2,7

Re: [libvirt] [PATCH v3 4/5] qemu: Use VIR_ERR_DEVICE_MISSING for various DetachDeviceConfig messages

2018-01-31 Thread Chen Hanxiao
At 2018-01-31 23:34:55, "John Ferlan" wrote: > >Let's alter the commit message to be more similar to patch 3/5, e.g.: > >qemu: Use VIR_ERR_DEVICE_MISSING for various coldplug messages > >On 01/22/2018 11:24 PM, Chen Hanxiao wrote: >> From: Chen Hanxia

[libvirt] [PATCH go] go: Add ERR_DEVICE_MISSING constants

2018-01-31 Thread Chen Hanxiao
From: Chen Hanxiao Signed-off-by: Chen Hanxiao --- error.go | 3 +++ error_compat.h | 6 ++ 2 files changed, 9 insertions(+) diff --git a/error.go b/error.go index fb218f7..9de277c 100644 --- a/error.go +++ b/error.go @@ -353,6 +353,9 @@ const ( // error in libssh

Re: [libvirt] [PATCH v3 1/4] util: introduce helper to parse /proc/net/arp

2018-02-06 Thread Chen Hanxiao
At 2018-01-29 20:01:30, "Peter Krempa" wrote: >On Mon, Jan 29, 2018 at 16:35:33 +0800, Chen Hanxiao wrote: >> From: Chen Hanxiao >> >> introduce helper to parse /proc/net/arp and >> store it in struct virArpTable. >> >> Signed-off-by: Chen H

[libvirt] [PATCH] util: netlink: fix the mismatch parameter description of functions

2018-02-06 Thread Chen Hanxiao
From: Chen Hanxiao Some of netlink functions don't have the right @parameters description according to the declaration of function. This patch fix them. Signed-off-by: Chen Hanxiao --- src/util/virnetlink.c | 35 ++- 1 file changed, 18 insertions(+

[libvirt] [PATCH v4 0/5] qemu: use arp table of host to get the

2018-02-07 Thread Chen Hanxiao
introduce VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP to get ip address of VM from the output of /proc/net/arp Chen Hanxiao (5): util: introduce virNetlinkGetNeighbor to get neighbor table entry util: introduce helper to parse message from RTM_GETNEIGH query qemu: introduce qemuARPGetInterfaces

[libvirt] [PATCH v4 4/5] virsh: add --source arp to domifaddr

2018-02-07 Thread Chen Hanxiao
From: Chen Hanxiao We can use: domifaddr f26-cloud --source arp to get the address. Acked-by: Michal Privoznik Signed-off-by: Chen Hanxiao --- tools/virsh-domain-monitor.c | 2 ++ tools/virsh.pod | 7 --- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tools

[libvirt] [PATCH v4 3/5] qemu: introduce qemuARPGetInterfaces to get IP from host's arp table

2018-02-07 Thread Chen Hanxiao
From: Chen Hanxiao introduce VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP to get ip address of VM from the message of netlink RTM_GETNEIGH Signed-off-by: Chen Hanxiao --- v4: remove dummy entry use VIR_APPEND_ELEMENT v3: add docs in virDomainInterfaceAddresses remove error label show

[libvirt] [PATCH v4 2/5] util: introduce helper to parse message from RTM_GETNEIGH query

2018-02-07 Thread Chen Hanxiao
From: Chen Hanxiao introduce helper to parse RTM_GETNEIGH query message and store it in struct virArpTable. Signed-off-by: Chen Hanxiao --- v4: use netlink query instead of parsing /proc/net/arp v3: s/virGetArpTable/virArpTableGet alloc virArpTable in virArpTableGet return ENOSUPP on

[libvirt] [PATCH v4 1/5] util: introduce virNetlinkGetNeighbor to get neighbor table entry

2018-02-07 Thread Chen Hanxiao
From: Chen Hanxiao use RTM_GETNEIGH to query arp table entry by netlink socket Signed-off-by: Chen Hanxiao --- v4: use netlink to get arp table entry src/libvirt_private.syms | 1 + src/util/virnetlink.c| 82 src/util/virnetlink.h

[libvirt] [PATCH v4 5/5] news: qemu: use arp table of host to get the IP address of guests

2018-02-07 Thread Chen Hanxiao
From: Chen Hanxiao Signed-off-by: Chen Hanxiao --- v3: more verbose description docs/news.xml | 9 + 1 file changed, 9 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 5a2943a58..5d6a467d3 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -72,6 +72,15

Re: [libvirt] [PATCH] qemu: Alter condition to avoid possible NULL deref

2018-02-09 Thread Chen Hanxiao
& > watchdog->action == dev->action && > virDomainDeviceInfoAddressIsEqual(&dev->info, &watchdog->info))) { > virReportError(VIR_ERR_DEVICE_MISSING, >-- Reviewed-by: Chen Hanxiao Regards, - Chen -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH] qemu: don't leak in qemuGetDHCPInterfaces when failing to alloc

2018-02-10 Thread Chen Hanxiao
From: Chen Hanxiao We forgot to free alloced mem when failed to dup ifname or macaddr. Also use VIR_STEAL_PTR to simplify codes. Signed-off-by: Chen Hanxiao --- src/qemu/qemu_agent.c | 3 +-- src/qemu/qemu_driver.c | 7 +++ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a

Re: [libvirt] [PATCH v4 0/5] qemu: use arp table of host to get the

2018-02-21 Thread Chen Hanxiao
At 2018-02-08 15:46:59, "Chen Hanxiao" wrote: >introduce VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP to get ip address >of VM from the output of /proc/net/arp > >Chen Hanxiao (5): > util: introduce virNetlinkGetNeighbor to get neighbor table entry > util: introduce

[libvirt] [PATCH rebase v4 2/5] util: introduce helper to parse message from RTM_GETNEIGH query

2018-03-07 Thread Chen Hanxiao
From: Chen Hanxiao introduce helper to parse RTM_GETNEIGH query message and store it in struct virArpTable. Signed-off-by: Chen Hanxiao --- v4-rebase: fit split Makefile.am fit new virMacAddr fields v4: use netlink query instead of parsing /proc/net/arp v3: s/virGetArpTable

[libvirt] [PATCH rebase v4 4/5] virsh: add --source arp to domifaddr

2018-03-07 Thread Chen Hanxiao
From: Chen Hanxiao We can use: domifaddr f26-cloud --source arp to get the address. Acked-by: Michal Privoznik Signed-off-by: Chen Hanxiao --- tools/virsh-domain-monitor.c | 2 ++ tools/virsh.pod | 7 --- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tools

[libvirt] [PATCH rebase v4 3/5] qemu: introduce qemuARPGetInterfaces to get IP from host's arp table

2018-03-07 Thread Chen Hanxiao
From: Chen Hanxiao introduce VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP to get ip address of VM from the message of netlink RTM_GETNEIGH Signed-off-by: Chen Hanxiao --- v4: remove dummy entry use VIR_APPEND_ELEMENT v3: add docs in virDomainInterfaceAddresses remove error label show

[libvirt] [PATCH rebase v4 0/5] qemu: use arp table of host to get the

2018-03-07 Thread Chen Hanxiao
introduce VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP to get ip address of VM from the output of /proc/net/arp Chen Hanxiao (5): util: introduce virNetlinkGetNeighbor to get neighbor table entry util: introduce helper to parse message from RTM_GETNEIGH query qemu: introduce qemuARPGetInterfaces

[libvirt] [PATCH rebase v4 1/5] util: introduce virNetlinkGetNeighbor to get neighbor table entry

2018-03-07 Thread Chen Hanxiao
From: Chen Hanxiao use RTM_GETNEIGH to query arp table entry by netlink socket Signed-off-by: Chen Hanxiao --- v4: use netlink to get arp table entry src/libvirt_private.syms | 1 + src/util/virnetlink.c| 82 src/util/virnetlink.h

[libvirt] [PATCH rebase v4 5/5] news: qemu: use arp table of host to get the IP address of guests

2018-03-07 Thread Chen Hanxiao
From: Chen Hanxiao Signed-off-by: Chen Hanxiao --- v4: rebase on 4.2 v3: more verbose description docs/news.xml | 9 + 1 file changed, 9 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index a51ca973e..6d729d508 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -46,6

Re: [libvirt] [PATCH rebase v4 0/5] qemu: use arp table of host to get the

2018-03-15 Thread Chen Hanxiao
At 2018-03-08 15:11:54, "Chen Hanxiao" wrote: >introduce VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP to get ip address >of VM from the output of /proc/net/arp > >Chen Hanxiao (5): > util: introduce virNetlinkGetNeighbor to get neighbor table entry > util: introduce

Re: [libvirt] [PATCH rebase v4 0/5] qemu: use arp table of host to get the

2018-03-15 Thread Chen Hanxiao
At 2018-03-15 18:23:03, "Michal Privoznik" wrote: >On 03/08/2018 08:11 AM, Chen Hanxiao wrote: >> introduce VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP to get ip address >> of VM from the output of /proc/net/arp >> >> Chen Hanxiao (5): >> util: intr

Re: [libvirt] [PATCH 1/2] src: Don't add virarptable.c to setuid library

2018-03-15 Thread Chen Hanxiao
nged, 1 deletion(-) > My fault. Thanks. Reviewed-by: Chen Hanxiao Regards, - Chen -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 2/2] virarptable: Include rtnetlink.h only on Linux

2018-03-15 Thread Chen Hanxiao
BLE_H__ > > # include "internal.h" >-# include > > typedef struct _virArpTableEntry virArpTableEntry; > typedef virArpTableEntry *virArpTableEntryPtr; >-- Reviewed-by: Chen Hanxiao Regards, - Chen -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH] virsh: add missing help info of --source to domifaddr

2018-03-15 Thread Chen Hanxiao
From: Chen Hanxiao commit b4b5c82ce forgot to add this. Signed-off-by: Chen Hanxiao --- tools/virsh-domain-monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c index 68da11ed5..0f768d394 100644 --- a/tools

[libvirt] [PATCH 0/2] virarptable: fix some leaks and format

2018-03-17 Thread Chen Hanxiao
Address John's comment on v4 Chen Hanxiao (2): virarptable: fix some leaks and format issue qemu: fix some leaks src/qemu/qemu_driver.c | 3 +++ src/util/virarptable.c | 13 +++-- 2 files changed, 14 insertions(+), 2 deletions(-) -- 2.14.3 -- libvir-list mailing list libvir

Re: [libvirt] [PATCH rebase v4 2/5] util: introduce helper to parse message from RTM_GETNEIGH query

2018-03-17 Thread Chen Hanxiao
At 2018-03-16 18:53:58, "John Ferlan" wrote: > > >On 03/08/2018 02:11 AM, Chen Hanxiao wrote: >> From: Chen Hanxiao >> >> introduce helper to parse RTM_GETNEIGH query message and >> store it in struct virArpTable. >> >> Signed-of

[libvirt] [PATCH 1/2] virarptable: fix some leaks and format issue

2018-03-17 Thread Chen Hanxiao
From: Chen Hanxiao fix some leaks and format issue Also support virArpTableFree to get NULL. Signed-off-by: Chen Hanxiao --- src/util/virarptable.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/util/virarptable.c b/src/util/virarptable.c index

<    1   2   3   4   5   6   >