[libvirt] [PATCH] libvirt supports Guest Panicked

2013-05-27 Thread Chen Fan
From: chenfan chen.fan.f...@cn.fujitsu.com This patch implements qemu_driver supporting guest panicked, modified the 'on_crash' default value to 'preserve'. --- examples/domain-events/events-c/event-test.c | 10 +++ include/libvirt/libvirt.h.in | 16 + src/conf/domain_conf.c

[libvirt] [PATCH v2] libvirt supports Guest Panicked

2013-05-28 Thread Chen Fan
From: ChenFan chen.fan.f...@cn.fujitsu.com This patch implements qemu_driver supporting guest panicked. we crashed the guest while libvirt isn't running, then restart libvirtd, we change the domain state to 'crashed'. --- examples/domain-events/events-c/event-test.c | 10 +++

[libvirt] [PATCH v3 3/3] virsh: supports guest panicked

2013-05-28 Thread Chen Fan
Add 'virsh domstate --reason' command is effective when domain crashed. --- tools/virsh-domain-monitor.c | 8 1 file changed, 8 insertions(+) diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c index 5ed89d1..4bddefe 100644 --- a/tools/virsh-domain-monitor.c +++

[libvirt] [PATCH v3 2/3] qemu: Supports guest panicked

2013-05-28 Thread Chen Fan
Add monitor callback API domainGUESTPanicked, that implements the 'on_crash' behavior in the XML when domain crashed. --- src/qemu/qemu_monitor.c | 14 +- src/qemu/qemu_monitor.h | 5 +++ src/qemu/qemu_monitor_json.c | 7 +++ src/qemu/qemu_process.c | 103

[libvirt] [PATCH v3 0/3] libvirt supports Guest panicked

2013-05-28 Thread Chen Fan
This patchs implement the 'on_crash' behavior in the XML example XML: on_crashdestroy/on_crash Changes: v2-v3: 1. split into 3 patches v1-v2: 1. fix the incorrect domain state: paused - crashed, when crash the guest while libvirt isn't running, then restart libvirtd. Chen

[libvirt] [PATCH v3 1/3] libvirt: Define domain crash event types

2013-05-28 Thread Chen Fan
This patch introduces domain crashed types and crashed reasons which will be used while guest panicked. --- examples/domain-events/events-c/event-test.c | 10 ++ include/libvirt/libvirt.h.in | 16 src/conf/domain_conf.c | 12

[libvirt] [PATCH v4 1/5] libvirt: Define domain crash event types

2013-06-02 Thread Chen Fan
This patch introduces domain crashed types and crashed reasons which will be used while guest panicked. --- examples/domain-events/events-c/event-test.c | 10 ++ include/libvirt/libvirt.h.in | 16 src/conf/domain_conf.c | 12

[libvirt] [PATCH v4 0/5] libvirt supports Guest Panicked

2013-06-02 Thread Chen Fan
running, then restart libvirtd. Chen Fan (5): libvirt: Define domain crash event types qemu: Supports guest panicked virsh: supports guest panicked libvirt: Define crash dumpcore events in watchdogAction. qemu: Implement the oncrash events in processWatchdogEvent. examples/domain

[libvirt] [PATCH v4 4/5] libvirt: Define crash dumpcore events in watchdogAction

2013-06-02 Thread Chen Fan
We want to implement the oncrash actions through the thread Pool. so need to define several types for Implementing that options in watchdogAction. --- src/conf/domain_conf.c | 4 src/conf/domain_conf.h | 4 2 files changed, 8 insertions(+) diff --git a/src/conf/domain_conf.c

[libvirt] [PATCH v4 2/5] qemu: Supports guest panicked

2013-06-02 Thread Chen Fan
Add monitor callback API domainGUESTPanicked, that implements the 'on_crash' behavior in the XML when domain crashed. --- src/qemu/qemu_monitor.c | 14 +- src/qemu/qemu_monitor.h | 5 +++ src/qemu/qemu_monitor_json.c | 7 +++ src/qemu/qemu_process.c | 103

[libvirt] [PATCH v4 3/5] virsh: supports guest panicked

2013-06-02 Thread Chen Fan
Add 'virsh domstate --reason' command is effective when domain crashed. --- tools/virsh-domain-monitor.c | 8 1 file changed, 8 insertions(+) diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c index 5ed89d1..4bddefe 100644 --- a/tools/virsh-domain-monitor.c +++

[libvirt] [PATCH v4 5/5] qemu: Implement the oncrash events in processWatchdogEvent

2013-06-02 Thread Chen Fan
Through the watchdog actions, we can implement the docoredump func, we rewrite the processWatchdogEvent function to serval independent functions, so we move the previous implementation of the destroy and restart code to here. then the code looks like easy. --- src/qemu/qemu_driver.c | 197

[libvirt] [PATCH v6 4/5] qemu: Implement 'oncrash' events when guest panicked

2013-06-07 Thread Chen Fan
Add monitor callback API domainGuestPanic, that implements 'destroy', 'restart' and 'preserve' events of the 'on_crash' in the XML when domain crashed. --- src/qemu/qemu_domain.h | 1 + src/qemu/qemu_driver.c | 92 src/qemu/qemu_monitor.c

[libvirt] [PATCH v6 1/5] libvirt: Define domain crash event types

2013-06-07 Thread Chen Fan
This patch introduces domain crashed types and crashed reasons which will be used while guest panicked. --- examples/domain-events/events-c/event-test.c | 10 ++ include/libvirt/libvirt.h.in | 16 src/conf/domain_conf.c | 12

[libvirt] [PATCH v6 0/5] libvirt supports Guest Panicked

2013-06-07 Thread Chen Fan
to processWatchdogEvent(). v2-v3: 1. split into 3 patches v1-v2: 1. fix the incorrect domain state: paused - crashed, when crash the guest while libvirt isn't running, then restart libvirtd. Chen Fan (5): libvirt: Define domain crash event types qemu: Refactor the processwatchdogEvent

[libvirt] [PATCH v6 5/5] qemu: Implement 'oncrash' coredump events when guest panicked

2013-06-07 Thread Chen Fan
Add doDumpCoreToAutoPath to implement 'coredump-destroy' and 'coredump-restart' events of the 'on_crash' in the XML when domain crashed. --- src/qemu/qemu_driver.c | 65 ++ 1 file changed, 65 insertions(+) diff --git a/src/qemu/qemu_driver.c

[libvirt] [PATCH v6 3/5] qemu: Need to use qemuProcessShutdownOrReboot(), so we defined it at qemu_process.h

2013-06-07 Thread Chen Fan
--- src/qemu/qemu_process.c | 2 +- src/qemu/qemu_process.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 7a1535e..163bd96 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -611,7 +611,7 @@

[libvirt] [PATCH v6 2/5] qemu: Refactor the processwatchdogEvent code that can make the driver workpool more generalized

2013-06-07 Thread Chen Fan
--- src/qemu/qemu_domain.h | 10 ++-- src/qemu/qemu_driver.c | 65 +++-- src/qemu/qemu_process.c | 13 +- 3 files changed, 56 insertions(+), 32 deletions(-) diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index

[libvirt] [PATCH v7 3/6] qemu: Need to use qemuProcessShutdownOrReboot(), so we defined it at qemu_process.h

2013-06-14 Thread Chen Fan
--- src/qemu/qemu_process.c | 2 +- src/qemu/qemu_process.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 7a1535e..163bd96 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -611,7 +611,7 @@

[libvirt] [PATCH v7 6/6] qemu: Implement oncrash 'rename-resart' event when guest panicked

2013-06-14 Thread Chen Fan
Implements 'rename-restart' behavior of the 'on_crash' in the XML when domain crashed. --- src/qemu/qemu_driver.c | 67 ++ 1 file changed, 67 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index eefe7a2..a166468 100644

[libvirt] [PATCH v7 4/6] qemu: Implement 'oncrash' events when guest panicked

2013-06-14 Thread Chen Fan
Add monitor callback API domainGuestPanic, that implements 'destroy', 'restart' and 'preserve' events of the 'on_crash' in the XML when domain crashed. --- src/qemu/qemu_domain.h | 1 + src/qemu/qemu_driver.c | 92 src/qemu/qemu_monitor.c

[libvirt] [PATCH v7 0/6] libvirt supports Guest Panicked

2013-06-14 Thread Chen Fan
. 2. Move the previous code to processWatchdogEvent(). v2-v3: 1. split into 3 patches v1-v2: 1. fix the incorrect domain state: paused - crashed, when crash the guest while libvirt isn't running, then restart libvirtd. Chen Fan (6): libvirt: Define domain

[libvirt] [PATCH v7 5/6] qemu: Implement 'oncrash' coredump events when guest panicked

2013-06-14 Thread Chen Fan
Add doDumpCoreToAutoPath to implement 'coredump-destroy' and 'coredump-restart' events of the 'on_crash' in the XML when domain crashed. --- src/qemu/qemu_driver.c | 65 ++ 1 file changed, 65 insertions(+) diff --git a/src/qemu/qemu_driver.c

[libvirt] [PATCH v7 1/6] libvirt: Define domain crash event types

2013-06-14 Thread Chen Fan
This patch introduces domain crashed types and crashed reasons which will be used while guest panicked. --- examples/domain-events/events-c/event-test.c | 10 ++ include/libvirt/libvirt.h.in | 16 src/conf/domain_conf.c | 12

[libvirt] [PATCH v7 2/6] qemu: Refactor the processwatchdogEvent code that can make the driver workpool more generalized

2013-06-14 Thread Chen Fan
--- src/qemu/qemu_domain.h | 10 ++-- src/qemu/qemu_driver.c | 65 +++-- src/qemu/qemu_process.c | 13 +- 3 files changed, 56 insertions(+), 32 deletions(-) diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index

Re: [libvirt] Exposing and calculating CPU APIC IDs (was Re: [Qemu-devel] [RFC 1/3] target-i386: moving registers of vmstate from cpu_exec_init() to x86_cpu_realizefn())

2014-01-20 Thread Chen Fan
On Mon, 2014-01-20 at 13:29 +0100, Igor Mammedov wrote: On Fri, 17 Jan 2014 17:13:55 -0200 Eduardo Habkost ehabk...@redhat.com wrote: On Wed, Jan 15, 2014 at 03:37:04PM +0100, Igor Mammedov wrote: On Wed, 15 Jan 2014 20:24:01 +0800 Chen Fan chen.fan.f...@cn.fujitsu.com wrote

Re: [libvirt] [Qemu-devel] Exposing and calculating CPU APIC IDs (was Re: [RFC 1/3] target-i386: moving registers of vmstate from cpu_exec_init() to x86_cpu_realizefn())

2014-01-21 Thread Chen Fan
On Tue, 2014-01-21 at 10:31 +0100, Igor Mammedov wrote: On Tue, 21 Jan 2014 15:12:45 +0800 Chen Fan chen.fan.f...@cn.fujitsu.com wrote: On Mon, 2014-01-20 at 13:29 +0100, Igor Mammedov wrote: On Fri, 17 Jan 2014 17:13:55 -0200 Eduardo Habkost ehabk...@redhat.com wrote: On Wed

Re: [libvirt] [Qemu-devel] Exposing and calculating CPU APIC IDs (was Re: [RFC 1/3] target-i386: moving registers of vmstate from cpu_exec_init() to x86_cpu_realizefn())

2014-02-12 Thread Chen Fan
On Tue, 2014-01-21 at 11:10 +0100, Andreas Färber wrote: Am 21.01.2014 10:51, schrieb Chen Fan: On Tue, 2014-01-21 at 10:31 +0100, Igor Mammedov wrote: On Tue, 21 Jan 2014 15:12:45 +0800 Chen Fan chen.fan.f...@cn.fujitsu.com wrote: On Mon, 2014-01-20 at 13:29 +0100, Igor Mammedov wrote

Re: [libvirt] [Qemu-devel] Exposing and calculating CPU APIC IDs (was Re: [RFC 1/3] target-i386: moving registers of vmstate from cpu_exec_init() to x86_cpu_realizefn())

2014-02-17 Thread Chen Fan
On Thu, 2014-02-13 at 10:44 +0100, Igor Mammedov wrote: On Thu, 13 Feb 2014 14:14:08 +0800 Chen Fan chen.fan.f...@cn.fujitsu.com wrote: On Tue, 2014-01-21 at 11:10 +0100, Andreas Färber wrote: Am 21.01.2014 10:51, schrieb Chen Fan: On Tue, 2014-01-21 at 10:31 +0100, Igor Mammedov

[libvirt] [PATCH 0/2] specify migration URI on setting file

2014-04-15 Thread Chen Fan
, if there are more KVM host, to change the migrateuri will be too troublesome for user. Chen Fan (2): move virConnectGetConfigFile() to virconf.h add default migrate uri in definition file daemon/remote.c | 11 +++- src/driver.h | 1 + src/libvirt.c

[libvirt] [PATCH 2/2] add default migrate uri in definition file

2014-04-15 Thread Chen Fan
to host whose name is resolved by DNS or /etc/hosts. but we are able to use virsh migrate command more usefull. User can specify a constant destination by definition file. if user want to specify other temporary destination, command option is good for it. Signed-off-by: Chen Fan

[libvirt] [PATCH 1/2] move virConnectGetConfigFile() to virconf.h

2014-04-15 Thread Chen Fan
Currently, function virConnectGetConfigFile() is in src/libvirt.c, but this function is to manipulate configration file, so we move it to virconf.c could make it more generic. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- src/libvirt.c| 54

[libvirt] [PATCH v2] Add support for migration URI configuration

2014-04-21 Thread Chen Fan
option on dest host to save the default migrate uri which explicitly configure which of this host's addresses should be used to transfer, thus user doesn't boring to specify it in command line everytime. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- src/qemu/qemu.conf| 5 - src

[libvirt] [patch v3 0/2] add support for migrateURI configuration

2014-05-07 Thread Chen Fan
option on dest host to save the default migrate uri which explicitly specify which of this host's addresses is used for transferring data, thus user doesn't boring to specify it in command line everytime. Any comments are welcome. Thank you very much. Chen Fan (2): Add support for migration URI

[libvirt] [patch v3 1/2] Add support for migration URI configuration

2014-05-07 Thread Chen Fan
Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- src/qemu/qemu.conf| 5 - src/qemu/qemu_conf.c | 2 ++ src/qemu/qemu_conf.h | 2 ++ src/qemu/qemu_migration.c | 5 + 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu.conf b/src/qemu

[libvirt] [patch v3 2/2] add inotify handler to qemu driver

2014-05-07 Thread Chen Fan
we don't expect to reload 'migrate_uri' with restarting libvirtd everytime while updating the URI, so adding inotify handler to reload 'migrate_uri' configuration without restarting libvirtd, it will be also helpful for virt-manager to get 'migrate_uri'. Signed-off-by: Chen Fan chen.fan.f

[libvirt] [PATCH v4 1/1] migration: add support for migrateURI configuration

2014-05-14 Thread Chen Fan
option on dest host to save the default migrate uri which explicitly specify which of this host's addresses is used for transferring data, thus user doesn't boring to specify it in command line everytime. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- v3-v4: move up the default uri_in

[libvirt] [PATCH v5] migration: add support for migrateURI configuration

2014-05-20 Thread Chen Fan
option on dest host to save the default value set which can be specified to a migration hostname or one of this host's addresses used for transferring data, thus user doesn't boring to specify it in command line everytime. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- v4-v5: using

[libvirt] [PATCH v6] migration: add support for migrateHost configuration

2014-05-20 Thread Chen Fan
option on dest host to save the default value set which can be specified to a migration hostname or one of this host's addresses used for transferring data, thus user doesn't boring to specify it in command line everytime. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- src/qemu

[libvirt] [PATCH] manual: Add virsh manual about specified migration host

2014-05-30 Thread Chen Fan
the 'migration_host' description maybe have a bit of difficulty to understand for user, so add this manual for them. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- tools/virsh.pod | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/virsh.pod b/tools

[libvirt] [patch v2 1/1] manual: Add virsh manual about specified migration host

2014-06-09 Thread Chen Fan
the 'migration_host' description maybe have a bit of difficulty to understand for user, so add this manual for them. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- tools/virsh.pod | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tools/virsh.pod b/tools

[libvirt] [PATCH 0/3] add binding guest numa nodes to host numa nodes support

2014-06-25 Thread Chen Fan
domain XML like: ... cpu numa cell cpus='0-1' memdev='ram0'/ /numa /cpu ... devices memdev type='ram' merge='yes' dump='yes' prealloc='yes' nameram0/name capacity unit='MiB'1000/capacity source host-nodes='0-1' policy='bind' / /memdev /devices Chen Fan

[libvirt] [PATCH 1/3] numa: add '-numa memdev=' support

2014-06-25 Thread Chen Fan
Since qemu has supported '-numa memdev=ram0' command option, so libvirt should add numa element to support specified memdev attrubute in XML. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- src/conf/cpu_conf.c | 73 +++-- src/conf

[libvirt] [PATCH 3/3] tests: add numa -memdev testing and docs support

2014-06-25 Thread Chen Fan
Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- docs/formatdomain.html.in | 71 +++- docs/schemas/domaincommon.rng | 76 +- tests/qemuxml2argvdata/qemuxml2argv-cpu-numa3.args | 9 +++ tests

[libvirt] [PATCH 2/3] conf: add memdev device in devices XML

2014-06-25 Thread Chen Fan
='MiB'1000/capacity source host-nodes='0-1' policy='bind' / /memdev then we enable to support -numa memdev=ram0 command line for binding guest numa nodes to host numa nodes. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- src/conf/domain_conf.c | 203

[libvirt] [PATCH] domain conf: Fix whitespace around judgement operation when parsing 'managed' attribute.

2014-06-25 Thread Chen Fan
Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- src/conf/domain_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 02c394f..b7aa4f5 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -4261,7

[libvirt] [PATCH] storage: remove unused 'canonPath' in virStorageFileGetMetadata

2014-08-26 Thread Chen Fan
Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- src/storage/storage_driver.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index 3604613..5ddc23a 100644 --- a/src/storage/storage_driver.c +++ b/src/storage

[libvirt] [PATCH] conf: Check migration_host is valid or not during libvirt restarts

2014-08-29 Thread Chen Fan
if user specified an invalid strings as migration hostname, like setting: migration_host = XXX, libvirt should check it and return error during lbivirt restart. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- src/qemu/qemu_conf.c | 40 1 file

[libvirt] [PATCH v1 1/3] migration: add migration_host support for Ipv6 address without brackets

2014-09-11 Thread Chen Fan
when specifying migration_host to an Ipv6 address without brackets, it was resolved to an incorrect address, such as: tcp:2001:0DB8::1428:, but the correct address should be: tcp:[2001:0DB8::1428]: so we should add brackets when parsing it. Signed-off-by: Chen Fan chen.fan.f

[libvirt] [PATCH v1 0/3] Check migration configuration

2014-09-11 Thread Chen Fan
This version differs from the patch set conf: Check migration_host is valid or not during libvirt restarts I posted 2 weeks ago, I droped checking the migration_host on target host. and find an issue when setting migration_host. Chen Fan (3): migration: add migration_host support for Ipv6

[libvirt] [PATCH v1 2/3] conf: Check migration_host is localhost or not during restart

2014-09-11 Thread Chen Fan
Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- src/qemu/qemu_conf.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index ac10b64..013f3de 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -707,6 +707,17 @@ int

[libvirt] [PATCH v1 3/3] conf: Check migration_address is valid or not during restart

2014-09-11 Thread Chen Fan
When enabling the migration_address option, by default it is set to 127.0.0.1, but it's not a valid address for migration. so we should add verification and set the default migration_address to 0.0.0.0. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- src/qemu/qemu.conf

Re: [libvirt] [PATCH v1 0/3] Check migration configuration

2014-09-15 Thread Chen, Fan
Hi jiri, Please help to review this patches. Thanks, Chen On Fri, 2014-09-12 at 12:32 +0800, Chen Fan wrote: This version differs from the patch set conf: Check migration_host is valid or not during libvirt restarts I posted 2 weeks ago, I droped checking the migration_host on target

Re: [libvirt] [PATCH v1 2/3] conf: Check migration_host is localhost or not during restart

2014-09-22 Thread Chen, Fan
On Mon, 2014-09-22 at 15:34 +0200, Ján Tomko wrote: On 09/12/2014 06:33 AM, Chen Fan wrote: Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- src/qemu/qemu_conf.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c

[libvirt] [PATCH] cpu: fix wrong single quote mark

2014-09-22 Thread Chen Fan
Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- src/conf/cpu_conf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c index 6c454ee..116aa58 100644 --- a/src/conf/cpu_conf.c +++ b/src/conf/cpu_conf.c @@ -413,7 +413,7

Re: [libvirt] [PATCH v1 1/3] migration: add migration_host support for Ipv6 address without brackets

2014-09-22 Thread Chen, Fan
On Mon, 2014-09-22 at 15:34 +0200, Ján Tomko wrote: On 09/12/2014 06:31 AM, Chen Fan wrote: when specifying migration_host to an Ipv6 address without brackets, it was resolved to an incorrect address, such as: tcp:2001:0DB8::1428:, but the correct address should be: tcp:[2001

[libvirt] [PATCH v2 2/4] migration: add migration_host support for Ipv6 address without brackets

2014-09-22 Thread Chen Fan
if specifying migration_host to an Ipv6 address without brackets, it was resolved to an incorrect address, such as: tcp:2001:0DB8::1428:, but the correct address should be: tcp:[2001:0DB8::1428]: so we should add brackets when parsing it. Signed-off-by: Chen Fan chen.fan.f

[libvirt] [PATCH v2 1/4] virsocketaddr: return address family in virSocketAddrIsNumeric

2014-09-22 Thread Chen Fan
nowadays, virSocketAddrIsNumeric only validated the income address if numeric, but sometimes we need to know whether the address is an IPv4 or an IPv6 address. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- src/qemu/qemu_migration.c | 4 ++-- src/util/virsocketaddr.c | 13

[libvirt] [PATCH v2 4/4] conf: Check migration_address whether is localhost

2014-09-22 Thread Chen Fan
When enabling the migration_address option, by default it is set to 127.0.0.1, but it's not a valid address for migration. so we should add verification and set the default migration_address to 0.0.0.0. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- src/qemu/qemu.conf

[libvirt] [PATCH v2 0/4] Check migration configuration

2014-09-22 Thread Chen Fan
add some check in migration configuration. Chen Fan (4): virsocketaddr: return address family in virSocketAddrIsNumeric migration: add migration_host support for Ipv6 address without brackets conf: add virSocketAddrIsLocalhost to Check migration_host conf: Check migration_address

[libvirt] [PATCH v2 3/4] conf: add virSocketAddrIsLocalhost to Check migration_host

2014-09-22 Thread Chen Fan
Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- src/libvirt_private.syms | 1 + src/qemu/qemu_conf.c | 8 src/util/virsocketaddr.c | 35 +++ src/util/virsocketaddr.h | 3 +++ 4 files changed, 47 insertions(+) diff --git a/src

[libvirt] [PATCH 1/2] numatune: add check for memnode.nodeset range

2014-09-23 Thread Chen Fan
For memnode in numatune element, the range of attribute 'nodeset' was not validated. on my host maxnodes was 1, but when setting nodeset to '0-2' or more, guest also started succuss. there probably was qemu's bug too. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- src/conf

[libvirt] [PATCH 2/2] numatune: move up verification codes in virNumaSetupMemoryPolicy

2014-09-23 Thread Chen Fan
use virDomainNumatuneNodeSetIsAvailable() to verify momory.nodeset whether is out of range. and move up the verification. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- src/conf/numatune_conf.c | 3 +++ src/util/virnuma.c | 15 --- 2 files changed, 3 insertions

[libvirt] [PATCH 0/2] add nodeset check in numatune

2014-09-23 Thread Chen Fan
for memnode.nodeset in numatune, when setting it more than the host nodes, it should fail. Chen Fan (2): numatune: add check for memnode.nodeset range numatune: move up verification codes in virNumaSetupMemoryPolicy src/conf/numatune_conf.c | 32 src/conf

Re: [libvirt] [PATCH 1/2] numatune: add check for memnode.nodeset range

2014-09-23 Thread Chen, Fan
On Tue, 2014-09-23 at 14:41 +0200, Michal Privoznik wrote: On 23.09.2014 11:34, Chen Fan wrote: For memnode in numatune element, the range of attribute 'nodeset' was not validated. on my host maxnodes was 1, but when setting nodeset to '0-2' or more, guest also started succuss

Re: [libvirt] [PATCH 2/2] numatune: move up verification codes in virNumaSetupMemoryPolicy

2014-09-23 Thread Chen, Fan
On Tue, 2014-09-23 at 14:42 +0200, Michal Privoznik wrote: On 23.09.2014 11:34, Chen Fan wrote: use virDomainNumatuneNodeSetIsAvailable() to verify momory.nodeset whether is out of range. and move up the verification. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- src

Re: [libvirt] [PATCH v2 0/4] Check migration configuration

2014-09-24 Thread Chen, Fan
ping? On Tue, 2014-09-23 at 12:04 +0800, Chen Fan wrote: add some check in migration configuration. Chen Fan (4): virsocketaddr: return address family in virSocketAddrIsNumeric migration: add migration_host support for Ipv6 address without brackets conf: add

Re: [libvirt] [PATCH v2 0/4] Check migration configuration

2014-09-30 Thread Chen, Fan
any feedback? Thanks, Chen On Thu, 2014-09-25 at 01:10 +, Chen, Fan wrote: ping? On Tue, 2014-09-23 at 12:04 +0800, Chen Fan wrote: add some check in migration configuration. Chen Fan (4): virsocketaddr: return address family in virSocketAddrIsNumeric migration: add

Re: [libvirt] [PATCH v2 2/4] migration: add migration_host support for Ipv6 address without brackets

2014-10-05 Thread Chen, Fan
On Fri, 2014-10-03 at 15:58 +0200, Ján Tomko wrote: On 09/23/2014 06:04 AM, Chen Fan wrote: if specifying migration_host to an Ipv6 address without brackets, it was resolved to an incorrect address, such as: tcp:2001:0DB8::1428:, but the correct address should be: tcp:[2001

[libvirt] [PATCH v3 2/3] conf: add check if migration_host is a localhost address

2014-10-06 Thread Chen Fan
Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- src/libvirt_private.syms | 1 + src/qemu/qemu_conf.c | 50 src/qemu/qemu_conf.h | 2 ++ src/util/virsocketaddr.c | 24 +++ src/util/virsocketaddr.h | 2 ++ 5

[libvirt] [PATCH v3 1/3] migration: add migration_host support for Ipv6 address without brackets

2014-10-06 Thread Chen Fan
if specifying migration_host to an Ipv6 address without brackets, it was resolved to an incorrect address, such as: tcp:2001:0DB8::1428:, but the correct address should be: tcp:[2001:0DB8::1428]: so we should add brackets when parsing it. Signed-off-by: Chen Fan chen.fan.f

[libvirt] [PATCH v3 0/3] Check migration configuration

2014-10-06 Thread Chen Fan
add some check in migration configuration. Chen Fan (3): migration: add migration_host support for Ipv6 address without brackets conf: add check if migration_host is a localhost address conf: Check migration_address whether is localhost src/libvirt_private.syms | 3 +- src

[libvirt] [PATCH v3 3/3] conf: Check migration_address whether is localhost

2014-10-06 Thread Chen Fan
When enabling the migration_address option, by default it is set to 127.0.0.1, but it's not a valid address for migration. so we should add verification and set the default migration_address to 0.0.0.0. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- src/qemu/qemu.conf

Re: [libvirt] [PATCH v2 3/4] conf: add virSocketAddrIsLocalhost to Check migration_host

2014-10-06 Thread Chen, Fan
On Fri, 2014-10-03 at 15:58 +0200, Ján Tomko wrote: On 09/23/2014 06:04 AM, Chen Fan wrote: Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- src/libvirt_private.syms | 1 + src/qemu/qemu_conf.c | 8 src/util/virsocketaddr.c | 35

Re: [libvirt] [PATCH v3 1/3] migration: add migration_host support for Ipv6 address without brackets

2014-10-07 Thread Chen, Fan
On Tue, 2014-10-07 at 11:08 +0200, Ján Tomko wrote: On 10/07/2014 06:07 AM, Chen Fan wrote: if specifying migration_host to an Ipv6 address without brackets, it was resolved to an incorrect address, such as: tcp:2001:0DB8::1428:, but the correct address should be: tcp:[2001

Re: [libvirt] [PATCH v3 2/3] conf: add check if migration_host is a localhost address

2014-10-08 Thread Chen, Fan
On Wed, 2014-10-08 at 12:33 +0200, Ján Tomko wrote: On 10/07/2014 06:07 AM, Chen Fan wrote: Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- src/libvirt_private.syms | 1 + src/qemu/qemu_conf.c | 50 src/qemu

Re: [libvirt] [PATCH v3 0/3] Check migration configuration

2014-10-09 Thread Chen, Fan
On Thu, 2014-10-09 at 14:54 +0200, Ján Tomko wrote: On 10/07/2014 06:07 AM, Chen Fan wrote: add some check in migration configuration. Chen Fan (3): migration: add migration_host support for Ipv6 address without brackets conf: add check if migration_host is a localhost

Re: [libvirt] [PATCH 0/3] lxc: Implement emulator pin APIs to set/get cpuset

2014-10-10 Thread Chen, Fan
On Fri, 2014-10-10 at 13:58 +0800, Wang Rui wrote: Ping? I found some wrong indentation in the 3 patches. like following in patch 1/3: +static int virLXCCgroupSetupCpusetTuneForEmulator(virDomainDefPtr def, + virCgroupPtr cgroup, +

[libvirt] [PATCH] conf: fix a wrong comment in virSocketAddrNumericFamily()

2014-10-15 Thread Chen Fan
Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- src/util/virsocketaddr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/util/virsocketaddr.c b/src/util/virsocketaddr.c index a19e3af..8c9f05f 100644 --- a/src/util/virsocketaddr.c +++ b/src/util/virsocketaddr.c

[libvirt] [PATCH] conf: fix a wrong comment in virSocketAddrNumericFamily()

2014-10-15 Thread Chen Fan
Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- src/util/virsocketaddr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/util/virsocketaddr.c b/src/util/virsocketaddr.c index a19e3af..8c9f05f 100644 --- a/src/util/virsocketaddr.c +++ b/src/util/virsocketaddr.c

Re: [libvirt] [PATCH v3 2/3] conf: add check if migration_host is a localhost address

2014-10-15 Thread Chen, Fan
On Wed, 2014-10-15 at 04:46 -0400, John Ferlan wrote: This patch has triggered a Coverity RESOURCE_LEAK (3 actually) Right, I will make a patch to fix it. Thank you for catching that. On 10/08/2014 09:54 PM, Chen, Fan wrote: On Wed, 2014-10-08 at 12:33 +0200, Ján Tomko wrote: On 10/07

[libvirt] [PATCH] conf: fix an memory leak in virSocketAddrIsNumericLocalhost()

2014-10-15 Thread Chen Fan
Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- src/util/virsocketaddr.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/util/virsocketaddr.c b/src/util/virsocketaddr.c index 8c9f05f..5f54e68 100644 --- a/src/util/virsocketaddr.c +++ b/src/util

[libvirt] [PATCH v2 1/3] numatune: add check for numatune nodeset range

2014-10-28 Thread Chen Fan
For memnode in numatune element, the range of attribute 'nodeset' was not validated. on my host maxnodes was 1, but when setting nodeset to '0-2' or more, guest also started succuss. there probably was qemu's bug too. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- src/conf

[libvirt] [PATCH v2 0/3] add nodeset check in numatune

2014-10-28 Thread Chen Fan
when setting elements memnode and nodeset in attribute numatune more than the host nodes in XML file, VM boot should fail. so add check for that. Chen Fan (3): numatune: add check for numatune nodeset range lxc controller: add check for numatune virnuma: remove redundant check for numanode

[libvirt] [PATCH v2 3/3] virnuma: remove redundant check for numanode

2014-10-28 Thread Chen Fan
Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- src/util/virnuma.c | 15 --- 1 file changed, 15 deletions(-) diff --git a/src/util/virnuma.c b/src/util/virnuma.c index 411719d..8431b3c 100644 --- a/src/util/virnuma.c +++ b/src/util/virnuma.c @@ -95,31 +95,16

[libvirt] [PATCH v2 2/3] lxc controller: add check for numatune

2014-10-28 Thread Chen Fan
Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- src/lxc/lxc_controller.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c index 1861dd6..1ee89ab 100644 --- a/src/lxc/lxc_controller.c +++ b/src/lxc/lxc_controller.c

Re: [libvirt] [PATCH v2 2/3] lxc controller: add check for numatune

2014-10-29 Thread Chen, Fan
On Wed, 2014-10-29 at 08:00 +0100, Martin Kletzander wrote: On Tue, Oct 28, 2014 at 04:22:22PM +0800, Chen Fan wrote: Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- src/lxc/lxc_controller.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lxc

Re: [libvirt] [PATCH v2 1/3] numatune: add check for numatune nodeset range

2014-10-29 Thread Chen, Fan
On Wed, 2014-10-29 at 07:58 +0100, Martin Kletzander wrote: On Tue, Oct 28, 2014 at 04:22:21PM +0800, Chen Fan wrote: For memnode in numatune element, the range of attribute 'nodeset' was not validated. on my host maxnodes was 1, but when setting nodeset to '0-2' or more, guest also started

[libvirt] [PATCH v3 2/3] lxc controller: add check for numatune

2014-10-29 Thread Chen Fan
Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- src/lxc/lxc_controller.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c index 1861dd6..a23dff7 100644 --- a/src/lxc/lxc_controller.c +++ b/src/lxc/lxc_controller.c @@ -689,6 +689,7

[libvirt] [PATCH v3 1/3] numatune: add check for numatune nodeset range

2014-10-29 Thread Chen Fan
For memnode in numatune element, the range of attribute 'nodeset' was not validated. on my host maxnodes was 1, but when setting nodeset to '0-2' or more, guest also started succuss. there probably was qemu's bug too. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- src/conf

[libvirt] [PATCH v3 3/3] virnuma: remove redundant check for numanode

2014-10-29 Thread Chen Fan
Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- src/util/virnuma.c | 15 --- 1 file changed, 15 deletions(-) diff --git a/src/util/virnuma.c b/src/util/virnuma.c index fbe8fd1..5a08049 100644 --- a/src/util/virnuma.c +++ b/src/util/virnuma.c @@ -95,31 +95,16

Re: [libvirt] [PATCH v3 3/3] virnuma: remove redundant check for numanode

2014-10-29 Thread Chen, Fan
On Wed, 2014-10-29 at 14:23 +0100, Martin Kletzander wrote: On Wed, Oct 29, 2014 at 08:33:34PM +0800, Chen Fan wrote: Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- src/util/virnuma.c | 15 --- 1 file changed, 15 deletions(-) I think this harmless check may

Re: [libvirt] [PATCH v3 1/3] numatune: add check for numatune nodeset range

2014-10-29 Thread Chen, Fan
On Wed, 2014-10-29 at 14:20 +0100, Martin Kletzander wrote: On Wed, Oct 29, 2014 at 08:33:32PM +0800, Chen Fan wrote: For memnode in numatune element, the range of attribute 'nodeset' was not validated. on my host maxnodes was 1, but when setting nodeset to '0-2' or more, guest also started

[libvirt] [PATCH v4 0/3] add nodeset check in numatune

2014-10-29 Thread Chen Fan
when setting elements memnode and nodeset in attribute numatune more than the host nodes in XML file, VM boot should fail. so add check for that. Chen Fan (3): bitmap: add virBitmapLastSetBit for finding the last bit position of bitmap numatune: add check for numatune nodeset range

[libvirt] [PATCH v4 1/3] bitmap: add virBitmapLastSetBit for finding the last bit position of bitmap

2014-10-29 Thread Chen Fan
Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- src/libvirt_private.syms | 1 + src/util/virbitmap.c | 45 + src/util/virbitmap.h | 3 +++ tests/virbitmaptest.c| 13 - 4 files changed, 61 insertions(+), 1 deletion

[libvirt] [PATCH v4 3/3] virnuma: use virNumaNodesetIsAvailable checking nodeset in virNumaSetupMemoryPolicy

2014-10-29 Thread Chen Fan
Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- src/util/virnuma.c | 23 --- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/src/util/virnuma.c b/src/util/virnuma.c index 4188ef5..613a43c 100644 --- a/src/util/virnuma.c +++ b/src/util/virnuma.c

[libvirt] [PATCH v4 2/3] numatune: add check for numatune nodeset range

2014-10-29 Thread Chen Fan
There was no check for 'nodeset' attribute in numatune-related elements. This patch adds validation that any nodeset specified does not exceed maximum host node. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- src/conf/numatune_conf.c | 28

Re: [libvirt] [PATCH v3 1/3] numatune: add check for numatune nodeset range

2014-10-30 Thread Chen, Fan
On Thu, 2014-10-30 at 07:55 +0100, Martin Kletzander wrote: On Thu, Oct 30, 2014 at 02:23:00AM +, Chen, Fan wrote: On Wed, 2014-10-29 at 14:20 +0100, Martin Kletzander wrote: On Wed, Oct 29, 2014 at 08:33:32PM +0800, Chen Fan wrote: diff --git a/src/util/virnuma.c b/src/util/virnuma.c

Re: [libvirt] [PATCH v4 1/3] bitmap: add virBitmapLastSetBit for finding the last bit position of bitmap

2014-11-03 Thread Chen, Fan
On Mon, 2014-11-03 at 14:18 +0100, Martin Kletzander wrote: On Thu, Oct 30, 2014 at 01:44:17PM +0800, Chen Fan wrote: Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- src/libvirt_private.syms | 1 + src/util/virbitmap.c | 45 + src

Re: [libvirt] [PATCH v4 2/3] numatune: add check for numatune nodeset range

2014-11-03 Thread Chen, Fan
On Mon, 2014-11-03 at 14:18 +0100, Martin Kletzander wrote: On Thu, Oct 30, 2014 at 01:44:18PM +0800, Chen Fan wrote: There was no check for 'nodeset' attribute in numatune-related elements. This patch adds validation that any nodeset specified does not exceed maximum host node. Signed

  1   2   >