Re: [libvirt] Connection using Java

2012-10-16 Thread Claudio Bley
Hi. At Tue, 2 Oct 2012 12:57:03 -0300, Felipe Oliveira Gutierrez wrote: My netcat version is v1.10-38 and I am using Debian on 192.XXX.XXX.XX # nc -h [v1.10-38] connect to somewhere:    nc [-options] hostname port[s] [ports] ... listen for inbound:    nc -l -p port [-options] [hostname]

[libvirt] [PATCH] spec: Add runtime requirement for libssh2

2012-10-16 Thread Peter Krempa
libssh2 unfortunately doesn't support symbol versioning so RPM can't figure out what version is needed for the currently installed libvirt package. This patch adds a runtime requirement, so that the correct version of libssh2 can be installed along with libvirt. --- libvirt.spec.in | 1 + 1 file

Re: [libvirt] [PATCH] maint: prepare for next release number

2012-10-16 Thread Peter Krempa
On 10/15/12 23:20, Eric Blake wrote: Given Daniel's announcement[1], code targetting the next release will be in 1.0.0, not 0.10.3. Changed mechanically with: for f in $(git grep -l '0\(.\)10\13\b') ; do sed -i -e 's/0\(.\)10\13/1\10\10/g' $f done

Re: [libvirt] [Qemu-devel] Problems using netdev_del+netdev_add w/o corresponding device_del+device_add

2012-10-16 Thread Stefan Hajnoczi
On Mon, Oct 15, 2012 at 10:25:58AM +0100, Daniel P. Berrange wrote: On Mon, Oct 15, 2012 at 10:30:07AM +0200, Stefan Hajnoczi wrote: On Sat, Oct 13, 2012 at 04:47:14PM -0400, Laine Stump wrote: Here is the sequence sent to disconnect only the host side, then reconnect it with a new tap

Re: [libvirt] [Qemu-devel] Problems using netdev_del+netdev_add w/o corresponding device_del+device_add

2012-10-16 Thread Markus Armbruster
Laine Stump la...@redhat.com writes: On 10/15/2012 05:25 AM, Daniel P. Berrange wrote: On Mon, Oct 15, 2012 at 10:30:07AM +0200, Stefan Hajnoczi wrote: On Sat, Oct 13, 2012 at 04:47:14PM -0400, Laine Stump wrote: Here is the sequence sent to disconnect only the host side, then reconnect it

Re: [libvirt] [Qemu-devel] Problems using netdev_del+netdev_add w/o corresponding device_del+device_add

2012-10-16 Thread Stefan Hajnoczi
On Mon, Oct 15, 2012 at 11:15:30AM -0400, Laine Stump wrote: On 10/15/2012 05:25 AM, Daniel P. Berrange wrote: On Mon, Oct 15, 2012 at 10:30:07AM +0200, Stefan Hajnoczi wrote: On Sat, Oct 13, 2012 at 04:47:14PM -0400, Laine Stump wrote: Here is the sequence sent to disconnect only the host

Re: [libvirt] [PATCH] spec: Add runtime requirement for libssh2

2012-10-16 Thread Jiri Denemark
On Tue, Oct 16, 2012 at 09:35:02 +0200, Peter Krempa wrote: libssh2 unfortunately doesn't support symbol versioning so RPM can't figure out what version is needed for the currently installed libvirt package. This patch adds a runtime requirement, so that the correct version of libssh2 can be

Re: [libvirt] [PATCH] selinux: Use raw contexts 2

2012-10-16 Thread Martin Kletzander
On 10/15/2012 04:12 PM, Guannan Ren wrote: On 10/15/2012 08:45 PM, Martin Kletzander wrote: In commit 9674f2c637114fa6ac0680fe5658a41a62bb34a8, I forgot to change selabel_lookup with the other functions, so this one-liner does exactly that. --- src/security/security_selinux.c | 2 +- 1

[libvirt] [PATCHv2 5/9] libvirt.h.in: Add new cpumap macro VIR_CPU_USED

2012-10-16 Thread Viktor Mihajlovski
New macro VIR_CPU_USED added to facilitate the interpretation of cpu maps. Further, hardened the other cpumap macros against invocations like VIR_CPU_USE(cpumap + 1, cpu) Signed-off-by: Viktor Mihajlovski mihaj...@linux.vnet.ibm.com --- include/libvirt/libvirt.h.in | 20 1

[libvirt] [PATCHv2 2/9] virNodeGetCPUMapFlags: Define driver API.

2012-10-16 Thread Viktor Mihajlovski
Extend the driver structure by nodeGetCPUMapFlags entry in support of the new API virNodeGetCPUMapFlags. Signed-off-by: Viktor Mihajlovski mihaj...@linux.vnet.ibm.com --- src/driver.h |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/src/driver.h b/src/driver.h index

[libvirt] [PATCHv2 1/9] virNodeGetCPUMapFlags: Define public API.

2012-10-16 Thread Viktor Mihajlovski
Adding a new API to obtain information about the host node's present, online and offline CPUs. int virNodeGetCPUMapFlags(virConnectPtr conn, unsigned char **cpumap, unsigned int *online, unsigned int flags); The

[libvirt] [PATCHv2 6/9] virNodeGetCPUMapFlags: Implement virsh support.

2012-10-16 Thread Viktor Mihajlovski
- Added a new host command nodecpumap - Added documentation Example: $ virsh nodecpumap CPUs present: 8 CPUs online: 3 CPU map: 10101000 Signed-off-by: Viktor Mihajlovski mihaj...@linux.vnet.ibm.com --- tools/virsh-host.c | 41 +

[libvirt] [PATCHv2 9/9] virNodeGetCPUMapFlags: Add python binding

2012-10-16 Thread Viktor Mihajlovski
Added a method getCPUMapFlags to virConnect. It can be used as follows: import libvirt import sys import os conn = libvirt.openReadOnly(None) if conn == None: print 'Failed to open connection to the hypervisor' sys.exit(1) try: (cpus, cpumap, online) = conn.getCPUMapFlags(0) except:

[libvirt] [PATCHv2 8/9] virNodeGetCPUMapFlags: Implement driver support

2012-10-16 Thread Viktor Mihajlovski
Driver support added for: - test, pretending 8 host CPUS, 3 being online - qemu, using nodeGetCPUMapFlags Signed-off-by: Viktor Mihajlovski mihaj...@linux.vnet.ibm.com --- src/qemu/qemu_driver.c |1 + src/test/test_driver.c | 30 ++ 2 files changed, 31

[libvirt] [PATCHv2 3/9] virNodeGetCPUMapFlags: Implement public API.

2012-10-16 Thread Viktor Mihajlovski
Added implementation of virNodeGetCPUMapFlags to libvirt.c Signed-off-by: Viktor Mihajlovski mihaj...@linux.vnet.ibm.com --- src/libvirt.c | 56 1 files changed, 56 insertions(+), 0 deletions(-) diff --git a/src/libvirt.c

Re: [libvirt] [PATCH] remove unnecessary eat-cookie

2012-10-16 Thread li guang
ping ... 在 2012-10-11四的 12:17 +0800,liguang写道: located at qemuMigrationConfirm Signed-off-by: liguang lig.f...@cn.fujitsu.com --- src/qemu/qemu_migration.c |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c

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

2012-10-16 Thread li guang
ping ... 在 2012-10-11四的 12:17 +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 migration process

[libvirt] [PATCHv2 7/9] virNodeGetCPUMapFlags: Implement support function in nodeinfo

2012-10-16 Thread Viktor Mihajlovski
Added an implemention of virNodeGetCPUMapFlags to nodeinfo.c, (nodeGetCPUMapFlags) which can be used by all drivers for a Linux hypervisor host. Signed-off-by: Viktor Mihajlovski mihaj...@linux.vnet.ibm.com --- src/libvirt_private.syms |1 + src/nodeinfo.c | 49

[libvirt] [PATCH] conf: Fix crash with cleanup

2012-10-16 Thread Martin Kletzander
There was a crash possible when both boot dev... and boot order... were specified due to virDomainDefParseBootXML() erroring out before setting *tmp (which was free'd in cleanup). As a fix, I created this cleanup that uses one pointer for all the temporary stored XPath strings and values, plus

Re: [libvirt] [Qemu-devel] Problems using netdev_del+netdev_add w/o corresponding device_del+device_add

2012-10-16 Thread Daniel P. Berrange
On Tue, Oct 16, 2012 at 10:08:21AM +0200, Stefan Hajnoczi wrote: On Mon, Oct 15, 2012 at 10:25:58AM +0100, Daniel P. Berrange wrote: On Mon, Oct 15, 2012 at 10:30:07AM +0200, Stefan Hajnoczi wrote: On Sat, Oct 13, 2012 at 04:47:14PM -0400, Laine Stump wrote: Here is the sequence sent to

Re: [libvirt] [PATCH] conf: Fix crash with cleanup

2012-10-16 Thread Daniel P. Berrange
On Tue, Oct 16, 2012 at 11:19:55AM +0200, Martin Kletzander wrote: There was a crash possible when both boot dev... and boot order... were specified due to virDomainDefParseBootXML() erroring out before setting *tmp (which was free'd in cleanup). As a fix, I created this cleanup that uses one

Re: [libvirt] [PATCH] conf: Fix crash with cleanup

2012-10-16 Thread Michal Privoznik
On 16.10.2012 11:19, Martin Kletzander wrote: There was a crash possible when both boot dev... and boot order... were specified due to virDomainDefParseBootXML() erroring out before setting *tmp (which was free'd in cleanup). As a fix, I created this cleanup that uses one pointer for all the

Re: [libvirt] [PATCH] maint: fix license on polkit script

2012-10-16 Thread Daniel P. Berrange
On Mon, Oct 15, 2012 at 02:12:16PM -0600, Eric Blake wrote: As approved here: https://www.redhat.com/archives/libvir-list/2012-October/msg00701.html * daemon/libvirtd.policy.in: Use LGPLv2+ license. --- I'm waiting for an ack on this one - even though the change is only to comments, I am

Re: [libvirt] [PATCH] conf: Fix crash with cleanup

2012-10-16 Thread Martin Kletzander
On 10/16/2012 11:48 AM, Michal Privoznik wrote: On 16.10.2012 11:19, Martin Kletzander wrote: There was a crash possible when both boot dev... and boot order... were specified due to virDomainDefParseBootXML() erroring out before setting *tmp (which was free'd in cleanup). As a fix, I

[libvirt] [RFC][PATCH] change the meaning of vnc port in xml

2012-10-16 Thread Hu Tao
Now the vnc port in xml file reflects the REAL port hypervisor will listen on for vnc connection. But vnc ports usually start from 5900, it's common to say 0 for 5900, 1 for 5901, and so on. This patch forbids negative vnc port number in xml, and maps port number below 5900 to 5900+port, but no

Re: [libvirt] [PATCH] conf: Fix crash with cleanup

2012-10-16 Thread Martin Kletzander
On 10/16/2012 11:50 AM, Daniel P. Berrange wrote: On Tue, Oct 16, 2012 at 11:19:55AM +0200, Martin Kletzander wrote: There was a crash possible when both boot dev... and boot order... were specified due to virDomainDefParseBootXML() erroring out before setting *tmp (which was free'd in

Re: [libvirt] [RFC][PATCH] change the meaning of vnc port in xml

2012-10-16 Thread Martin Kletzander
On 10/16/2012 11:54 AM, Hu Tao wrote: Now the vnc port in xml file reflects the REAL port hypervisor will listen on for vnc connection. But vnc ports usually start from 5900, it's common to say 0 for 5900, 1 for 5901, and so on. This patch forbids negative vnc port number in xml, and maps

Re: [libvirt] [RFC][PATCH] change the meaning of vnc port in xml

2012-10-16 Thread Daniel P. Berrange
On Tue, Oct 16, 2012 at 05:54:50PM +0800, Hu Tao wrote: Now the vnc port in xml file reflects the REAL port hypervisor will listen on for vnc connection. But vnc ports usually start from 5900, it's common to say 0 for 5900, 1 for 5901, and so on. This patch forbids negative vnc port number

[libvirt] [PATCH] conf: add test for boot dev and order

2012-10-16 Thread Martin Kletzander
Add test for 280b8c9e7c94db1decdca08d169c88554c09fa19. --- .../qemuxml2argv-boot-dev+order.xml| 56 ++ tests/qemuxml2argvtest.c | 3 ++ 2 files changed, 59 insertions(+) create mode 100644

[libvirt] [PATCH] spec: Require newer sanlock on recent distros

2012-10-16 Thread Jiri Denemark
Make sure libvirt is build with sanlock = 2.4 on distros that are new enough to provide it. --- libvirt.spec.in | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libvirt.spec.in b/libvirt.spec.in index 75623eb..15c6b39 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -410,8 +410,14

[libvirt] [PATCH] locking: Fix build with sanlock 2.4

2012-10-16 Thread Jiri Denemark
libvirt started using sanlock_killpath to implement on_lockfailure action. Since sanlock_killpath was introduced in sanlock 2.4, libvirt fails to build with older sanlock. --- configure.ac | 7 +++ src/locking/lock_driver_sanlock.c | 13 + 2 files changed, 20

Re: [libvirt] [PATCH] conf: add test for boot dev and order

2012-10-16 Thread Jiri Denemark
On Tue, Oct 16, 2012 at 12:27:35 +0200, Martin Kletzander wrote: Add test for 280b8c9e7c94db1decdca08d169c88554c09fa19. --- .../qemuxml2argv-boot-dev+order.xml| 56 ++ tests/qemuxml2argvtest.c | 3 ++ 2 files changed, 59

Re: [libvirt] [PATCH] conf: add test for boot dev and order

2012-10-16 Thread Martin Kletzander
On 10/16/2012 01:36 PM, Jiri Denemark wrote: On Tue, Oct 16, 2012 at 12:27:35 +0200, Martin Kletzander wrote: Add test for 280b8c9e7c94db1decdca08d169c88554c09fa19. --- .../qemuxml2argv-boot-dev+order.xml| 56 ++ tests/qemuxml2argvtest.c

Re: [libvirt] [PATCH] locking: Fix build with sanlock 2.4

2012-10-16 Thread Martin Kletzander
On 10/16/2012 12:54 PM, Jiri Denemark wrote: libvirt started using sanlock_killpath to implement on_lockfailure action. Since sanlock_killpath was introduced in sanlock 2.4, libvirt fails to build with older sanlock. --- configure.ac | 7 +++

Re: [libvirt] [PATCH] spec: Require newer sanlock on recent distros

2012-10-16 Thread Martin Kletzander
On 10/16/2012 12:55 PM, Jiri Denemark wrote: Make sure libvirt is build with sanlock = 2.4 on distros that are new enough to provide it. --- libvirt.spec.in | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libvirt.spec.in b/libvirt.spec.in index 75623eb..15c6b39 100644 ---

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

2012-10-16 Thread Daniel P. Berrange
On Thu, Oct 11, 2012 at 12:17:56PM +0800, liguang wrote: 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 migration

Re: [libvirt] [RFC] [PATCH v3 2/6] add fuse support for libvirt lxc

2012-10-16 Thread Daniel P. Berrange
On Mon, Oct 08, 2012 at 08:43:28AM +0800, Gao feng wrote: 于 2012年09月26日 02:37, Daniel P. Berrange 写道: On Tue, Sep 11, 2012 at 10:54:48AM +0800, Gao feng wrote: this patch addes fuse support for libvirt lxc. we can use fuse filesystem to generate sysinfo dynamically, So we can isolate

[libvirt] [PATCHv2] spec: Add runtime requirement for libssh2

2012-10-16 Thread Peter Krempa
libssh2 unfortunately doesn't support symbol versioning so RPM can't figure out what version is needed for the currently installed libvirt package. This patch adds a runtime requirement, so that the correct version of libssh2 can be installed along with libvirt. --- Diff to v1: - be more specific

Re: [libvirt] [PATCHv2] spec: Add runtime requirement for libssh2

2012-10-16 Thread Michal Privoznik
On 16.10.2012 14:37, Peter Krempa wrote: libssh2 unfortunately doesn't support symbol versioning so RPM can't figure out what version is needed for the currently installed libvirt package. This patch adds a runtime requirement, so that the correct version of libssh2 can be installed along with

Re: [libvirt] [PATCH 02/12] Add JSON serialization of virLockSpacePtr objects for process re-exec()

2012-10-16 Thread Daniel P. Berrange
On Fri, Oct 05, 2012 at 01:25:51PM +0200, Michal Privoznik wrote: On 12.09.2012 18:28, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Add two new APIs virLockSpaceNewPostExecRestart and virLockSpacePreExecRestart which allow a virLockSpacePtr object to be

Re: [libvirt] necessary to limit container's network bandwidth when use physical nic in container?

2012-10-16 Thread Eric W. Biederman
Gao feng gaof...@cn.fujitsu.com writes: 于 2012年10月15日 16:52, Michal Privoznik 写道: On 15.10.2012 10:35, Gao feng wrote: we can use tc to limit container's network bandwidth when the container uses veth device. because one of the veth devices will be seen in the host.so we can set tc rules

[libvirt] [PATCH] [libvirt-snmp] List inactive domains

2012-10-16 Thread Jorge Boncompte [DTI2]
From: Jorge Boncompte [DTI2] jo...@dti2.net Monitoring app can't otherwise differentiate between a stopped domain or a nonexistent one. Signed-off-by: Jorge Boncompte [DTI2] jo...@dti2.net --- src/libvirtSnmp.c | 186 +++-- 1 file changed, 123

[libvirt] [PATCHv2 1/9] virNodeGetCPUMapFlags: Define public API.

2012-10-16 Thread Viktor Mihajlovski
Adding a new API to obtain information about the host node's present, online and offline CPUs. int virNodeGetCPUMapFlags(virConnectPtr conn, unsigned char **cpumap, unsigned int *online, unsigned int flags); The

[libvirt] [PATCHv2 5/9] libvirt.h.in: Add new cpumap macro VIR_CPU_USED

2012-10-16 Thread Viktor Mihajlovski
New macro VIR_CPU_USED added to facilitate the interpretation of cpu maps. Further, hardened the other cpumap macros against invocations like VIR_CPU_USE(cpumap + 1, cpu) Signed-off-by: Viktor Mihajlovski mihaj...@linux.vnet.ibm.com --- include/libvirt/libvirt.h.in | 20 1

[libvirt] [PATCHv2 0/9] Resend: New API to retrieve host node CPU map

2012-10-16 Thread Viktor Mihajlovski
Resending the otherwise unmodified V2 series, as the cover letter didn't show up on the mailing list (at least not in the archive). Sorry for the extra traffic, but I have no clue what went wrong. V2 Changes: Added python binding for virNodeGetCPUMapFlags. Removed RFC stanza. Rationale: In

[libvirt] [PATCHv2 9/9] virNodeGetCPUMapFlags: Add python binding

2012-10-16 Thread Viktor Mihajlovski
Added a method getCPUMapFlags to virConnect. It can be used as follows: import libvirt import sys import os conn = libvirt.openReadOnly(None) if conn == None: print 'Failed to open connection to the hypervisor' sys.exit(1) try: (cpus, cpumap, online) = conn.getCPUMapFlags(0) except:

[libvirt] [PATCHv2 6/9] virNodeGetCPUMapFlags: Implement virsh support.

2012-10-16 Thread Viktor Mihajlovski
- Added a new host command nodecpumap - Added documentation Example: $ virsh nodecpumap CPUs present: 8 CPUs online: 3 CPU map: 10101000 Signed-off-by: Viktor Mihajlovski mihaj...@linux.vnet.ibm.com --- tools/virsh-host.c | 41 +

[libvirt] [PATCHv2 3/9] virNodeGetCPUMapFlags: Implement public API.

2012-10-16 Thread Viktor Mihajlovski
Added implementation of virNodeGetCPUMapFlags to libvirt.c Signed-off-by: Viktor Mihajlovski mihaj...@linux.vnet.ibm.com --- src/libvirt.c | 56 1 files changed, 56 insertions(+), 0 deletions(-) diff --git a/src/libvirt.c

[libvirt] [PATCHv2 2/9] virNodeGetCPUMapFlags: Define driver API.

2012-10-16 Thread Viktor Mihajlovski
Extend the driver structure by nodeGetCPUMapFlags entry in support of the new API virNodeGetCPUMapFlags. Signed-off-by: Viktor Mihajlovski mihaj...@linux.vnet.ibm.com --- src/driver.h |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/src/driver.h b/src/driver.h index

[libvirt] [PATCHv2 4/9] virNodeGetCPUMapFlags: Implement wire protocol.

2012-10-16 Thread Viktor Mihajlovski
- Defined the wire protocol format for virNodeGetCPUMapFlags and its arguments - Implemented remote method invocation (remoteNodeGetCPUMapFlags) - Implemented method dispacher (remoteDispatchNodeGetCPUMapFlags) Signed-off-by: Viktor Mihajlovski mihaj...@linux.vnet.ibm.com --- daemon/remote.c

[libvirt] [PATCHv2 8/9] virNodeGetCPUMapFlags: Implement driver support

2012-10-16 Thread Viktor Mihajlovski
Driver support added for: - test, pretending 8 host CPUS, 3 being online - qemu, using nodeGetCPUMapFlags Signed-off-by: Viktor Mihajlovski mihaj...@linux.vnet.ibm.com --- src/qemu/qemu_driver.c |1 + src/test/test_driver.c | 30 ++ 2 files changed, 31

Re: [libvirt] [PATCH] maint: fix license on polkit script

2012-10-16 Thread Eric Blake
On 10/16/2012 03:48 AM, Daniel P. Berrange wrote: On Mon, Oct 15, 2012 at 02:12:16PM -0600, Eric Blake wrote: As approved here: https://www.redhat.com/archives/libvir-list/2012-October/msg00701.html * daemon/libvirtd.policy.in: Use LGPLv2+ license. --- I'm waiting for an ack on this one -

Re: [libvirt] [PATCH] maint: prepare for next release number

2012-10-16 Thread Eric Blake
On 10/16/2012 01:48 AM, Peter Krempa wrote: On 10/15/12 23:20, Eric Blake wrote: Given Daniel's announcement[1], code targetting the next release will be in 1.0.0, not 0.10.3. Changed mechanically with: for f in $(git grep -l '0\(.\)10\13\b') ; do sed -i -e 's/0\(.\)10\13/1\10\10/g' $f

Re: [libvirt] [PATCH] tests: Fix domain-events python test

2012-10-16 Thread Martin Kletzander
On 10/16/2012 04:38 PM, Peter Krempa wrote: On 10/16/12 16:32, Martin Kletzander wrote: There was a missing method in python implementation of domain-events test and this patch adds that. --- examples/domain-events/events-python/event-test.py | 3 +++ 1 file changed, 3 insertions(+)

[libvirt] [PATCH] tests: Fix domain-events python test

2012-10-16 Thread Martin Kletzander
There was a missing method in python implementation of domain-events test and this patch adds that. --- examples/domain-events/events-python/event-test.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/domain-events/events-python/event-test.py

Re: [libvirt] [PATCH] tests: Fix domain-events python test

2012-10-16 Thread Peter Krempa
On 10/16/12 16:32, Martin Kletzander wrote: There was a missing method in python implementation of domain-events test and this patch adds that. --- examples/domain-events/events-python/event-test.py | 3 +++ 1 file changed, 3 insertions(+) ACK. Peter -- libvir-list mailing list

Re: [libvirt] [PATCHv2 09/16] storage: don't require caller to pre-allocate metadata struct

2012-10-16 Thread Laine Stump
On 10/13/2012 06:00 PM, Eric Blake wrote: Requiring pre-allocation was an unusual idiom. It allowed iteration over the backing chain to use fewer mallocs, but made one-shot clients harder to read. Also, this makes it easier for a future patch to move away from opening fds on every iteration

[libvirt] [PATCH] Fix virProcessKillPainfully on Win32

2012-10-16 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Win32 platforms don't have SIGKILL defined, but they do have SIGABRT. Since our virProcess wrapper treats anything which isn't SIGTERM/SIGINT as equivalent to SIGKILL, just use SIGABRT on Win32. Pushed as a Win32 build break fix Signed-off-by: Daniel

Re: [libvirt] [PATCHv2 08/16] storage: get entire metadata chain in one call

2012-10-16 Thread Laine Stump
On 10/13/2012 06:00 PM, Eric Blake wrote: Previously, no one was using virStorageFileGetMetadata, and for good reason - it couldn't support root-squash NFS. Change the signature and make it useful to future patches, including enhancing the metadata to recursively track the entire chain. *

Re: [libvirt] [PATCH] [libvirt-snmp] List inactive domains

2012-10-16 Thread Michal Privoznik
On 16.10.2012 14:25, Jorge Boncompte [DTI2] wrote: From: Jorge Boncompte [DTI2] jo...@dti2.net Monitoring app can't otherwise differentiate between a stopped domain or a nonexistent one. Signed-off-by: Jorge Boncompte [DTI2] jo...@dti2.net --- src/libvirtSnmp.c | 186

Re: [libvirt] [PATCHv2 08/16] storage: get entire metadata chain in one call

2012-10-16 Thread Eric Blake
On 10/16/2012 08:43 AM, Laine Stump wrote: On 10/13/2012 06:00 PM, Eric Blake wrote: Previously, no one was using virStorageFileGetMetadata, and for good reason - it couldn't support root-squash NFS. Change the signature and make it useful to future patches, including enhancing the metadata

Re: [libvirt] [PATCHv2 10/16] storage: remember relative names in backing chain

2012-10-16 Thread Laine Stump
On 10/13/2012 06:00 PM, Eric Blake wrote: In order to search for a backing file name as literally present in a chain, we need to remember if the chain had relative names. Also, searching for absolute names is easier if we only have to canonicalize once, rather than on every iteration. *

Re: [libvirt] [PATCH] Fix virProcessKillPainfully on Win32

2012-10-16 Thread Eric Blake
On 10/16/2012 08:47 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Win32 platforms don't have SIGKILL defined, but they do have SIGABRT. Since our virProcess wrapper treats anything which isn't SIGTERM/SIGINT as equivalent to SIGKILL, just use SIGABRT on Win32.

Re: [libvirt] [PATCHv2 10/16] storage: remember relative names in backing chain

2012-10-16 Thread Eric Blake
On 10/16/2012 09:09 AM, Laine Stump wrote: On 10/13/2012 06:00 PM, Eric Blake wrote: In order to search for a backing file name as literally present in a chain, we need to remember if the chain had relative names. Also, searching for absolute names is easier if we only have to canonicalize

Re: [libvirt] [PATCHv2 11/16] storage: make it easier to find file within chain

2012-10-16 Thread Eric Blake
On 10/13/2012 04:00 PM, Eric Blake wrote: In order to temporarily label files read/write during a commit operation, we need to crawl the backing chain and find the absolute file name that needs labeling in the first place, as well as the name of the file that owns the backing file. +

Re: [libvirt] [PATCHv2 11/16] storage: make it easier to find file within chain

2012-10-16 Thread Laine Stump
On 10/13/2012 06:00 PM, Eric Blake wrote: In order to temporarily label files read/write during a commit operation, we need to crawl the backing chain and find the absolute file name that needs labeling in the first place, as well as the name of the file that owns the backing file. *

Re: [libvirt] [PATCHv2 08/16] storage: get entire metadata chain in one call

2012-10-16 Thread Laine Stump
On 10/16/2012 10:58 AM, Eric Blake wrote: On 10/16/2012 08:43 AM, Laine Stump wrote: On 10/13/2012 06:00 PM, Eric Blake wrote: Previously, no one was using virStorageFileGetMetadata, and for good reason - it couldn't support root-squash NFS. Change the signature and make it useful to future

Re: [libvirt] [PATCHv2 11/16] storage: make it easier to find file within chain

2012-10-16 Thread Eric Blake
On 10/16/2012 09:55 AM, Laine Stump wrote: On 10/13/2012 06:00 PM, Eric Blake wrote: In order to temporarily label files read/write during a commit operation, we need to crawl the backing chain and find the absolute file name that needs labeling in the first place, as well as the name of the

Re: [libvirt] [PATCHv2 01/16] storage: list more file types

2012-10-16 Thread Eric Blake
On 10/13/2012 03:59 PM, Eric Blake wrote: When an image has no backing file, using VIR_STORAGE_FILE_AUTO for its type is a bit confusing. Additionally, a future patch would like to reserve a default value for the case of no file type specified in the XML, but different from the current use

Re: [libvirt] [PATCHv2 11/16] storage: make it easier to find file within chain

2012-10-16 Thread Laine Stump
On 10/16/2012 12:06 PM, Eric Blake wrote: On 10/16/2012 09:55 AM, Laine Stump wrote: On 10/13/2012 06:00 PM, Eric Blake wrote: In order to temporarily label files read/write during a commit operation, we need to crawl the backing chain and find the absolute file name that needs labeling in

[libvirt] [PATCH v3 0/4] command line fd passing using fd sets

2012-10-16 Thread Corey Bryant
This series adds command line file descriptor passing support via a new -add-fd option. This is a follow-on to the existing QMP fd passing support provided in the following patch series: comments.gmane.org/gmane.comp.emulators.qemu/165463 The new -add-fd option is designed to mirror the add-fd

[libvirt] [PATCH v3 4/4] qemu-config: Add new -add-fd command line option

2012-10-16 Thread Corey Bryant
This option can be used for passing file descriptors on the command line. It mirrors the existing add-fd QMP command which allows an fd to be passed to QEMU via SCM_RIGHTS and added to an fd set. This can be combined with commands such as -drive to link file descriptors in an fd set to a drive:

[libvirt] [PATCH v3 1/4] monitor: Allow add-fd to any specified fd set

2012-10-16 Thread Corey Bryant
The first call to add an fd to an fd set was previously not allowed to choose the fd set ID. The ID was generated as the first available and ensuing calls could add more fds by specifying the fd set ID. This change allows users to choose the fd set ID on the first call. Signed-off-by: Corey

[libvirt] [PATCH v3 3/4] monitor: Prevent removing fd from set during init

2012-10-16 Thread Corey Bryant
If an fd is added to an fd set via the command line, and it is not referenced by another command line option (ie. -drive), then clean it up after QEMU initialization is complete. Signed-off-by: Corey Bryant cor...@linux.vnet.ibm.com --- v3: - This patch was split into it's own patch in v3

[libvirt] [PATCH v3 2/4] monitor: Enable adding an inherited fd to an fd set

2012-10-16 Thread Corey Bryant
qmp_add_fd() gets an fd that was received over a socket with SCM_RIGHTS and adds it to an fd set. This patch adds support that will enable adding an fd that was inherited on the command line to an fd set. Note: All of the code added to monitor_fdset_add_fd(), with the exception of the error path

Re: [libvirt] [PATCHv2 12/16] storage: cache backing chain while qemu domain is live

2012-10-16 Thread Laine Stump
On 10/13/2012 06:00 PM, Eric Blake wrote: Technically, we should not be re-probing any file that qemu might be currently writing to. As such, we should cache the backing file chain prior to starting qemu. This patch adds the cache, but does not use it until the next patch. Ultimately, we

Re: [libvirt] [PATCH v2 2/2] selinux: add security selinux function to label tapfd

2012-10-16 Thread Eric Blake
On 10/15/2012 03:03 AM, Guannan Ren wrote: BZ:https://bugzilla.redhat.com/show_bug.cgi?id=851981 When using macvtap, a character device gets first created by kernel with name /dev/tapN, its selinux context is: system_u:object_r:device_t:s0 Shortly, when udev gets notification when new file

Re: [libvirt] [PATCH v3 0/4] command line fd passing using fd sets

2012-10-16 Thread Eric Blake
On 10/16/2012 11:51 AM, Corey Bryant wrote: This series adds command line file descriptor passing support via a new -add-fd option. This is a follow-on to the existing QMP fd passing support provided in the following patch series: comments.gmane.org/gmane.comp.emulators.qemu/165463 The new

Re: [libvirt] [PATCH v3 0/4] command line fd passing using fd sets

2012-10-16 Thread Corey Bryant
On 10/16/2012 03:26 PM, Eric Blake wrote: On 10/16/2012 11:51 AM, Corey Bryant wrote: This series adds command line file descriptor passing support via a new -add-fd option. This is a follow-on to the existing QMP fd passing support provided in the following patch series:

Re: [libvirt] [PATCHv2 12/16] storage: cache backing chain while qemu domain is live

2012-10-16 Thread Eric Blake
On 10/16/2012 01:02 PM, Laine Stump wrote: On 10/13/2012 06:00 PM, Eric Blake wrote: Technically, we should not be re-probing any file that qemu might be currently writing to. As such, we should cache the backing file chain prior to starting qemu. This patch adds the cache, but does not use

Re: [libvirt] [PATCH] locking: Fix build with sanlock 2.4

2012-10-16 Thread Jiri Denemark
On Tue, Oct 16, 2012 at 14:06:58 +0200, Martin Kletzander wrote: On 10/16/2012 12:54 PM, Jiri Denemark wrote: libvirt started using sanlock_killpath to implement on_lockfailure action. Since sanlock_killpath was introduced in sanlock 2.4, libvirt fails to build with older sanlock. ---

Re: [libvirt] [PATCH] spec: Require newer sanlock on recent distros

2012-10-16 Thread Jiri Denemark
On Tue, Oct 16, 2012 at 14:07:14 +0200, Martin Kletzander wrote: On 10/16/2012 12:55 PM, Jiri Denemark wrote: Make sure libvirt is build with sanlock = 2.4 on distros that are new enough to provide it. --- libvirt.spec.in | 6 ++ 1 file changed, 6 insertions(+) ACK, Pushed,

Re: [libvirt] [PATCH v3 1/4] monitor: Allow add-fd to any specified fd set

2012-10-16 Thread Eric Blake
On 10/16/2012 12:05 PM, Corey Bryant wrote: The first call to add an fd to an fd set was previously not allowed to choose the fd set ID. The ID was generated as the first available and ensuing calls could add more fds by specifying the fd set ID. This change allows users to choose the fd

Re: [libvirt] [PATCHv2] spec: Add runtime requirement for libssh2

2012-10-16 Thread Peter Krempa
On 10/16/12 14:58, Michal Privoznik wrote: On 16.10.2012 14:37, Peter Krempa wrote: libssh2 unfortunately doesn't support symbol versioning so RPM can't figure out what version is needed for the currently installed libvirt package. This patch adds a runtime requirement, so that the correct

Re: [libvirt] [PATCHv2 13/16] storage: use cache to walk backing chain

2012-10-16 Thread Laine Stump
On 10/13/2012 06:00 PM, Eric Blake wrote: We used to walk the backing file chain at least twice per disk, once to set up cgroup device whitelisting, and once to set up security labeling. Rather than walk the chain every iteration, which possibly includes calls to fork() in order to open

Re: [libvirt] [PATCH v3 2/4] monitor: Enable adding an inherited fd to an fd set

2012-10-16 Thread Eric Blake
On 10/16/2012 12:08 PM, Corey Bryant wrote: qmp_add_fd() gets an fd that was received over a socket with SCM_RIGHTS and adds it to an fd set. This patch adds support that will enable adding an fd that was inherited on the command line to an fd set. Note: All of the code added to

Re: [libvirt] [PATCHv2 12/16] storage: cache backing chain while qemu domain is live

2012-10-16 Thread Laine Stump
On 10/16/2012 04:07 PM, Eric Blake wrote: On 10/16/2012 01:02 PM, Laine Stump wrote: On 10/13/2012 06:00 PM, Eric Blake wrote: Technically, we should not be re-probing any file that qemu might be currently writing to. As such, we should cache the backing file chain prior to starting qemu.

Re: [libvirt] [PATCHv2 13/16] storage: use cache to walk backing chain

2012-10-16 Thread Eric Blake
On 10/16/2012 02:51 PM, Laine Stump wrote: On 10/13/2012 06:00 PM, Eric Blake wrote: We used to walk the backing file chain at least twice per disk, once to set up cgroup device whitelisting, and once to set up security labeling. Rather than walk the chain every iteration, which possibly

Re: [libvirt] [PATCHv2 14/16] blockjob: manage qemu block-commit monitor command

2012-10-16 Thread Laine Stump
On 10/13/2012 06:00 PM, Eric Blake wrote: qemu 1.3 will be adding a 'block-commit' monitor command, per qemu.git commit ed61fc1. It matches nicely to the libvirt API virDomainBlockCommit. Hmm. Imagine that. What serendipity. I wonder how that could have happened. etc :-) *

Re: [libvirt] [PATCHv2 14/16] blockjob: manage qemu block-commit monitor command

2012-10-16 Thread Eric Blake
On 10/16/2012 03:18 PM, Laine Stump wrote: On 10/13/2012 06:00 PM, Eric Blake wrote: qemu 1.3 will be adding a 'block-commit' monitor command, per qemu.git commit ed61fc1. It matches nicely to the libvirt API virDomainBlockCommit. Hmm. Imagine that. What serendipity. I wonder how that

[libvirt] [PATCH] spec: Require newer sanlock on recent distros 2

2012-10-16 Thread Jiri Denemark
The previous commit was incomplete. We need to also add explicit Requires for the newer version since RPM's automatic dependencies won't work with sanlock. --- libvirt.spec.in | 4 1 file changed, 4 insertions(+) diff --git a/libvirt.spec.in b/libvirt.spec.in index 15c6b39..a0dc560 100644

Re: [libvirt] [PATCH] spec: Require newer sanlock on recent distros 2

2012-10-16 Thread Peter Krempa
On 10/16/12 23:55, Jiri Denemark wrote: The previous commit was incomplete. We need to also add explicit Requires for the newer version since RPM's automatic dependencies won't work with sanlock. --- libvirt.spec.in | 4 1 file changed, 4 insertions(+) ACK. Peter -- libvir-list

Re: [libvirt] [PATCH] spec: Require newer sanlock on recent distros 2

2012-10-16 Thread Jiri Denemark
On Tue, Oct 16, 2012 at 23:59:51 +0200, Peter Krempa wrote: On 10/16/12 23:55, Jiri Denemark wrote: The previous commit was incomplete. We need to also add explicit Requires for the newer version since RPM's automatic dependencies won't work with sanlock. --- libvirt.spec.in | 4

[libvirt] [PATCHv2 18/16] blockjob: properly label disks for qemu block-commit

2012-10-16 Thread Eric Blake
I finally have all the pieces in place to perform a block-commit with SELinux enforcing. There's still missing cleanup work when the commit completes, but doing that requires tracking both the backing chain and the base and top files within that chain in domain XML across libvirtd restarts. *

[libvirt] [PATCHv2 17/16] blockjob: refactor qemu disk chain permission grants

2012-10-16 Thread Eric Blake
Previously, snapshot code did its own permission granting (lock manager, cgroup device controller, and security manager labeling) inline. But now that we are adding block-commit and block-copy which also have to change permissions, it's better to reuse common code for the task. While snapshot

[libvirt] LIBVIRT_DEBUG=1 libvirtd regression

2012-10-16 Thread Cole Robinson
Hey Dan, This commit changes the behavior of LIBVIRT_DEBUG=1 libvirtd: $ git show 7022b09111d4322d21396a70d58320a9ad773962 commit 7022b09111d4322d21396a70d58320a9ad773962 Author: Daniel P. Berrange berra...@redhat.com Date: Thu Sep 27 13:13:09 2012 +0100 Automatically enable systemd

[libvirt] [PATCH 1/2] storage: lvm: Don't overwrite lvcreate errors

2012-10-16 Thread Cole Robinson
Before: $ sudo virsh vol-create-as --pool vgvirt sparsetest --capacity 16M --allocation 0 error: Failed to create vol sparsetest error: internal error Child process (/usr/sbin/lvchange -aln vgvirt/sparsetest) unexpected exit status 5: One or more specified logical volume(s) not found. After: $

[libvirt] [PATCH 2/2] storage: lvm: lvcreate fails with allocation=0, don't do that

2012-10-16 Thread Cole Robinson
On F17 at least, this command fails: $ sudo /usr/sbin/lvcreate --name sparsetest -L 0K --virtualsize 16384K vgvirt Unable to create new logical volume with no extents Which is unfortunate since allocation=0 is what virt-manager tries to use by default. Rather than telling the user 'don't do

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

2012-10-16 Thread li guang
在 2012-10-16二的 13:19 +0100,Daniel P. Berrange写道: On Thu, Oct 11, 2012 at 12:17:56PM +0800, liguang wrote: 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

Re: [libvirt] [PATCHv2 05/16] storage: use enum for disk driver type

2012-10-16 Thread Eric Blake
On 10/13/2012 04:00 PM, Eric Blake wrote: Actually use the enum in the domain conf structure. * src/conf/domain_conf.h (_virDomainDiskDef): Store enum rather than string for disk type. * src/conf/domain_conf.c (virDomainDiskDefFree) (virDomainDiskDefParseXML, virDomainDiskDefFormat)

  1   2   >