Re: [libvirt] [PATCHv3 1/4] nodeinfo: enable nodeGetCPUCount for older kernels

2012-11-15 Thread Viktor Mihajlovski
On 11/15/2012 04:43 AM, Eric Blake wrote: The assumption here is that any kernel lacking cpu/present also lacks hotplug, and therefore the cpuNN will be consecutive and we aren't going to miss anything. You removed that assumption from the comment, but I think it is important to leave in.

Re: [libvirt] [PATCH] qemu conf: Use host-model for cpu mode by default

2012-11-15 Thread Jiri Denemark
On Thu, Nov 15, 2012 at 02:55:00 +, Kaneshige, Kenji wrote: -Original Message- From: Daniel P. Berrange [mailto:berra...@redhat.com] Sent: Wednesday, November 14, 2012 6:45 PM To: Ichikawa, Ken/市川 顕 Cc: libvir-list@redhat.com; ebl...@redhat.com; gaof...@cn.fujitsu.com;

Re: [libvirt] [libvirt-glib 2/2] conn-test: Fix gvir_connection_get_version error check

2012-11-15 Thread Christophe Fergeau
Hey, On Wed, Nov 14, 2012 at 03:45:49PM +0100, Michal Privoznik wrote: On 14.11.2012 15:16, Christophe Fergeau wrote: This method returns a version number, which can be 0, so we cannot check the return value for 0 to know if an error happened. Test if the GError is set instead to detect

[libvirt] [PATCH] virsh: fix uninitialized variable in cmdSnapshotEdit

2012-11-15 Thread Ján Tomko
If the domain can't be looked up, name is used unitialized after the cleanup label. Found by coverity. --- tools/virsh-snapshot.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/virsh-snapshot.c b/tools/virsh-snapshot.c index 4281109..0bd9583 100644 ---

[libvirt] [PATCH v2] sanlock: Retry after EINPROGRESS

2012-11-15 Thread Michal Privoznik
It may take some time for sanlock to add a lockspace. And if user restart libvirtd service meanwhile, the fresh daemon can fail adding the same lockspace with EINPROGRESS. Recent sanlock has sanlock_inq_lockspace() function which should block until lockspace changes state. If we are building

Re: [libvirt] [PATCH] virsh: fix uninitialized variable in cmdSnapshotEdit

2012-11-15 Thread Michal Privoznik
On 15.11.2012 11:37, Ján Tomko wrote: If the domain can't be looked up, name is used unitialized after the cleanup label. Found by coverity. --- tools/virsh-snapshot.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/virsh-snapshot.c

[libvirt] [PATCH] virsh: save: report an error if XML file can't be read

2012-11-15 Thread Ján Tomko
Bug: https://bugzilla.redhat.com/show_bug.cgi?id=876868 --- tools/virsh-domain.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 86ed4d3..df38618 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -2945,8

[libvirt] [PATCH 5/4] nodeinfo: support kernels that lack socket information

2012-11-15 Thread Eric Blake
On RHEL 5, I was getting a segfault trying to start libvirtd, because we were failing virNodeParseSocket but not checking for errors, and then calling CPU_SET(-1, sock_map) as a result. But if you don't have a topology/physical_package_id file, then you can just assume that the cpu belongs to

[libvirt] [PATCH 6/4] nodeinfo: port nodecpumap to RHEL5

2012-11-15 Thread Eric Blake
Prior to this patch, 'virsh nodecpumap' on older kernels reported: error: Unable to get cpu map error: out of memory * src/nodeinfo.c (linuxParseCPUmax): Don't overwrite error. (nodeGetCPUBitmap): Provide backup implementation. --- src/nodeinfo.c | 33 +++-- 1 file

Re: [libvirt] [PATCH v2] sanlock: Retry after EINPROGRESS

2012-11-15 Thread Eric Blake
On 11/15/2012 03:39 AM, Michal Privoznik wrote: It may take some time for sanlock to add a lockspace. And if user restart libvirtd service meanwhile, the fresh daemon can fail adding the same lockspace with EINPROGRESS. Recent sanlock has sanlock_inq_lockspace() function which should block

Re: [libvirt] [PATCHv3 2/4] qemu, lxc: Change host CPU number detection logic.

2012-11-15 Thread Eric Blake
On 11/13/2012 05:54 AM, Viktor Mihajlovski wrote: The drivers for QEMU and LXC use virNodeGetInfo only to determine the number of host CPUs. On Linux hosts nodeGetCPUCount has less overhead. --- V3 Changes: Commit message wording, since Peter's fix, nodeGetInfo will return

Re: [libvirt] [PATCHv3 3/4] python: Use virNodeGetCPUMap where possible

2012-11-15 Thread Eric Blake
On 11/13/2012 05:54 AM, Viktor Mihajlovski wrote: Modified the places where virNodeGetInfo was used for the purpose of obtaining the maximum node CPU number. Transparently falling back to virNodeGetInfo in case of failure. Wrote a utility function getPyNodeCPUCount for that purpose.

Re: [libvirt] [PATCHv3 4/4] virsh: Use virNodeGetCPUMap if possible

2012-11-15 Thread Eric Blake
On 11/13/2012 05:54 AM, Viktor Mihajlovski wrote: Modified the places where virNodeGetInfo was used for the purpose of obtaining the maximum node CPU number. Transparently falling back to virNodeGetInfo in case of failure. Wrote utility function vshNodeGetCPUCount to compute node CPU number.

Re: [libvirt] [PATCH v1 2/2] help to create disk images of non-shared migration

2012-11-15 Thread Doug Goldstein
On Wed, Nov 14, 2012 at 8:04 PM, liguang lig.f...@cn.fujitsu.com wrote: try to do non-shared migration without bothering to create disk images at target by hand. consider this situation: 1. non-shared migration virsh migrate --copy-storage-all ... 2. migration fails 3. create disk

Re: [libvirt] [PATCH v3 UPDATED 1/2] Qemu/Gluster: Add Gluster protocol as supported network disk formats.

2012-11-15 Thread Jiri Denemark
On Fri, Oct 26, 2012 at 22:27:35 +0530, Harsh Prateek Bora wrote: Qemu accepts gluster protocol as supported storage backend beside others. This patch allows users to specify disks on gluster backends like this: disk type='network' device='disk' driver name='qemu' type='raw'/

Re: [libvirt] [PATCH v3 UPDATED 2/2] tests: Add tests for gluster protocol based network disks support

2012-11-15 Thread Jiri Denemark
On Fri, Oct 26, 2012 at 22:27:36 +0530, Harsh Prateek Bora wrote: Signed-off-by: Harsh Prateek Bora ha...@linux.vnet.ibm.com --- tests/qemuargv2xmltest.c | 1 + .../qemuxml2argv-disk-drive-network-gluster.args | 1 +

[libvirt] [PATCH] snapshot: require user to supply external memory file name

2012-11-15 Thread Eric Blake
For disk snapshots, the user could request an external snapshot but not supply a filename; later on, we would check this condition and generate a suitable name if possible, or gracefully error out when not possible (such as when the original file was a block device). But unless we come up with a

Re: [libvirt] [PATCH v1 2/2] help to create disk images of non-shared migration

2012-11-15 Thread li guang
在 2012-11-15四的 14:09 -0600,Doug Goldstein写道: big cut ... +static qemuMigrationCookieStoragePtr +qemuMigrationCookieStorageAlloc(struct qemud_driver *driver, +virDomainDefPtr def) +{ +int i, exitstatus; +char *info = NULL, *start, *end, *tmp =

[libvirt] [PATCH] beautify code indent in qemu migration

2012-11-15 Thread liguang
Signed-off-by: liguang lig.f...@cn.fujitsu.com --- src/qemu/qemu_migration.c | 18 ++ 1 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 716365f..0e00cac 100644 --- a/src/qemu/qemu_migration.c +++

Re: [libvirt] [PATCH v14] support offline migration

2012-11-15 Thread li guang
Hi, Jiri any comment? 在 2012-11-12一的 09:57 +0800,liguang写道: original migration did not aware of offline case, so, try to support offline migration quietly (did not disturb original migration) by pass VIR_MIGRATE_OFFLINE flag to migration APIs if only the domain is really inactive, and

Re: [libvirt] [PATCH] beautify code indent in qemu migration

2012-11-15 Thread Osier Yang
On 2012年11月16日 11:27, liguang wrote: Signed-off-by: liguanglig.f...@cn.fujitsu.com --- src/qemu/qemu_migration.c | 18 ++ 1 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 716365f..0e00cac 100644 ---

Re: [libvirt] [PATCH] snapshot: require user to supply external memory file name

2012-11-15 Thread Osier Yang
On 2012年11月16日 08:49, Eric Blake wrote: For disk snapshots, the user could request an external snapshot but not supply a filename; later on, we would check this condition and generate a suitable name if possible, or gracefully error out when not possible (such as when the original file was a

Re: [libvirt] [PATCH] beautify code indent in qemu migration

2012-11-15 Thread li guang
在 2012-11-16五的 12:51 +0800,Osier Yang写道: On 2012年11月16日 11:27, liguang wrote: Signed-off-by: liguanglig.f...@cn.fujitsu.com --- src/qemu/qemu_migration.c | 18 ++ 1 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/qemu/qemu_migration.c

Re: [libvirt] [PATCH] virsh: save: report an error if XML file can't be read

2012-11-15 Thread Eric Blake
On 11/15/2012 06:25 AM, Ján Tomko wrote: Bug: https://bugzilla.redhat.com/show_bug.cgi?id=876868 --- tools/virsh-domain.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) ACK and pushed. diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 86ed4d3..df38618 100644

[libvirt] RFC: xml-snapshot-data out-of-sync to .qcow2 data

2012-11-15 Thread Philipp Hahn
Hello Eric, hello List, As QEMU stores the snapshot data inside the qcow2 files, modifing them directly might bring libvirts snapshot data out-of-sync. In my case a user replaced a qcow2 with a new file re-using the old name. libvirt still thinks that the snapshots are valid, while in reality

[libvirt] [test-API][PATCH] Fix a problem in cpu_affinity

2012-11-15 Thread Wayne Sun
int() with base 16 will cause problem when cpu number bigger than 10, so change it as default with base 10. Signed-off-by: Wayne Sun g...@redhat.com --- repos/domain/cpu_affinity.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/repos/domain/cpu_affinity.py

[libvirt] [test-API][PATCH] Add cpu hotplug test case

2012-11-15 Thread Wayne Sun
Test hotplug domain CPU, loop increase cpu to max then decrease to min. Now qemu did not support decrease plug of cpu, so decrease part will fail, leave it in the case to keep integrity. Signed-off-by: Wayne Sun g...@redhat.com --- cases/cpu_hotplug.conf | 38 +++

[libvirt] [PATCH v3] qemu: Allow the user to specify vendor and product for disk

2012-11-15 Thread Osier Yang
QEMU supports setting vendor and product strings for disk since 1.2.0 (only scsi-disk, scsi-hd, scsi-cd support it), this patch exposes it with new XML elements vendor and product of disk device. --- docs/formatdomain.html.in | 12 + docs/schemas/domaincommon.rng