[libvirt] Please help confirm this upsream issue

2013-08-07 Thread Zhenfeng Wang
Hi I just try to verify the bug 828546 with the latest libvirt version on rhel7, and found an issue that the on_crash element on guest's xml didn't support the rename-restart events on the upsteam. I discussed this issue with eric before, he said that this feature was implemented by fujitsu

Re: [libvirt] [PATCH v6 2/2] qemu: support to drop disk with 'optional' startupPolicy

2013-08-07 Thread Guannan Ren
On 08/06/2013 09:40 PM, Martin Kletzander wrote: On 08/02/2013 08:37 AM, Guannan Ren wrote: Go through disks of guest, if one disk doesn't exist or its backing chain is broken, with 'optional' startupPolicy, for CDROM and Floppy we only discard its source path definition in xml, for disks we

Re: [libvirt] Please help confirm this upsream issue

2013-08-07 Thread Daniel P. Berrange
On Wed, Aug 07, 2013 at 02:34:56AM -0400, Zhenfeng Wang wrote: Hi I just try to verify the bug 828546 with the latest libvirt version on rhel7, and found an issue that the on_crash element on guest's xml didn't support the rename-restart events on the upsteam. I discussed this issue with eric

Re: [libvirt] Please help confirm this upsream issue

2013-08-07 Thread Zhenfeng Wang
Hi Daniel Thanks for your reply, please ignore this mail, I will retest this issue on the upstream, also will correct my question later. - Original Message - From: Daniel P. Berrange berra...@redhat.com To: Zhenfeng Wang zhw...@redhat.com Cc: libvir-list@redhat.com Sent: Wednesday,

Re: [libvirt] [PATCH 0/4] Fix handling of CA certificate chains

2013-08-07 Thread Michal Privoznik
On 06.08.2013 13:35, Daniel P. Berrange wrote: This series fixes the CA certificate validation so that it correctly works when a client and server cert are both signed by intermediate CAs, sharing a common ancestor CA. -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH 2/4] Avoid re-generating certs every time

2013-08-07 Thread Michal Privoznik
On 06.08.2013 13:35, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Currently every test case in the TLS test suite generates the certs fresh. This is a waste of time, since its parameters don't change across test cases. Create certs once in main method.

Re: [libvirt] [PATCH 4/4] Fix validation of CA certificate chains

2013-08-07 Thread Michal Privoznik
On 06.08.2013 13:35, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The code added to validate CA certificates did not take into account the possibility that the cacert.pem file can contain multiple (concatenated) cert data blocks. Extend the code for loading CA

Re: [libvirt] [PATCH] build: fix configure detection of if_bridge.h on RHEL 6

2013-08-07 Thread Daniel P. Berrange
On Tue, Aug 06, 2013 at 02:41:55PM -0600, Eric Blake wrote: A fresh checkout on a RHEL 6 machine with these packages: kernel-headers-2.6.32-405.el6.x86_64 glibc-2.12-1.128.el6.x86_64 failed to configure with this message: checking for linux/if_bridge.h... no configure: error: You must

[libvirt] [sandbox][PATCH] Fix delete of running containers

2013-08-07 Thread Wayne Sun
The stop function is removed since 0.5.0, update delete function using virsh destroy to stop container. Signed-off-by: Wayne Sun g...@redhat.com --- bin/virt-sandbox-service |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/virt-sandbox-service

[libvirt] [PATCH] Add info about access control checks into API reference

2013-08-07 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com So that app developers / admins know what access control checks are performed for each API, this patch extends the API docs generator to include details of the ACLs for each. The gendispatch.pl script is extended so that it generates a simple XML

Re: [libvirt] [sandbox][PATCH] Fix delete of running containers

2013-08-07 Thread Daniel P. Berrange
On Wed, Aug 07, 2013 at 07:56:05PM +0800, Wayne Sun wrote: The stop function is removed since 0.5.0, update delete function using virsh destroy to stop container. Signed-off-by: Wayne Sun g...@redhat.com --- bin/virt-sandbox-service |6 -- 1 files changed, 4 insertions(+), 2

Re: [libvirt] [sandbox][PATCH] Fix delete of running containers

2013-08-07 Thread Wayne Sun
On 08/07/2013 08:08 PM, Daniel P. Berrange wrote: On Wed, Aug 07, 2013 at 07:56:05PM +0800, Wayne Sun wrote: The stop function is removed since 0.5.0, update delete function using virsh destroy to stop container. Signed-off-by: Wayne Sun g...@redhat.com --- bin/virt-sandbox-service |6

Re: [libvirt] Please help confirm this upsream issue

2013-08-07 Thread Eric Blake
On 08/07/2013 03:41 AM, Daniel P. Berrange wrote: On Wed, Aug 07, 2013 at 02:34:56AM -0400, Zhenfeng Wang wrote: Hi I just try to verify the bug 828546 with the latest libvirt version on rhel7, and found an issue that the on_crash element on guest's xml didn't support the rename-restart

Re: [libvirt] [PATCH] build: fix configure detection of if_bridge.h on RHEL 6

2013-08-07 Thread Eric Blake
On 08/07/2013 05:01 AM, Daniel P. Berrange wrote: On Tue, Aug 06, 2013 at 02:41:55PM -0600, Eric Blake wrote: A fresh checkout on a RHEL 6 machine with these packages: kernel-headers-2.6.32-405.el6.x86_64 glibc-2.12-1.128.el6.x86_64 failed to configure with this message: checking for

[libvirt] [sandbox][PATCH v2] Fix delete of running container

2013-08-07 Thread Wayne Sun
Delete running container is not supprted and will report an error. Related to bug: https://bugzilla.redhat.com/show_bug.cgi?id=994495 Signed-off-by: Wayne Sun g...@redhat.com --- bin/virt-sandbox-service | 15 ++- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git

Re: [libvirt] [PATCHv3] build: avoid -lgcrypt with newer gnutls

2013-08-07 Thread Doug Goldstein
On Tue, Jul 30, 2013 at 3:45 PM, Eric Blake ebl...@redhat.com wrote: https://bugzilla.redhat.com/show_bug.cgi?id=951637 Newer gnutls uses nettle, rather than gcrypt, which is a lot nicer regarding initialization. Yet we were unconditionally initializing gcrypt even when gnutls wouldn't be

Re: [libvirt] [PATCH 4/4] Fix validation of CA certificate chains

2013-08-07 Thread Doug Goldstein
On Tue, Aug 6, 2013 at 6:35 AM, Daniel P. Berrange berra...@redhat.com wrote: From: Daniel P. Berrange berra...@redhat.com The code added to validate CA certificates did not take into account the possibility that the cacert.pem file can contain multiple (concatenated) cert data blocks. Extend

Re: [libvirt] [sandbox][PATCH v2] Fix delete of running container

2013-08-07 Thread Daniel P. Berrange
On Wed, Aug 07, 2013 at 09:24:14PM +0800, Wayne Sun wrote: Delete running container is not supprted and will report an error. Related to bug: https://bugzilla.redhat.com/show_bug.cgi?id=994495 Signed-off-by: Wayne Sun g...@redhat.com --- bin/virt-sandbox-service | 15 ++-

Re: [libvirt] [PATCHv3] build: avoid -lgcrypt with newer gnutls

2013-08-07 Thread Eric Blake
On 08/07/2013 07:29 AM, Doug Goldstein wrote: On Tue, Jul 30, 2013 at 3:45 PM, Eric Blake ebl...@redhat.com wrote: https://bugzilla.redhat.com/show_bug.cgi?id=951637 Newer gnutls uses nettle, rather than gcrypt, which is a lot nicer regarding initialization. Yet we were unconditionally

Re: [libvirt] [PATCH 2/3] Reverse logic allowing partial DHCP host XML

2013-08-07 Thread Ján Tomko
On 08/02/2013 12:10 PM, Laine Stump wrote: On 07/31/2013 07:41 AM, Ján Tomko wrote: Before, missing attributes were only OK when adding entries; modification and deletion required all of them. Now, only deletion works with missing attributes, as long as the host is uniquely identified. ---

Re: [libvirt] [PATCH v2 2/3] Reverse logic allowing partial DHCP host XML

2013-08-07 Thread Ján Tomko
On 08/01/2013 10:42 AM, Ján Tomko wrote: Before, missing attributes were only OK when adding entries; modification and deletion required all of them. Now, only deletion works with missing attributes, as long as the host is uniquely identified. --- src/conf/network_conf.c | 21

[libvirt] [PATCH] virthread: include config.h in the header file

2013-08-07 Thread Paul Moore
The virthread.h header file includes platform specific header files that help define the thread implementation, see code snippet below. # ifdef WIN32 # include virthreadwin32.h # elif defined HAVE_PTHREAD_MUTEXATTR_INIT # include virthreadpthread.h # else # error Either pthreads or

Re: [libvirt] [PATCH] virthread: include config.h in the header file

2013-08-07 Thread Daniel P. Berrange
On Wed, Aug 07, 2013 at 11:11:20AM -0400, Paul Moore wrote: The virthread.h header file includes platform specific header files that help define the thread implementation, see code snippet below. # ifdef WIN32 # include virthreadwin32.h # elif defined HAVE_PTHREAD_MUTEXATTR_INIT #

Re: [libvirt] [PATCH] virthread: include config.h in the header file

2013-08-07 Thread Paul Moore
On Wednesday, August 07, 2013 04:25:04 PM Daniel P. Berrange wrote: On Wed, Aug 07, 2013 at 11:11:20AM -0400, Paul Moore wrote: The virthread.h header file includes platform specific header files that help define the thread implementation, see code snippet below. # ifdef WIN32 #

[libvirt] [PATCH] maint: the compiler is not always named gcc

2013-08-07 Thread Eric Blake
https://bugzilla.redhat.com/show_bug.cgi?id=994589 complained that even when using a cross-compiler not named 'gcc', the configure output confusingly referred to gcc. * m4/virt-compile-warnings.m4 (LIBVIRT_COMPILE_WARNINGS): Use a more generic statement in configure output. Signed-off-by: Eric

Re: [libvirt] [PATCH] build: fix configure detection of if_bridge.h on RHEL 6

2013-08-07 Thread Eric Blake
On 08/06/2013 02:41 PM, Eric Blake wrote: A fresh checkout on a RHEL 6 machine with these packages: kernel-headers-2.6.32-405.el6.x86_64 glibc-2.12-1.128.el6.x86_64 failed to configure with this message: checking for linux/if_bridge.h... no configure: error: You must install kernel-headers

[libvirt] [PATCHv2] build: fix configure detection of if_bridge.h on RHEL 6, try 2

2013-08-07 Thread Eric Blake
This is a second attempt at fixing the problem first attempted in commit 2df8d99; basically undoing the fact that it was reverted in commit 43cee32f, plus fixing one more issue: the code in configure.ac has to EXACTLY match virnetdevbridge.c with regards to declaring in6 types before using

Re: [libvirt] [PATCH] cgroup: refactor macros usage

2013-08-07 Thread Eric Blake
On 08/03/2013 12:01 PM, Roman Bogorodskiy wrote: util/vircgroup.c uses a lot of macros to detect if cgroup is supported by the system or not. These macros are pretty smart and allow to keep code compact, however the downside of that is that it's getting harder to navigate through the cgroup

Re: [libvirt] [PATCH] Add info about access control checks into API reference

2013-08-07 Thread Eric Blake
On 08/07/2013 12:06 PM, Eric Blake wrote: On 08/07/2013 06:06 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com So that app developers / admins know what access control checks are performed for each API, this patch extends the API docs generator to include details of

[libvirt] Patch for BUG ID 994657

2013-08-07 Thread Schmaus, John M. (John)
Hi All, Here is the change I made to address the SIGSEGV we were seeing in libvirtd when attempting to create a new VM via virt-install: - We call virDomainDefFree after xenDaemonCreateXML returns to xenUnifiedDomainCreateXML. - xenUnifiedDomainCreateXML passes def to

Re: [libvirt] Patch for BUG ID 994657

2013-08-07 Thread Eric Blake
On 08/07/2013 12:07 PM, Schmaus, John M. (John) wrote: Hi All, Here is the change I made to address the SIGSEGV we were seeing in libvirtd when attempting to create a new VM via virt-install: Thanks for taking time to identify a problem and propose a patch. Your patch didn't apply via 'git

[libvirt] [PATCH] maint: avoid C99 loop declaration

2013-08-07 Thread Eric Blake
Commit 3d0e3c1 reintroduced a problem previously squelched in commit 7e5aa78. Add a syntax check this time around. util/virutil.c: In function 'virGetGroupList': util/virutil.c:1015: error: 'for' loop initial declaration used outside C99 mode * cfg.mk (sc_prohibit_loop_var_decl): New rule. *

[libvirt] [PATCHv3] build: more workarounds for if_bridge.h

2013-08-07 Thread Eric Blake
This is a second attempt at fixing the problem first attempted in commit 2df8d99; basically undoing the fact that it was reverted in commit 43cee32f, plus fixing two more issues: the code in configure.ac has to EXACTLY match virnetdevbridge.c with regards to declaring in6 types before using

Re: [libvirt] [PATCHv2] build: fix configure detection of if_bridge.h on RHEL 6, try 2

2013-08-07 Thread Eric Blake
On 08/07/2013 10:50 AM, Eric Blake wrote: This is a second attempt at fixing the problem first attempted in commit 2df8d99; basically undoing the fact that it was reverted in commit 43cee32f, plus fixing one more issue: the code in configure.ac has to EXACTLY match virnetdevbridge.c with

[libvirt] [PATCH 00/10] test: Mock snapshot APIs and misc improvements

2013-08-07 Thread Cole Robinson
This series implements snapshot APIs for the test driver, and adds some misc improvements, like specifying domain state in the passed in driver XML. Cole Robinson (10): test: Split object parsing into their own functions test: Simplify args passed to testDomainStartState test: Unify object

[libvirt] [PATCH 06/10] test: Wire up managed save APIs

2013-08-07 Thread Cole Robinson
Also add a hasmanagedsave element to set this data when starting the connection. --- src/test/test_driver.c | 125 - tests/virshtest.c | 2 +- 2 files changed, 125 insertions(+), 2 deletions(-) diff --git a/src/test/test_driver.c

[libvirt] [PATCH 01/10] test: Split object parsing into their own functions

2013-08-07 Thread Cole Robinson
The function that parses custom driver XML was getting pretty unruly, split the object parsing into their own functions. Rename some variables to be consistent across each function. This should be functionally identical. --- src/test/test_driver.c | 463

[libvirt] [PATCH 04/10] test: Allow specifying object runstate in driver XML

2013-08-07 Thread Cole Robinson
When passing in custom driver XML, allow a block like domain ... testdriver runstate3/runstate /testdriver /domain This is only read at initial driver start time, and sets the initial run state of the object. This is handy for UI testing. Wire it up for domains, networks, pools, and

[libvirt] [PATCH 03/10] test: Unify object XML parsing

2013-08-07 Thread Cole Robinson
Right now things are split a bit between parsing from a relative file path or parsing from inline XML. Unify it. This will simplify upcoming bits. --- src/test/test_driver.c | 236 + 1 file changed, 103 insertions(+), 133 deletions(-) diff --git

[libvirt] [PATCH 07/10] snapshot_conf: Allow parsing an XML node

2013-08-07 Thread Cole Robinson
Similar to how other objects arrange their parse APIs. This will be used by the test driver. --- src/conf/snapshot_conf.c | 85 ++-- src/conf/snapshot_conf.h | 6 2 files changed, 67 insertions(+), 24 deletions(-) diff --git

[libvirt] [PATCH 02/10] test: Simplify args passed to testDomainStartState

2013-08-07 Thread Cole Robinson
Passing virConnectPtr is redundant, just pass testConnPtr and simplify certain callers. --- src/test/test_driver.c | 36 +--- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 718f83c..960a58e

[libvirt] [PATCH 09/10] test: Implement readonly snapshot APIs

2013-08-07 Thread Cole Robinson
This is just stolen from qemu_driver.c with tweaks to fit the test driver. --- src/test/test_driver.c | 392 + 1 file changed, 392 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 67c6d68..0d4cc85 100644 ---

[libvirt] [PATCH 10/10] test: Implement snapshot create/delete/revert APIs

2013-08-07 Thread Cole Robinson
Again stolen from qemu_driver.c, but dropping all the unneeded bits. This aims to copy all the current qemu validation checks since that's the most commonly used real driver, but some of the checks are completely artificial in the test driver. This only supports creation of internal snapshots for

[libvirt] [PATCH 05/10] test: Allow specifying object transient state in driver XML

2013-08-07 Thread Cole Robinson
Similar to the runstate commit, allow a block like: testdriver transient/ /testdriver Wire it up for domains and networks. Generalize the boolean lookup pattern since we are going to use it for other bits as well. --- src/test/test_driver.c | 45

[libvirt] [PATCH 08/10] test: Allow specifying domainsnapshot XML

2013-08-07 Thread Cole Robinson
The user can pass it in as a subelement of domain as we already do for storage volumes. --- src/test/test_driver.c | 67 ++ 1 file changed, 67 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 09260ba..67c6d68 100644

[libvirt] rhel 5 'make check' failure

2013-08-07 Thread Eric Blake
I ran out of time to investigate today, in case someone wants to beat me to a fix: virsystemdmock.c: In function 'dbus_connection_send_with_reply_and_block': virsystemdmod.c:68: warning: implicit declaration of function 'dbus_message_set_serial' this failure occurred on RHEL 5;

[libvirt] [PATCH 1/6] virsh: Print cephx and iscsi usage

2013-08-07 Thread John Ferlan
When using virsh secret-list - if the secret types are cephx or iscsi, then allow fetch/print of the usage information. Prior to the change the following would print: UUID Usage ---

[libvirt] [PATCH 0/6] Additional iSCSI/chap changes

2013-08-07 Thread John Ferlan
These patches address a couple of issues I ran into while doing extra testing on the iSCSI chap authentication patches: https://www.redhat.com/archives/libvir-list/2013-July/msg01378.html The first 2 or 3 patches should be candidiates to be put into rhel7.0 as updates/fixes to issues. The last 3

[libvirt] [PATCH 4/6] docs: Update the formatdomain disk examples

2013-08-07 Thread John Ferlan
Add more iSCSI examples including having a secret attached. There are 4 new examples one for each way to have an iSCSI - a network disk using virtio, a passthrough network lun using scsi, a volume disk using mode='host', and a volume disk using mode='direct' --- docs/formatdomain.html.in | 57

[libvirt] [PATCH 2/6] qemu_conf: Fix broken logic for adding passthrough iscsi lun

2013-08-07 Thread John Ferlan
Following XML would fail : disk type='network' device='lun' driver name='qemu' type='raw'/ source protocol='iscsi' name='iqn.2013-07.com.example:iscsi/1' host name='example.com' port='3260'/ /source target dev='sda' bus='scsi'/ /disk With the message:

[libvirt] [PATCH 3/6] Report secret usage error message similarly

2013-08-07 Thread John Ferlan
Each of the modules handled reporting error messages from the secret fetching slightly differently with respect to the error. Provide a similar message for each error case and provide as much data as possible. --- src/qemu/qemu_command.c | 28 ++--

[libvirt] [PATCH 6/6] docs: Update iSCSI storage pool example

2013-08-07 Thread John Ferlan
Update the iSCSI storage pool example to include the secret --- docs/formatstorage.html.in | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/formatstorage.html.in b/docs/formatstorage.html.in index f4d561f..278f89b 100644 --- a/docs/formatstorage.html.in +++

[libvirt] [PATCH 5/6] docs: Update formatsecrets to include more examples of each type

2013-08-07 Thread John Ferlan
Update formatsecret docs to describe the various options and provide examples in order to set up secrets for each type of secret. --- docs/formatsecret.html.in | 156 ++ 1 file changed, 145 insertions(+), 11 deletions(-) diff --git

[libvirt] [libvirt-sandbox][PATCH] Update man page about virt-sandbox-service

2013-08-07 Thread Zhe Peng
Add upgrade and remove start,stop,list --- bin/virt-sandbox-service.pod |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/virt-sandbox-service.pod b/bin/virt-sandbox-service.pod index 32caad9..e8ab55e 100644 --- a/bin/virt-sandbox-service.pod +++

Re: [libvirt] [libvirt-sandbox][PATCH] Update man page about virt-sandbox-service

2013-08-07 Thread Alex Jia
On 08/08/2013 10:42 AM, Zhe Peng wrote: Add upgrade and remove start,stop,list --- bin/virt-sandbox-service.pod |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/virt-sandbox-service.pod b/bin/virt-sandbox-service.pod index 32caad9..e8ab55e 100644 ---

[libvirt] [libvirt-sandbox][PATCH v2] Update man page about virt-sandbox-service

2013-08-07 Thread Zhe Peng
Add upgrade and remove start,stop,list --- bin/virt-sandbox-service.pod |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/virt-sandbox-service.pod b/bin/virt-sandbox-service.pod index 32caad9..7752145 100644 --- a/bin/virt-sandbox-service.pod +++

Re: [libvirt] [libvirt-sandbox][PATCH v2] Update man page about virt-sandbox-service

2013-08-07 Thread Alex Jia
On 08/08/2013 11:31 AM, Zhe Peng wrote: Add upgrade and remove start,stop,list ACK and pushed with comment update Remove obsolete 'list', 'start', 'stop' commands and add new 'upgrade' command. --- bin/virt-sandbox-service.pod |6 -- 1 files changed, 4 insertions(+), 2

[libvirt] virDomainCreateWithFlags error

2013-08-07 Thread Wangpan
Hi all, I'm using 'libvirt 1.1.1-1 amd64' undef debian wheezy, I found that the return code is 139 when I run command: $ sudo virsh start df1c4670-18eb-4520-b5d8-aa8a492eb876 --paused; echo $? 139 but the return code is OK(0) when run command: $ sudo virsh start