[libvirt] [libvirt-php][PATCH v1] fix installation prefix

2015-06-24 Thread Vasiliy Tolstov
when prefix present all stuff installed to /usr/usr/ Signed-off-by: Vasiliy Tolstov v.tols...@selfip.ru --- src/Makefile.am | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index cab0456..8e6a800 100644 --- a/src/Makefile.am +++

Re: [libvirt] [PATCH v2] docs: Properly mark acl.html dependencies

2015-06-24 Thread Peter Krempa
On Tue, Jun 23, 2015 at 14:46:36 +0200, Martin Kletzander wrote: On Tue, Jun 23, 2015 at 01:56:00PM +0200, Michal Privoznik wrote: The acl.html file includes aclperms.htmlinc which is generated. However, acl.html is generated too from acl.html.tmp. And in fact, this is the place where the

[libvirt] [PATCH] qemu: blockcopy: Forbid using persistent bitmap granularity with raw vols

2015-06-24 Thread Peter Krempa
qemu returns error but only in the event after the block job actually starts. Reject it upfront for a better error message. Instead of: $ virsh blockcopy vm hdc /tmp/raw.img --granularity 4096 --verbose --wait error: Block Copy unexpectedly failed You will now get: $ virsh blockcopy vm hdc

[libvirt] [PATCH] virt-aa-helper: fix rules for paths with trailing slash

2015-06-24 Thread Cédric Bosdonnat
Rules generated for a path like '/' were having '//' which isn't correct for apparmor. Make virt-aa-helper smarter to avoid these. --- src/security/virt-aa-helper.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/security/virt-aa-helper.c

Re: [libvirt] [PATCH] qemu:lxc:xml:libxl:xen: improve the error in openconsole/channel

2015-06-24 Thread Martin Kletzander
On Mon, Jun 15, 2015 at 09:58:36PM +0800, Luyao Huang wrote: We allow do not pass the dev_name to openconsole() and openchannel() function, but the error message is not good when we do not specified the console/channel name. the error message after this patch: error: internal error: character

[libvirt] [PATCH] qemu:conf: introduce a function to delete vcpu sched

2015-06-24 Thread Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1235180 We have API allow vpu to be deleted, but an vcpu may be included in some domain vcpu sched, so add a new API to allow removing an iothread from some entry. Split the virDomainIOThreadSchedDelId to reuse some code. Signed-off-by: Luyao Huang

Re: [libvirt] [PATCH 01/13] qemu: refactor qemuBuildControllerDevStr to eliminate future duplicate code

2015-06-24 Thread Ján Tomko
On Mon, Jun 22, 2015 at 02:44:06PM -0400, Laine Stump wrote: The PCI case of the switch statement in this function contains another switch statement with a case for each model. Currently every model except pci-root and pcie-root have a check for index 0 (since only every model has those two

[libvirt] [PATCH] docs: Fix trivial copy-paste error

2015-06-24 Thread Martin Kletzander
Signed-off-by: Martin Kletzander mklet...@redhat.com --- Pushed as trivial (in a while). docs/formatdomain.html.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 95d8c45487aa..f7b9f519a377 100644 ---

Re: [libvirt] [PATCH 00/13] PCIe fixes + new PCI controllers w/RFC

2015-06-24 Thread Ján Tomko
On Tue, Jun 23, 2015 at 09:06:24PM -0400, Laine Stump wrote: On 06/23/2015 11:57 AM, Ján Tomko wrote: On Mon, Jun 22, 2015 at 02:44:05PM -0400, Laine Stump wrote: [snip] === Idea 3: interpret controllers with missing subType as above, but actually write it out to the

Re: [libvirt] [PATCH] qemu: blockcopy: Forbid using persistent bitmap granularity with raw vols

2015-06-24 Thread Shanzhi Yu
On 06/24/2015 03:11 PM, Peter Krempa wrote: qemu returns error but only in the event after the block job actually starts. Reject it upfront for a better error message. Instead of: $ virsh blockcopy vm hdc /tmp/raw.img --granularity 4096 --verbose --wait error: Block Copy unexpectedly

Re: [libvirt] [PATCH] qemu:lxc:xml:libxl:xen: improve the error in openconsole/channel

2015-06-24 Thread lhuang
On 06/24/2015 04:12 PM, Martin Kletzander wrote: On Mon, Jun 15, 2015 at 09:58:36PM +0800, Luyao Huang wrote: We allow do not pass the dev_name to openconsole() and openchannel() function, but the error message is not good when we do not specified the console/channel name. the error message

Re: [libvirt] [PATCH 02/13] qemu: always permit PCI devices to be manually assigned to a PCIe bus

2015-06-24 Thread Ján Tomko
On Mon, Jun 22, 2015 at 02:44:07PM -0400, Laine Stump wrote: When support for the pcie-root and dmi-to-pci-bridge buses on a Q35 machinetype was added, I was concerned that even though qemu at the time allowed plugging a PCI device into a PCIe port, that it might not be supported in the

Re: [libvirt] [PATCH] qemu: blockcopy: Forbid using persistent bitmap granularity with raw vols

2015-06-24 Thread Peter Krempa
On Wed, Jun 24, 2015 at 16:48:16 +0800, Shanzhi Yu wrote: On 06/24/2015 03:11 PM, Peter Krempa wrote: qemu returns error but only in the event after the block job actually starts. Reject it upfront for a better error message. Instead of: $ virsh blockcopy vm hdc /tmp/raw.img

Re: [libvirt] [PATCH] conf: improve the way we format blkiotune and cputune

2015-06-24 Thread Martin Kletzander
On Tue, Jun 23, 2015 at 09:24:25PM +0800, Luyao Huang wrote: Just refactor existing code to use a child buf instead of check all element before format blkiotune and cputune. This will avoid the more and more bigger element check during we introduce new elements in blkiotune and cputune in the

Re: [libvirt] [[libvirt-php][PATCH v2] qemu-agent-command] fixes for installation and add another libvirt function

2015-06-24 Thread Vasiliy Tolstov
2015-06-22 15:04 GMT+03:00 Michal Privoznik mpriv...@redhat.com: These are semantically two separate changes and should go into separate patches. Can you please rebase, split and resend? Yes, thanks. I'm send two patches now. -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- libvir-list

[libvirt] [libvirt-php][PATCH v1] add libvirt_domain_qemu_agent_command

2015-06-24 Thread Vasiliy Tolstov
add another missing libvirt command Signed-off-by: Vasiliy Tolstov v.tols...@selfip.ru --- configure.ac | 3 +++ src/Makefile.am | 5 +++-- src/libvirt-php.c | 28 src/libvirt-php.h | 2 ++ 4 files changed, 36 insertions(+), 2 deletions(-) diff --git

Re: [libvirt] [PATCH] virt-xml-validate: Allow input to be read from stdin

2015-06-24 Thread Martin Kletzander
On Wed, Jun 10, 2015 at 12:03:44PM +0200, Johannes Holmberg wrote: --- Hello, I often find myself wanting to validate a domain xml without having to save it to a file, so I've updated virt-xml-validate to support the standard practice of reading from stdin when - is given as the input file. Of

Re: [libvirt] [PATCH] conf: Adjust invalid secrettype setting during parse

2015-06-24 Thread Martin Kletzander
On Mon, Jun 15, 2015 at 03:00:16PM -0400, John Ferlan wrote: Commit id '1feaccf0' attempted to handle an empty secrettype value; however, it made a mistake by processing the secretType as if it was the original secrettype string. The 'secretType' is actually whether 'usage' or 'uuid' was used.

[libvirt] [PATCH v2 3/4] Support for the new watchdog model diag288

2015-06-24 Thread Boris Fiuczynski
This patch provides support for the new watchdog model diag288. Signed-off-by: Boris Fiuczynski fiu...@linux.vnet.ibm.com Reviewed-by: Daniel Hansel daniel.han...@linux.vnet.ibm.com Reviewed-by: Stefan Zimmermann s...@linux.vnet.ibm.com Reviewed-by: Tony Krowiak akrow...@linux.vnet.ibm.com ---

[libvirt] [PATCH v2 1/4] Support for a new watchdog action inject-nmi

2015-06-24 Thread Boris Fiuczynski
This patch provides support for a new watchdog action inject-nmi which allows to define an inject of a non-maskable interrupt into a guest. Signed-off-by: Boris Fiuczynski fiu...@linux.vnet.ibm.com Reviewed-by: Daniel Hansel daniel.han...@linux.vnet.ibm.com Reviewed-by: Stefan Zimmermann

[libvirt] [PATCH v2 0/4] Support for new watchdog model diag288 and action inject-nmi

2015-06-24 Thread Boris Fiuczynski
This patch set provides support for the new watchdog model diag288 including the new watchdog action inject-nmi. v2: Added tests for action and model. Boris Fiuczynski (4): Support for a new watchdog action inject-nmi Test for the new watchdog action inject-nmi Support for the new watchdog

[libvirt] [PATCH v2 4/4] Test for the new watchdog model diag288

2015-06-24 Thread Boris Fiuczynski
Adding a test for the new watchdog model diag288. Signed-off-by: Boris Fiuczynski fiu...@linux.vnet.ibm.com --- .../qemuxml2argv-watchdog-diag288.args | 8 .../qemuxml2argv-watchdog-diag288.xml | 22 ++ tests/qemuxml2argvtest.c

[libvirt] [PATCH v2 2/4] Test for the new watchdog action inject-nmi

2015-06-24 Thread Boris Fiuczynski
Adding a test for the new watchdog action inject-nmi. Signed-off-by: Boris Fiuczynski fiu...@linux.vnet.ibm.com --- .../qemuxml2argv-watchdog-injectnmi.args | 5 + .../qemuxml2argv-watchdog-injectnmi.xml| 26 ++ tests/qemuxml2argvtest.c

Re: [libvirt] [PATCH v2] qemu: Use heads parameter for QXL driver

2015-06-24 Thread Martin Kletzander
On Fri, Jun 12, 2015 at 11:57:31AM +0100, Frediano Ziglio wrote: Allows to specify maximum number of head to QXL driver. Signed-off-by: Frediano Ziglio fzig...@redhat.com The patch to support the max_outputs in Qemu is still not merged but I got agreement on the name of the argument. Actually

Re: [libvirt] [PATCH 04/13] docs: document when pcie-root/dmi-to-pci-bridge support was added

2015-06-24 Thread Ján Tomko
On Mon, Jun 22, 2015 at 02:44:09PM -0400, Laine Stump wrote: Also move the mention of version numbers for the various PCI controller models up to the end of the sentence where they are first given, to avoid confusion. --- docs/formatdomain.html.in | 4 +++- 1 file changed, 3 insertions(+),

Re: [libvirt] [PATCH 03/13] qemu: ignore assumptions about hotplug requirement when address is from config

2015-06-24 Thread Ján Tomko
On Mon, Jun 22, 2015 at 02:44:08PM -0400, Laine Stump wrote: Certain PCI buses don't support hotplug, and when automatically assigning PCI addresses for devices, libvirt is very concervative in conservative its assumptions about whether or not a device will need to be hotplugged/unplugged in

Re: [libvirt] [PATCH] [RFC] virSetUIDGID: Don't leak supplementary groups

2015-06-24 Thread Martin Kletzander
On Tue, Jun 23, 2015 at 01:48:42PM +0200, Richard Weinberger wrote: The LXC driver uses virSetUIDGID() to become UID/GID 0. It passes an empty groups list to virSetUIDGID() to get rid of all supplementary groups from the host side. But virSetUIDGID() calls setgroups() only if the supplied list

Re: [libvirt] [PATCH v2] qemu: Use heads parameter for QXL driver

2015-06-24 Thread Frediano Ziglio
On Fri, Jun 12, 2015 at 11:57:31AM +0100, Frediano Ziglio wrote: Allows to specify maximum number of head to QXL driver. Signed-off-by: Frediano Ziglio fzig...@redhat.com The patch to support the max_outputs in Qemu is still not merged but I got agreement on the name of the argument.

Re: [libvirt] [PATCH] virt-aa-helper: fix rules for paths with trailing slash

2015-06-24 Thread Martin Kletzander
On Wed, Jun 24, 2015 at 09:58:45AM +0200, Cédric Bosdonnat wrote: Rules generated for a path like '/' were having '//' which isn't That applies only for those that were recursive, right? Looks good to me, ACK. correct for apparmor. Make virt-aa-helper smarter to avoid these. ---

Re: [libvirt] [PATCH] qemu:conf: introduce a function to delete vcpu sched

2015-06-24 Thread Peter Krempa
On Wed, Jun 24, 2015 at 16:44:22 +0800, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1235180 We have API allow vpu to be deleted, but an vcpu may be included in some domain vcpu sched, so add a new API to allow removing an iothread from some entry. Split the

Re: [libvirt] [PATCH] qemu: blockcopy: Forbid using persistent bitmap granularity with raw vols

2015-06-24 Thread Shanzhi Yu
On 06/24/2015 05:33 PM, Peter Krempa wrote: On Wed, Jun 24, 2015 at 16:48:16 +0800, Shanzhi Yu wrote: On 06/24/2015 03:11 PM, Peter Krempa wrote: qemu returns error but only in the event after the block job actually starts. Reject it upfront for a better error message. Instead of: $

Re: [libvirt] [PATCH v2 1/1] vz: Fix error messages in libvirt log caused by unhadled events

2015-06-24 Thread Nikolay Shirokovskiy
On 23.06.2015 13:26, Mikhail Feoktistov wrote: If the configuration of the instance has been modified, for example added disk or network device, then hypervisor sends event with prlIssuerType = PIE_DISPATCHER and EventType = PET_DSP_EVT_VM_CONFIG_CHANGED We should handle this event in

Re: [libvirt] [PATCH v2] docs: Properly mark acl.html dependencies

2015-06-24 Thread Martin Kletzander
On Wed, Jun 24, 2015 at 08:53:21AM +0200, Peter Krempa wrote: On Tue, Jun 23, 2015 at 14:46:36 +0200, Martin Kletzander wrote: On Tue, Jun 23, 2015 at 01:56:00PM +0200, Michal Privoznik wrote: The acl.html file includes aclperms.htmlinc which is generated. However, acl.html is generated too

Re: [libvirt] [PATCH v2] qemu: Use heads parameter for QXL driver

2015-06-24 Thread Martin Kletzander
On Wed, Jun 24, 2015 at 06:34:50AM -0400, Frediano Ziglio wrote: On Fri, Jun 12, 2015 at 11:57:31AM +0100, Frediano Ziglio wrote: Allows to specify maximum number of head to QXL driver. Signed-off-by: Frediano Ziglio fzig...@redhat.com The patch to support the max_outputs in Qemu is still

Re: [libvirt] [PATCH 0/7] Restore code to allow unpriv_sgio for hostdev SCSI generic

2015-06-24 Thread Ján Tomko
On Tue, Jun 16, 2015 at 03:51:23PM -0400, John Ferlan wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1072736 This series of patches unreverts the functionality from commit id 'ce346623' which reverted the original functionality. What is the motivation to revert the revert? The commit

Re: [libvirt] [PATCH] scsi: Force error for SCSI pools on virStorageBackendSCSIFindLUs failure

2015-06-24 Thread Ján Tomko
On Tue, Jun 23, 2015 at 02:50:14PM -0400, John Ferlan wrote: Related to : https://bugzilla.redhat.com/show_bug.cgi?id=1171933 Rather than ignore the return status from virStorageBackendSCSIFindLUs, cause a failure to start the pool if a -1 is returned. Issue was noted during testing of

Re: [libvirt] [PATCH] vircapstest: Properly report error for failed tests

2015-06-24 Thread Martin Kletzander
On Tue, Jun 23, 2015 at 01:39:52PM +0200, Michal Privoznik wrote: There are two macros used in the test: CAPSCOMP and CAPS_EXPECT_ERR. Both run a test case and if a failure occurred, they set the @ret variable to a value of -1 to indicate an error. Well, that's what they should do. Due to a

[libvirt] [PATCH 0/3] Address a couple of mpath/Multipath storage pool issues

2015-06-24 Thread John Ferlan
My thought was to combine patch 2 and 3 unless it was felt that disallowing more than one Multipath pool to defined at one time (patch 3) was unnecessary For patch 1, I did some searching and came across the following to describe why /dev/mpath is no longer valid:

[libvirt] [PATCH 1/3] mpath: Update path in CheckPool function

2015-06-24 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1230664 Per the devmapper docs, use /dev/mapper or /dev/dm-n in order to determine if a device is under control of DM Multipath. So add /dev/mapper to the virFileExists, leaving the /dev/mpath as a legacy option since it appears for a while it was the

[libvirt] [PATCH 3/3] mpath: Don't allow more than one mpath pool at a time

2015-06-24 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1232606 Since an mpath pool contains all the Multipath devices on a host, allowing more than one defined on a host at a time should be disallowed under the policy of disallowing duplicate source pools for the host. Signed-off-by: John Ferlan

[libvirt] [PATCH 2/3] docs: Clarify the Multipath target path value usage

2015-06-24 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1232606 As described in the storage.html.in, a Multipath pool ignores the target element in favor of the default target mapping of /dev/mapper. Indicate so for formatstorage.html.in as well. Signed-off-by: John Ferlan jfer...@redhat.com ---

Re: [libvirt] [PATCH] conf: improve the way we format blkiotune and cputune

2015-06-24 Thread lhuang
On 06/24/2015 05:32 PM, Martin Kletzander wrote: On Tue, Jun 23, 2015 at 09:24:25PM +0800, Luyao Huang wrote: Just refactor existing code to use a child buf instead of check all element before format blkiotune and cputune. This will avoid the more and more bigger element check during we

Re: [libvirt] [PATCH] virt-aa-helper: fix rules for paths with trailing slash

2015-06-24 Thread Ján Tomko
On Wed, Jun 24, 2015 at 09:58:45AM +0200, Cédric Bosdonnat wrote: Rules generated for a path like '/' were having '//' which isn't correct for apparmor. Make virt-aa-helper smarter to avoid these. --- src/security/virt-aa-helper.c | 11 --- 1 file changed, 8 insertions(+), 3

Re: [libvirt] [PATCH] test: Refactor vcpu pinning and vcpu info retrieval

2015-06-24 Thread John Ferlan
On 06/17/2015 11:51 AM, Peter Krempa wrote: Drop internal data structures and use the proper fields in virDomainDef. This allows to greatly simplify the code and allows to remove the private data structure that was holding just redundant data. This patch also fixes the bogous output

Re: [libvirt] [PATCH v2 14/15] test: Refactor vcpu pinning and vcpu info retrieval

2015-06-24 Thread John Ferlan
On 06/24/2015 10:11 AM, Peter Krempa wrote: Drop internal data structures and use the proper fields in virDomainDef. This allows to greatly simplify the code and allows to remove the private data structure that was holding just redundant data. This patch also fixes the bogous output

Re: [libvirt] [PATCH v2 00/15] test driver refactors

2015-06-24 Thread John Ferlan
On 06/24/2015 10:11 AM, Peter Krempa wrote: Version 2 has a few more fixes as suggested by Michal. Peter Krempa (15): test: Rename testConn to testDriver test: Drop useless forward declaration test: turn 'defaultConn' into a pointer test: Extract code to free testDriver into

Re: [libvirt] [PATCH 0/7] Restore code to allow unpriv_sgio for hostdev SCSI generic

2015-06-24 Thread John Ferlan
On 06/24/2015 08:24 AM, Ján Tomko wrote: On Tue, Jun 16, 2015 at 03:51:23PM -0400, John Ferlan wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1072736 This series of patches unreverts the functionality from commit id 'ce346623' which reverted the original functionality. What is the

Re: [libvirt] [PATCH v2 03/15] test: turn 'defaultConn' into a pointer

2015-06-24 Thread Pavel Hrdina
On Wed, Jun 24, 2015 at 04:11:45PM +0200, Peter Krempa wrote: --- src/test/test_driver.c | 46 -- 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 8d2bb5b..ff383c6 100644 ---

[libvirt] [PATCH 3/3] vz: implement connection close notification

2015-06-24 Thread Nikolay Shirokovskiy
Reuse virConnectCloseCallback to implement connection close event functions. Thus we automatically meet multi-thread requirements on unregistering/notification. Signed-off-by: Nikolay Shirokovskiy nshirokovs...@virtuozzo.com --- daemon/remote.c|2 +- src/remote/remote_driver.c |

[libvirt] driver level connection close event

2015-06-24 Thread Nikolay Shirokovskiy
Notify of connection close event from parallels driver (possibly) wrapped in the remote driver. Discussion. In 1 and 2 patch we forced to some decisions because we don't have a weak reference mechanics. 1 patch. --- virConnectCloseCallback is introduced because we can not reference the

Re: [libvirt] [PATCH v2 03/15] test: turn 'defaultConn' into a pointer

2015-06-24 Thread Peter Krempa
On Wed, Jun 24, 2015 at 16:33:37 +0200, Pavel Hrdina wrote: On Wed, Jun 24, 2015 at 04:11:45PM +0200, Peter Krempa wrote: --- src/test/test_driver.c | 46 -- 1 file changed, 28 insertions(+), 18 deletions(-) diff --git

[libvirt] [PATCH v2 01/15] test: Rename testConn to testDriver

2015-06-24 Thread Peter Krempa
--- src/test/test_driver.c | 308 - 1 file changed, 154 insertions(+), 154 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 6613ed7..b1dca29 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -92,7

[libvirt] [PATCH v2 08/15] test: Use atomic access to @nextDomID in struct virTestDriver

2015-06-24 Thread Peter Krempa
--- src/test/test_driver.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 0cd8e6a..1d54639 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -59,6 +59,7 @@ #include virstring.h #include

[libvirt] [PATCH v2 13/15] test: Refactor testDomainSetVcpusFlags

2015-06-24 Thread Peter Krempa
Remove the bogous flag check and refactor the code by using virDomainObjGetDefs instead of virDomainObjGetPersistentDef. --- src/test/test_driver.c | 68 +- 1 file changed, 23 insertions(+), 45 deletions(-) diff --git a/src/test/test_driver.c

[libvirt] [PATCH v2 10/15] test: Finalize removal of locking from driver-eventState

2015-06-24 Thread Peter Krempa
Don't lock the driver when registering event callbacks. --- src/test/test_driver.c | 12 1 file changed, 12 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 2ab0402..b08c1e5 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -5915,11

[libvirt] [PATCH v2 04/15] test: Extract code to free testDriver into testDriverFree

2015-06-24 Thread Peter Krempa
Avoid reimplementing it 3 times. --- src/test/test_driver.c | 55 +- 1 file changed, 23 insertions(+), 32 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index ff383c6..732dde9 100644 --- a/src/test/test_driver.c +++

[libvirt] [PATCH v2 06/15] test: Drop unused attribute @path from testDriver struct

2015-06-24 Thread Peter Krempa
It's filled and then freed, but not used anywhere else. --- src/test/test_driver.c | 4 1 file changed, 4 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index c68b3d6..f105055 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -95,7 +95,6 @@

[libvirt] [PATCH v2 11/15] test: Drop locked access to testDriver-domains

2015-06-24 Thread Peter Krempa
Only self-locking APIs are used and the pointer is immutable so there's no need to lock the driver to access the domain list. This patch removes locking partially for everything that will not be converted to testDomObjFromDomain in the next patch. --- src/test/test_driver.c | 73

[libvirt] [PATCH v2 07/15] test: Annotate few fields of testDriver structure

2015-06-24 Thread Peter Krempa
Some of the fields are either immutable or self locking, so make a note of that for future reference. --- src/test/test_driver.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index f105055..0cd8e6a 100644 ---

[libvirt] [PATCH v2 05/15] test: Extract common parts of test driver data allocation

2015-06-24 Thread Peter Krempa
--- src/test/test_driver.c | 96 +- 1 file changed, 41 insertions(+), 55 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 732dde9..c68b3d6 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -309,24

[libvirt] [PATCH v2 02/15] test: Drop useless forward declaration

2015-06-24 Thread Peter Krempa
--- src/test/test_driver.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index b1dca29..8d2bb5b 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -136,7 +136,6 @@ static const virNodeInfo defaultNodeInfo = { }; -static int

[libvirt] [PATCH v2 09/15] test: Refactor test driver event sending

2015-06-24 Thread Peter Krempa
Make testObjectEventQueue tolerant to NULL @event and move it so that it does not require a prototype. Additionally we are now able to remove locking when accessing driver-eventState, since it's using self-locking APIs and the pointer is immutable. --- src/test/test_driver.c | 99

[libvirt] [PATCH v2 00/15] test driver refactors

2015-06-24 Thread Peter Krempa
Version 2 has a few more fixes as suggested by Michal. Peter Krempa (15): test: Rename testConn to testDriver test: Drop useless forward declaration test: turn 'defaultConn' into a pointer test: Extract code to free testDriver into testDriverFree test: Extract common parts of test

[libvirt] [PATCH 1/3] remote: move connection close callback to driver level

2015-06-24 Thread Nikolay Shirokovskiy
1. Introduce connect(Un)RegisterCloseCallback driver functions. 2. virConnect(Un)RegisterCloseCallback now works through driver. 3. virConnectCloseCallback is factored from virConnect but mostly stay the same. Notice however that virConnect object is not referenced in virConnectCloseCallback

[libvirt] [sandbox PATCH 02/10] Add configuration object for disk support

2015-06-24 Thread Eren Yagdiran
Add the config gobject, functions to store and load the new configuration fragments and test. This will allow creating sandboxes with attached disk with a parameter formatted like file:hda=/source/file.qcow2,format=qcow2 --- libvirt-sandbox/Makefile.am | 2 +

[libvirt] [sandbox PATCH 10/10] Common-builder: /dev/disk/by-tag/thetag to /dev/vdN

2015-06-24 Thread Eren Yagdiran
Common builder counts the disks devices and populates disks.cfg according to that.Disk devices are always come first than host-based images.In builder-machine, mounts of the host-based images will be mounted later. --- libvirt-sandbox/libvirt-sandbox-builder-machine.c | 6 +-

[libvirt] [sandbox PATCH 00/10] Patches for libvirt-sandbox

2015-06-24 Thread Eren Yagdiran
Hello, These patches provide disk support for libvirt-sandbox. Implemented '--disk' parameter will be useful when integrating Docker image support for libvirt-sandbox. --Main diffs compared to previous patches. Since many hypervisors, including kvm, will not even honour requested names for

[libvirt] [sandbox PATCH 09/10] Common-init: Building symlink from disks.cfg

2015-06-24 Thread Eren Yagdiran
Similar to the existing mounts.cfg, the mapping between the device and the tag is passed by a new disks.cfg file. Common-init reads disks.cfg and maps the tags to corresponding devices --- libvirt-sandbox/libvirt-sandbox-init-common.c | 51 +-- 1 file changed, 49

[libvirt] [sandbox PATCH 06/10] Add gvir_sandbox_config_has_disks function

2015-06-24 Thread Eren Yagdiran
From: Cédric Bosdonnat cbosdon...@suse.com Add helper function to check if a config contains disk devices. --- libvirt-sandbox/libvirt-sandbox-config.c | 7 +++ libvirt-sandbox/libvirt-sandbox-config.h | 1 + libvirt-sandbox/libvirt-sandbox.sym | 1 + 3 files changed, 9 insertions(+)

[libvirt] [PATCH v2 03/15] test: turn 'defaultConn' into a pointer

2015-06-24 Thread Peter Krempa
--- src/test/test_driver.c | 46 -- 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 8d2bb5b..ff383c6 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -117,7 +117,7

[libvirt] [PATCH v2 15/15] test: Refactor testNodeGetCPUMap

2015-06-24 Thread Peter Krempa
Drop locking of the driver since it is not accessed and simplify the code flow. --- src/test/test_driver.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index ed67dca..25de641 100644 --- a/src/test/test_driver.c

Re: [libvirt] [PATCH v2 0/4] Support for new watchdog model diag288 and action inject-nmi

2015-06-24 Thread Ján Tomko
On Wed, Jun 24, 2015 at 11:28:40AM +0200, Boris Fiuczynski wrote: This patch set provides support for the new watchdog model diag288 including the new watchdog action inject-nmi. v2: Added tests for action and model. Boris Fiuczynski (4): Support for a new watchdog action inject-nmi

[libvirt] [PATCH v2 14/15] test: Refactor vcpu pinning and vcpu info retrieval

2015-06-24 Thread Peter Krempa
Drop internal data structures and use the proper fields in virDomainDef. This allows to greatly simplify the code and allows to remove the private data structure that was holding just redundant data. This patch also fixes the bogous output where we'd report that a fresh VM without vCPU pinning

[libvirt] [PATCH v2 12/15] test: Refactor test driver domain object retrieval

2015-06-24 Thread Peter Krempa
Reuse testDomObjFromDomain testDomObjFromDomain to retrieve domain objects in the rest of the test driver instead of open-coding it in every API. Now that testDomObjFromDomain does not lock the driver it can be reused also in places where the driver is already locked. --- src/test/test_driver.c

[libvirt] [PATCH 2/3] daemon: relay connection close event related functions

2015-06-24 Thread Nikolay Shirokovskiy
Add conneciton close subscription/unsubscription and event rpc. Now remote driver firing connection close event in 2 cases. 1. connection to daemon closed, as previously 2. as a relay of connection close event from wrapped driver As it commented out in remoteDispatchConnectCloseCallbackRegister

Re: [libvirt] [PATCH] qemu: check hostdev address type

2015-06-24 Thread John Ferlan
On 06/17/2015 12:00 PM, Ján Tomko wrote: For USB and SCSI hostdevs, we passed the invalid address to QEMU. Report an error earlier. PCI hostdevs check the address type when parsing the XML. https://bugzilla.redhat.com/show_bug.cgi?id=1225339 --- src/qemu/qemu_command.c | 13

[libvirt] [PATCH] qemu: fix wrong remove guest cfg if migrate fail

2015-06-24 Thread Luyao Huang
If we get fail in qemuMigrationPrepareAny, we forget check if the vm is persistent then always call qemuDomainRemoveInactive to clean the inactive settings. Add a check to avoid this. This issue was introduce in commit 540c339. Signed-off-by: Luyao Huang lhu...@redhat.com ---

Re: [libvirt] [PATCH] qemu:conf: introduce a function to delete vcpu sched

2015-06-24 Thread lhuang
On 06/24/2015 08:51 PM, Peter Krempa wrote: On Wed, Jun 24, 2015 at 16:44:22 +0800, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1235180 We have API allow vpu to be deleted, but an vcpu may be included in some domain vcpu sched, so add a new API to allow removing an iothread

Re: [libvirt] [PATCH 0/5] Additional SCSI generated device address checks

2015-06-24 Thread Eric Farman
On 06/22/2015 05:05 PM, John Ferlan wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1210587 These patches will resolve a couple issues with generation of the address type='drive' .../ for a SCSI disk and hostdev. The disk generation algorithm 'assumes' that when presented with target

Re: [libvirt] [PATCH 1/5] conf: Enforce SCSI hostdev address type

2015-06-24 Thread Eric Farman
On 06/22/2015 05:05 PM, John Ferlan wrote: If a SCSI subsystem hostdev element is provided with an address, then enforce that the address type is 'drive'. If not provided, a 'drive' element was created by virDomainHostdevAssignAddress which uses VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DRIVE.

Re: [libvirt] [PATCH v2 12/15] test: Refactor test driver domain object retrieval

2015-06-24 Thread Pavel Hrdina
On Wed, Jun 24, 2015 at 04:11:54PM +0200, Peter Krempa wrote: Reuse testDomObjFromDomain testDomObjFromDomain to retrieve domain objects in the rest of the test driver instead of open-coding it in every API. Now that testDomObjFromDomain does not lock the driver it can be reused also in

[libvirt] [sandbox PATCH 03/10] Add disk parameter to virt-sandbox

2015-06-24 Thread Eren Yagdiran
Allow users to add disk images to their sandbox. Only disk images are supported so far, but the parameter is intentionally designed for future changes. --- bin/virt-sandbox.c | 37 + 1 file changed, 37 insertions(+) diff --git a/bin/virt-sandbox.c

[libvirt] [sandbox PATCH 07/10] qemu: use devtmpfs rather than tmpfs to auto-populate /dev

2015-06-24 Thread Eren Yagdiran
From: Cédric Bosdonnat cbosdon...@suse.com When using devtmpfs we don't need to care about the device nodes creation: it's less risk to forget some. It also eases the creation of the devices in the init-qemu. --- libvirt-sandbox/libvirt-sandbox-init-qemu.c | 94 + 1

[libvirt] [sandbox PATCH 01/10] Add an utility function for guessing filetype from file extension

2015-06-24 Thread Eren Yagdiran
Consider the file name extension as the image type, except for .img that are usually RAW images --- libvirt-sandbox/Makefile.am| 1 + libvirt-sandbox/libvirt-sandbox-util.c | 72 ++ libvirt-sandbox/libvirt-sandbox-util.h | 5 +++ po/POTFILES.in

[libvirt] [sandbox PATCH 08/10] Init-util : Common directory functions for init-common and init-qemu

2015-06-24 Thread Eren Yagdiran
Init-util provides common functions for creating directories for both Init-common and Init-qemu. Error handling needs to be done in calling function. --- libvirt-sandbox/Makefile.am | 4 +- libvirt-sandbox/libvirt-sandbox-init-qemu.c | 57 +---

Re: [libvirt] [PATCH 1/7] qemu: Introduce qemuIsSharedHostdev

2015-06-24 Thread John Ferlan
On 06/16/2015 03:51 PM, John Ferlan wrote: Add a single boolean function to handle whether the hostdev is shared or not Signed-off-by: John Ferlan jfer...@redhat.com --- src/qemu/qemu_conf.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) Given Jan's

[libvirt] [sandbox PATCH 05/10] Add disk support to machine builder

2015-06-24 Thread Eren Yagdiran
Use the new disk configuration in the container builder to provide disks in qemu sandboxes. The disks are virtio devices, but those shouldn't be known by the user. --- libvirt-sandbox/libvirt-sandbox-builder-machine.c | 38 --- 1 file changed, 34 insertions(+), 4 deletions(-)

[libvirt] [sandbox PATCH 04/10] Add disk support to the container builder

2015-06-24 Thread Eren Yagdiran
Use the new disk configuration in the container builder to provide disks in lxc containers sandboxes. --- .../libvirt-sandbox-builder-container.c| 36 +- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git

Re: [libvirt] [PATCH v2] vz: implementation of attach/detach network devices

2015-06-24 Thread Dmitry Guryanov
On 06/22/2015 07:57 PM, Mikhail Feoktistov wrote: In this patch we add VIR_DOMAIN_DEVICE_NET handlers implementation for domainAttachDevice and domainDetachDevice callbacks. As soon as we don't support this operation for hypervisor type domains, we implement this functionality for containers

Re: [libvirt] [PATCH v2 13/15] test: Refactor testDomainSetVcpusFlags

2015-06-24 Thread Pavel Hrdina
On Wed, Jun 24, 2015 at 04:11:55PM +0200, Peter Krempa wrote: Remove the bogous flag check and refactor the code by using s/bogous/bogus/ virDomainObjGetDefs instead of virDomainObjGetPersistentDef. --- src/test/test_driver.c | 68 +- 1

Re: [libvirt] [PATCH 00/13] PCIe fixes + new PCI controllers w/RFC

2015-06-24 Thread Daniel P. Berrange
On Wed, Jun 24, 2015 at 12:04:33PM -0400, Laine Stump wrote: I think the only votes were for option 1 and 4 (interesting how the only ones that were chosen were those that I *didn't* pick personally :-). See comments below. In the meantime the other issue Alex pointed out may cause this to

Re: [libvirt] [PATCH] virt-xml-validate: Allow input to be read from stdin

2015-06-24 Thread Johannes Holmberg
- On 24 Jun, 2015, at 09:14, Martin Kletzander mklet...@redhat.com wrote: Why don't you just set XMLFILE=$TMPFILE ? That would get rid of lot of the code changes below and would be more readable. Other than that it looks good. Good question, with a somewhat long answer. I initially did

Re: [libvirt] [PATCH 00/13] PCIe fixes + new PCI controllers w/RFC

2015-06-24 Thread Laine Stump
I think the only votes were for option 1 and 4 (interesting how the only ones that were chosen were those that I *didn't* pick personally :-). See comments below. In the meantime the other issue Alex pointed out may cause this to take a slightly different direction. On 06/22/2015 02:44 PM, Laine

[libvirt] Build failed in Jenkins: libvirt-syntax-check #3634

2015-06-24 Thread Jenkins CI
See http://honk.sigxcpu.org:8001/job/libvirt-syntax-check/3634/ -- Started by upstream project libvirt-build build number 4138 Building on master in workspace http://honk.sigxcpu.org:8001/job/libvirt-syntax-check/ws/ [workspace] $ /bin/sh -xe

Re: [libvirt] [PATCH v2 10/15] test: Finalize removal of locking from driver-eventState

2015-06-24 Thread John Ferlan
On 06/24/2015 10:11 AM, Peter Krempa wrote: Don't lock the driver when registering event callbacks. --- src/test/test_driver.c | 12 1 file changed, 12 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 2ab0402..b08c1e5 100644 ---

[libvirt] [PATCH 0.5/7] docs: Remove sgio from hostdev docs

2015-06-24 Thread John Ferlan
Since hostdev sgio is not supported, let's remove it from the docs to remove confusion. Signed-off-by: John Ferlan jfer...@redhat.com --- Hopefully I got the in-reply-to magic correct! I figured keeping the sgio buried in the scsisrc is ok for those down stream providers that want or have the

[libvirt] [PATCH] vz: fix syntax-check errors

2015-06-24 Thread Dmitry Guryanov
Remove braces around single-statement blocks in vz_sdk.c Signed-off-by: Dmitry Guryanov dgurya...@parallels.com --- src/vz/vz_sdk.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index dea6e37..1a3aa87 100644 --- a/src/vz/vz_sdk.c +++

Re: [libvirt] [PATCH] vz: fix syntax-check errors

2015-06-24 Thread Dmitry Guryanov
On 06/24/2015 10:37 PM, Dmitry Guryanov wrote: Remove braces around single-statement blocks in vz_sdk.c Pushed as trivial and build-breaker. Signed-off-by: Dmitry Guryanov dgurya...@parallels.com --- src/vz/vz_sdk.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git

[libvirt] [PATCH] libvirt/hooks: Static and dynamic hugepage hooks

2015-06-24 Thread Alex Williamson
This patch provides scripts for hugepage allocation, as well as a bit of infrastructure and common hook config file that I hope may some day be enabled by default in libvirt. For now, we place the files in /usr/share and ask users to install the config file and copy or link the scripts, more like

[libvirt] Jenkins build is back to normal : libvirt-syntax-check #3635

2015-06-24 Thread Jenkins CI
See http://honk.sigxcpu.org:8001/job/libvirt-syntax-check/3635/ -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

  1   2   >