[libvirt] [PATCH] rpc: serverclient: Clear pointer with NULL instead of 0

2015-03-25 Thread Peter Krempa
--- Notes: Pushed as trivial. src/rpc/virnetserverclient.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rpc/virnetserverclient.c b/src/rpc/virnetserverclient.c index f5259c2..d36e80c 100644 --- a/src/rpc/virnetserverclient.c +++ b/src/rpc/virnetserverclient.c @@ -7

Re: [libvirt] [PATCH] Document that USB hostdevs do not need nodeDettach

2015-03-25 Thread Ján Tomko
On Tue, Mar 24, 2015 at 05:03:08PM -0400, John Ferlan wrote: > > > On 03/23/2015 01:16 PM, Ján Tomko wrote: > > The virNodeDeviceDettach API only works on PCI devices. > > > > Originally added by commit 10d3272e, but the API never > > supported USB devices. > > > > Reported by: Martin Polednik

[libvirt] [PATCH 2/3] daemon: Clear fake domain def object that is used to check ACL prior to use

2015-03-25 Thread Peter Krempa
The fake object is used to pass the domain name and UUID to the ACL code for events where we don't have the full domain def when dispatching events. The rest of the entries would be left uninitialized. While this is not a problem code-wise as the used fields are initialized it looks ugly in the deb

[libvirt] [PATCH 0/3] Fix crash when relaying objects and closing connection at the same time

2015-03-25 Thread Peter Krempa
Fix the crash and clean up two related places. Peter Krempa (3): util: identity: Harden virIdentitySetCurrent() daemon: Clear fake domain def object that is used to check ACL prior to use rpc: Don't unref identity object while callbacks still can be executed daemon/remote.c

[libvirt] [PATCH 3/3] rpc: Don't unref identity object while callbacks still can be executed

2015-03-25 Thread Peter Krempa
While this thread is cleaning up the client and connection objects: #2 virFileReadAll (path=0x7f28780012b0 "/proc/1319/stat", maxlen=maxlen@entry=1024, buf=buf@entry=0x7f289c60fc40) at util/virfile.c:1287 #3 0x7f28adbb1539 in virProcessGetStartTime (pid=, timestamp=timestamp@entry=0x7f289

[libvirt] [PATCH 1/3] util: identity: Harden virIdentitySetCurrent()

2015-03-25 Thread Peter Krempa
Don't unref the old identity unless we set the new one correctly and unref the new one on failure to set it so that we don't leak any references or use invalid pointers. --- src/util/viridentity.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util/viridentity.c b/src/u

[libvirt] [PATCH v2] Don't validata filesystem target type

2015-03-25 Thread Guido Günther
When using QEMU's 9pfs the target "dir" element is not necessarily an absolute path but merely an arbitrary identifier. So validation in that case currently fails with the misleading $ virt-xml-validate /tmp/test.xml Relax-NG validity error : Extra element devices in interleave /tmp/test.

Re: [libvirt] [PATCH] qemu: fix can use setmaxmem to change the maximum memory biger than max memory

2015-03-25 Thread Peter Krempa
On Tue, Mar 24, 2015 at 22:12:37 +0800, Luyao Huang wrote: > When call qemuDomainSetMemoryFlags() to change maximum memory size, we > do not check if the maximum memory is biger than the max memory, this will > make vm disappear after libvirtd restart if we set a big maximum memory. > > Add a chec

Re: [libvirt] [PATCH] qemu: add a check for node set when build memory device cmd

2015-03-25 Thread Peter Krempa
On Wed, Mar 25, 2015 at 14:34:04 +0800, Luyao Huang wrote: > When we set a host not exist nodemask in memory device and then > start the vm, qemu will report error. > > # virsh start test3 > error: Failed to start domain test3 > error: internal error: process exited while connecting to monitor:

Re: [libvirt] [PATCH 3/4] tests: xml2xml: Refactor the qemu xml 2 xml test

2015-03-25 Thread Martin Kletzander
On Tue, Mar 24, 2015 at 03:03:22PM +0100, Peter Krempa wrote: To allow adding more tests, refactor the XML-2-XML test so that the files are not reloaded always and clarify the control flow. Result of this changes is that the active and inactive portions of the XML are tested in separate steps ra

Re: [libvirt] [PATCH 2/4] util: buffer: Add support for adding text blocks with indentation

2015-03-25 Thread Martin Kletzander
On Tue, Mar 24, 2015 at 03:03:21PM +0100, Peter Krempa wrote: The current auto-indentation buffer code applies indentation only on complete strings. To allow adding a string containing newlines and s/strings/lines/ ? :) having it properly indented this patch adds virBufferAddStr. --- src/libv

Re: [libvirt] [PATCH 0/4] Test status XML formatting and parsing

2015-03-25 Thread Martin Kletzander
On Tue, Mar 24, 2015 at 03:03:19PM +0100, Peter Krempa wrote: A recent bug showed that the status XML parsing is not tested. Add test cases based on existing tests in the XML-2-XML test to excercise the parser. Additionally this series fixes also a memleak of the domain device alias list. Peter

Re: [libvirt] [PATCH 0/8] Make debugging of "cannot acquire state change lock" easier

2015-03-25 Thread Jiri Denemark
On Tue, Mar 24, 2015 at 13:50:39 -0400, John Ferlan wrote: > > > On 03/23/2015 09:25 AM, Jiri Denemark wrote: > > https://bugzilla.redhat.com/show_bug.cgi?id=853839 > > > > Jiri Denemark (8): > > POTFILES.in: Sort > > Add support for tracking thread jobs > > Force usage of virThreadCreate

Re: [libvirt] [PATCH v2] Don't validata filesystem target type

2015-03-25 Thread Michal Privoznik
On 25.03.2015 09:47, Guido Günther wrote: > When using QEMU's 9pfs the target "dir" element is not necessarily an > absolute path but merely an arbitrary identifier. So validation in that > case currently fails with the misleading > >$ virt-xml-validate /tmp/test.xml >Relax-NG validity err

Re: [libvirt] [PATCH 4/4] test: qemuxml2xml: Test status XML formatting and parsing

2015-03-25 Thread Martin Kletzander
On Tue, Mar 24, 2015 at 03:03:23PM +0100, Peter Krempa wrote: Recently we've fixed a bug where the status XML could not be parsed as the parser used absolute path XPath queries. This test enhancement tests all XML files used in the qemu-xml-2-xml test as a part of a status XML snippet to see whet

Re: [libvirt] [PATCH 2/4] util: buffer: Add support for adding text blocks with indentation

2015-03-25 Thread Martin Kletzander
On Tue, Mar 24, 2015 at 03:03:21PM +0100, Peter Krempa wrote: The current auto-indentation buffer code applies indentation only on complete strings. To allow adding a string containing newlines and having it properly indented this patch adds virBufferAddStr. --- src/libvirt_private.syms | 1 + sr

Re: [libvirt] [PATCH] compile failure 'src/cpu/cpu_map.xml': No such file or directory'

2015-03-25 Thread Ján Tomko
On Mon, Mar 23, 2015 at 01:48:06PM -0400, Amy Fong wrote: > >From 73172eeed1fcffcfae088a3059fbca0689b7437f Mon Sep 17 00:00:00 2001 > From: Amy Fong > Date: Mon, 23 Mar 2015 13:44:03 -0400 > Subject: [PATCH] libvirt: 'src/cpu/cpu_map.xml': No such file or directory' > > In some circumstances wher

Re: [libvirt] [PATCH 0/2] fix domain documentation error

2015-03-25 Thread Ján Tomko
On Wed, Mar 25, 2015 at 11:48:02AM +0800, Chen Fan wrote: > Chen Fan (2): > docs: no 'via' attribute in route element > docs: route element must specify network address > > docs/formatdomain.html.in | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > ACK and pushed. Jan sig

[libvirt] [PATCH] qemucaps2xmltest: fix test to successfully run without kvm support

2015-03-25 Thread Pavel Hrdina
Function virQEMUCapsInitGuestFromBinary detect kvm support by testing whether /dev/kvm exists or whether we pass path to kvmbin. Provide the path we are testing via kvmbin for testing purpose instead of detecting presence of /dev/kvm to successfully run the tests on all hosts. Signed-off-by: Pave

Re: [libvirt] [PATCH] qemu: fix can use setmaxmem to change the maximum memory biger than max memory

2015-03-25 Thread lhuang
On 03/25/2015 04:48 PM, Peter Krempa wrote: On Tue, Mar 24, 2015 at 22:12:37 +0800, Luyao Huang wrote: When call qemuDomainSetMemoryFlags() to change maximum memory size, we do not check if the maximum memory is biger than the max memory, this will make vm disappear after libvirtd restart if we

Re: [libvirt] [PATCH v3 1/2] cleanup conf/device_conf.h inclusion from util/virnetdev.h

2015-03-25 Thread Shivaprasad bhat
Hi Laine, Thanks for the comments. Please find my reply inline. On Tue, Mar 24, 2015 at 10:03 PM, Laine Stump wrote: > On 03/24/2015 05:57 AM, Shivaprasad G Bhat wrote: >> Move the struct and enum definitions from device_conf.h to >> virnetdev.h thus avoiding the file inclusion. >> >> The wrong

[libvirt] [PATCH] Makefile: fix typo

2015-03-25 Thread Pavel Hrdina
Commit 95695388 introduced new util/virthreadjob.c/h files but the makefile has type that breaks rpm build. Signed-off-by: Pavel Hrdina --- Pushed under build-breaker rule. src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile.am b/src/Makefile.am ind

Re: [libvirt] [PATCH] qemucaps2xmltest: fix test to successfully run without kvm support

2015-03-25 Thread Ján Tomko
On Wed, Mar 25, 2015 at 10:50:52AM +0100, Pavel Hrdina wrote: > Function virQEMUCapsInitGuestFromBinary detect kvm support by testing > whether /dev/kvm exists or whether we pass path to kvmbin. Provide the > path we are testing via kvmbin for testing purpose instead of detecting > presence of /de

[libvirt] [PATCH 1/2] util: NUMA: Change error code in virNumaNodesetIsAvailable()

2015-03-25 Thread Peter Krempa
An invalid nodeset is a configuration problem rather than an internal error. --- Pushed as trivial. src/util/virnuma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virnuma.c b/src/util/virnuma.c index e986c71..669192a 100644 --- a/src/util/virnuma.c +++ b/src/util

Re: [libvirt] [PATCH] qemucaps2xmltest: fix test to successfully run without kvm support

2015-03-25 Thread Pavel Hrdina
On Wed, Mar 25, 2015 at 12:12:20PM +0100, Ján Tomko wrote: > On Wed, Mar 25, 2015 at 10:50:52AM +0100, Pavel Hrdina wrote: > > Function virQEMUCapsInitGuestFromBinary detect kvm support by testing > > whether /dev/kvm exists or whether we pass path to kvmbin. Provide the > > path we are testing vi

[libvirt] Plans for next release

2015-03-25 Thread Daniel Veillard
So we already have around 300 commits made since 1.2.13, and the end of the month is coming, so I guess we should enter freeze soon. I would suggest to do this friday to try to shoot for a 1.2.14 release by April 1st - always a great date to ship a release ! any opposition to this plan ? BT

Re: [libvirt] [PATCH 1/2] util: NUMA: Change error code in virNumaNodesetIsAvailable()

2015-03-25 Thread Peter Krempa
Please note that the subject is incorrect. This patch is only a single one. I've made a mistake when formatting it. On Wed, Mar 25, 2015 at 11:28:08 +0100, Peter Krempa wrote: > An invalid nodeset is a configuration problem rather than an internal > error. > --- > > Pushed as trivial. > signa

Re: [libvirt] [PATCH 2/4] util: buffer: Add support for adding text blocks with indentation

2015-03-25 Thread Peter Krempa
On Wed, Mar 25, 2015 at 10:32:11 +0100, Martin Kletzander wrote: > On Tue, Mar 24, 2015 at 03:03:21PM +0100, Peter Krempa wrote: > >The current auto-indentation buffer code applies indentation only on > >complete strings. To allow adding a string containing newlines and > >having it properly indent

Re: [libvirt] [PATCH 2/4] util: buffer: Add support for adding text blocks with indentation

2015-03-25 Thread Martin Kletzander
On Wed, Mar 25, 2015 at 01:00:17PM +0100, Peter Krempa wrote: On Wed, Mar 25, 2015 at 10:32:11 +0100, Martin Kletzander wrote: On Tue, Mar 24, 2015 at 03:03:21PM +0100, Peter Krempa wrote: >The current auto-indentation buffer code applies indentation only on >complete strings. To allow adding a

Re: [libvirt] [PATCH 2/4] util: buffer: Add support for adding text blocks with indentation

2015-03-25 Thread Peter Krempa
On Wed, Mar 25, 2015 at 13:10:49 +0100, Martin Kletzander wrote: > On Wed, Mar 25, 2015 at 01:00:17PM +0100, Peter Krempa wrote: > >On Wed, Mar 25, 2015 at 10:32:11 +0100, Martin Kletzander wrote: > >> On Tue, Mar 24, 2015 at 03:03:21PM +0100, Peter Krempa wrote: > >> >The current auto-indentation

Re: [libvirt] [PATCH 0/3] Fix crash when relaying objects and closing connection at the same time

2015-03-25 Thread Martin Kletzander
On Wed, Mar 25, 2015 at 09:35:05AM +0100, Peter Krempa wrote: Fix the crash and clean up two related places. Peter Krempa (3): util: identity: Harden virIdentitySetCurrent() daemon: Clear fake domain def object that is used to check ACL prior to use rpc: Don't unref identity object while c

Re: [libvirt] [PATCH 3/4] tests: xml2xml: Refactor the qemu xml 2 xml test

2015-03-25 Thread Peter Krempa
On Wed, Mar 25, 2015 at 10:13:44 +0100, Martin Kletzander wrote: > On Tue, Mar 24, 2015 at 03:03:22PM +0100, Peter Krempa wrote: > >To allow adding more tests, refactor the XML-2-XML test so that the > >files are not reloaded always and clarify the control flow. > > > >Result of this changes is tha

Re: [libvirt] [PATCH 0/3] Fix crash when relaying objects and closing connection at the same time

2015-03-25 Thread Peter Krempa
On Wed, Mar 25, 2015 at 13:32:25 +0100, Martin Kletzander wrote: > On Wed, Mar 25, 2015 at 09:35:05AM +0100, Peter Krempa wrote: > >Fix the crash and clean up two related places. > > > >Peter Krempa (3): > > util: identity: Harden virIdentitySetCurrent() > > daemon: Clear fake domain def object t

[libvirt] [PATCHv2 0/2] Test status XML formatting and parsing

2015-03-25 Thread Peter Krempa
Peter Krempa (2): util: buffer: Add support for adding text blocks with indentation tests: qemuxml2xml: Test status XML formatting and parsing src/conf/domain_conf.c | 4 +- src/conf/domain_conf.h | 9 src/libvirt_private.syms | 3 ++ src/util/virbuffer.c | 29

[libvirt] [PATCHv2 1/2] util: buffer: Add support for adding text blocks with indentation

2015-03-25 Thread Peter Krempa
The current auto-indentation buffer code applies indentation only on complete strings. To allow adding a string containing newlines and having it properly indented this patch adds virBufferAddStr. --- src/libvirt_private.syms | 1 + src/util/virbuffer.c | 29 src/

[libvirt] [PATCHv2 2/2] tests: qemuxml2xml: Test status XML formatting and parsing

2015-03-25 Thread Peter Krempa
Recently we've fixed a bug where the status XML could not be parsed as the parser used absolute path XPath queries. This test enhancement tests all XML files used in the qemu-xml-2-xml test as a part of a status XML snippet to see whether they are parsed correctly. The status XML-2-XML is currently

Re: [libvirt] [PATCH v3 2/2] network_conf: check if bridge exists on host for user created bridges

2015-03-25 Thread Shivaprasad bhat
On Tue, Mar 24, 2015 at 9:18 PM, Laine Stump wrote: > On 03/24/2015 11:12 AM, Laine Stump wrote: >> On 03/24/2015 05:59 AM, Shivaprasad G Bhat wrote: >>> virNetworkBridgeInUse() doesn't check if the bridge is manually created >>> outside of libvirt. Check if the bridge actually exist on host using

Re: [libvirt] [PATCHv2 0/2] Test status XML formatting and parsing

2015-03-25 Thread Martin Kletzander
On Wed, Mar 25, 2015 at 02:05:38PM +0100, Peter Krempa wrote: Peter Krempa (2): util: buffer: Add support for adding text blocks with indentation tests: qemuxml2xml: Test status XML formatting and parsing src/conf/domain_conf.c | 4 +- src/conf/domain_conf.h | 9 src/libvirt_private

[libvirt] [PATCH v4 0/2] network_conf: check if bridge exists on host for user created bridges

2015-03-25 Thread Shivaprasad G Bhat
The patch fixes the below problem. == If the bridge name is not mentioned in the xml, the bridge name is auto generated from virNetworkAllocateBridge(). If the default template named bridge is created manually by a user, the bridge start will fail with "File exists".

[libvirt] [PATCH v4 1/2] cleanup conf/device_conf.h inclusion from util/virnetdev.h

2015-03-25 Thread Shivaprasad G Bhat
Move the struct and enum definitions from device_conf.h to virnetdev.h thus avoiding the file inclusion. The wrong reference of conf files from util/ is allowed in Makefile.am for now. The reason being, The change in Makefile.am for libvirt_util_la_CFLAGS to remove conf from the utils would requir

[libvirt] [PATCH v4 2/2] network_conf: check if bridge exists on host for user created bridges

2015-03-25 Thread Shivaprasad G Bhat
virNetworkBridgeInUse() doesn't check if the bridge is manually created outside of libvirt. Check if the bridge actually exist on host using the virNetDevExists(). Signed-off-by: Shivaprasad G Bhat --- src/conf/network_conf.c |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff

Re: [libvirt] [PATCH v2] Don't validata filesystem target type

2015-03-25 Thread Guido Günther
On Wed, Mar 25, 2015 at 10:23:21AM +0100, Michal Privoznik wrote: > On 25.03.2015 09:47, Guido Günther wrote: > > When using QEMU's 9pfs the target "dir" element is not necessarily an > > absolute path but merely an arbitrary identifier. So validation in that > > case currently fails with the misle

Re: [libvirt] [PATCH] qemucaps2xmltest: fix test to successfully run without kvm support

2015-03-25 Thread Guido Günther
Hi, On Wed, Mar 25, 2015 at 12:29:41PM +0100, Pavel Hrdina wrote: > On Wed, Mar 25, 2015 at 12:12:20PM +0100, Ján Tomko wrote: > > On Wed, Mar 25, 2015 at 10:50:52AM +0100, Pavel Hrdina wrote: > > > Function virQEMUCapsInitGuestFromBinary detect kvm support by testing > > > whether /dev/kvm exists

Re: [libvirt] [PATCHv2 0/2] Test status XML formatting and parsing

2015-03-25 Thread Peter Krempa
On Wed, Mar 25, 2015 at 14:58:01 +0100, Martin Kletzander wrote: > On Wed, Mar 25, 2015 at 02:05:38PM +0100, Peter Krempa wrote: > >Peter Krempa (2): > > util: buffer: Add support for adding text blocks with indentation > > tests: qemuxml2xml: Test status XML formatting and parsing > > > > src/co

Re: [libvirt] [PATCH] compile failure 'src/cpu/cpu_map.xml': No such file or directory'

2015-03-25 Thread Amy Fong
On Wed, Mar 25, 2015 at 10:35:45AM +0100, Ján Tomko wrote: > On Mon, Mar 23, 2015 at 01:48:06PM -0400, Amy Fong wrote: > > >From 73172eeed1fcffcfae088a3059fbca0689b7437f Mon Sep 17 00:00:00 2001 > > From: Amy Fong > > Date: Mon, 23 Mar 2015 13:44:03 -0400 > > Subject: [PATCH] libvirt: 'src/cpu/cpu

[libvirt] [PATCH 0/2] really fix qemucaps2xmltest

2015-03-25 Thread Pavel Hrdina
Pavel Hrdina (2): Revert "qemucaps2xmltest: fix test to successfully run without kvm support" tests: introduce qemucaps2xmlmock tests/Makefile.am| 7 +++ tests/qemucaps2xmlmock.c | 33 + tests/qemucaps2xmltest.c | 6 +++--- 3 files changed, 43

[libvirt] [PATCH 1/2] Revert "qemucaps2xmltest: fix test to successfully run without kvm support"

2015-03-25 Thread Pavel Hrdina
This reverts commit 49bf09d16cb7050795f6963a2746d686a2fbaece. That commit is wrong and doesn't fix the issue. Signed-off-by: Pavel Hrdina --- tests/qemucaps2xmltest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qemucaps2xmltest.c b/tests/qemucaps2xmltest.c inde

[libvirt] [PATCH 2/2] tests: introduce qemucaps2xmlmock

2015-03-25 Thread Pavel Hrdina
We need to mock virFileExists to return true for "/dev/kvm" because the test should not depend on host system. Signed-off-by: Pavel Hrdina --- tests/Makefile.am| 7 +++ tests/qemucaps2xmlmock.c | 33 + tests/qemucaps2xmltest.c | 2 +- 3 files changed

Re: [libvirt] [PATCH] conf: refact virDomainHasDiskMirror and rename it to virDomainHasBlockjob

2015-03-25 Thread Peter Krempa
On Tue, Mar 24, 2015 at 18:08:00 +0800, Shanzhi Yu wrote: > Create external snapshot or migrate a vm when there is a blockpull > job running should be forbidden by libvirt, otherwise qemu try to > create external snapshot and failed with error "unable to execute > QEMU command 'transaction': Device

Re: [libvirt] [PATCH 1/7] Implement public API for virDomainIOThreadsSet

2015-03-25 Thread Ján Tomko
On Thu, Mar 19, 2015 at 01:08:22PM -0400, John Ferlan wrote: > Add virDomainIOThreadsSet to allow setting the number of IOThreads for > a domain. > > The API supports updating both the --live domain and the --config data. > > Signed-off-by: John Ferlan > --- > include/libvirt/libvirt-domain.h |

[libvirt] [PATCH] docs: Add Host sFlow into monitoring apps

2015-03-25 Thread Martin Kletzander
Reported-by: Peter Phaal Signed-off-by: Martin Kletzander --- docs/apps.html.in | 6 ++ 1 file changed, 6 insertions(+) diff --git a/docs/apps.html.in b/docs/apps.html.in index 79ee73a..fd45189 100644 --- a/docs/apps.html.in +++ b/docs/apps.html.in @@ -321,6 +321,12 @@ For a full d

Re: [libvirt] [PATCH 1/7] Implement public API for virDomainIOThreadsSet

2015-03-25 Thread Peter Krempa
On Wed, Mar 25, 2015 at 16:29:22 +0100, Ján Tomko wrote: > On Thu, Mar 19, 2015 at 01:08:22PM -0400, John Ferlan wrote: > > Add virDomainIOThreadsSet to allow setting the number of IOThreads for > > a domain. > > > > The API supports updating both the --live domain and the --config data. > > > >

Re: [libvirt] [PATCH] hostdev: fix two bugs in virHostdevReAttachPCIDevices

2015-03-25 Thread Huanle Han
I'm sorry that I didn't configure the 'git send-email' well. The 2 issues can be consider separate. Issue 1(move the 'i++'): Yes, I do mean that we shouldn't update the 'i' value for the reason you said. I was thinking to minimize the change. But while loop is also a good choose. Issue 2: Steps to

Re: [libvirt] [PATCH 1/7] storage: Remove unused attribute conn from 'checkPool' callback

2015-03-25 Thread John Ferlan
On 03/24/2015 06:06 AM, Erik Skultety wrote: > The checkPool callback should be used when updating states of all pools > during storageStateInitialize, not storageDriverAutostart, otherwise we > can't start a domain which mounts a volume after daemons restarted. This > is because qemuProcessRecon

Re: [libvirt] [PATCH 2/7] conf: Add support for storage state directory

2015-03-25 Thread John Ferlan
On 03/24/2015 06:06 AM, Erik Skultety wrote: > Before introducing necessary changes to storage_driver.c, first prepare > our structures for storage state XML support. > > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1177733 > --- > src/conf/storage_conf.h | 1 + > src/storage/stor

Re: [libvirt] [PATCH 3/7] conf: Add/modify storage formatting functions

2015-03-25 Thread John Ferlan
On 03/24/2015 06:06 AM, Erik Skultety wrote: > This patch introduces virStoragePoolSaveStatus to properly format the > status XML. It also adds virStoragePoolDefFormatBuf function, which > alike in the network driver, formats the whole storage pool definition into > a buffer that might have been

Re: [libvirt] [PATCH 4/7] storage: Modify stateInitialize to support storage state XML

2015-03-25 Thread John Ferlan
On 03/24/2015 06:06 AM, Erik Skultety wrote: > Storage state driver directories initialization needs to be modified > to become more generic. > > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1177733 > --- > src/storage/storage_driver.c | 52 > --

Re: [libvirt] [PATCH] cpu: Add {Haswell, Broadwell}-noTSX CPU models

2015-03-25 Thread Eric Blake
On 03/24/2015 06:17 AM, Jiri Denemark wrote: > QEMU 2.3 adds these new models to cover Haswell and Broadwell CPUs with > updated microcode. Luckily, they also reverted former the machine type > specific changes to existing models. And since these changes were never > released, we don't need to hack

Re: [libvirt] [PATCH] qemu: Give hint about -noTSX CPU model

2015-03-25 Thread Eric Blake
On 03/24/2015 07:20 AM, Jiri Denemark wrote: > Because of the microcode update to Haswell/Broadwell CPUs, existing > domains using these CPUs may fail to start even though they used to run > just fine. To help users solve this issue we try to suggest switching to > -noTSX variant of the CPU model:

Re: [libvirt] [PATCH 1/2] qemu: command: Report error when formatting network source with protocol _NONE

2015-03-25 Thread Eric Blake
On 03/24/2015 09:24 AM, Peter Krempa wrote: > The function that formats the string for network drives would return > error code but did not set the error message when called on storage > source with VIR_STORAGE_NET_PROTOCOL_LAST or _NONE. > > Report an error in this case if it would ever be called

Re: [libvirt] [PATCH] Fix common misspellings

2015-03-25 Thread Eric Blake
On 03/23/2015 02:46 AM, Martin Kletzander wrote: >>> - In exceptional circumstances longer initial embargos may be >>> + In exceptional circumstances longer initial embargoes may be >> >> This one is ambiguous (I've seen both spellings; zeros/zeroes is another >> such word), but Thunderb

Re: [libvirt] [PATCH 2/2] qemu: command: Check for empty network source when formatting drive cmd

2015-03-25 Thread Eric Blake
On 03/24/2015 09:24 AM, Peter Krempa wrote: > Use the virStorageSourceIsEmpty helper to determine whether the drive > source is empty rather than checking for src->path. This will fix start > of VM with empty network cdrom that would not report any error. > --- > src/qemu/qemu_command.c | 9 --

Re: [libvirt] [PATCH 5/7] conf: Introduce virStoragePoolLoadAllState && virStoragePoolLoadState

2015-03-25 Thread John Ferlan
On 03/24/2015 06:06 AM, Erik Skultety wrote: > These functions operate exactly the same as > virStoragePoolLoadAllConfigs. > > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1177733 > --- > src/conf/storage_conf.c | 90 > > src/conf/stor

Re: [libvirt] [PATCH 6/7] storage: Introduce storagePoolUpdateAllState function

2015-03-25 Thread John Ferlan
On 03/24/2015 06:06 AM, Erik Skultety wrote: > The update was originally part of the storageDriverAutostart function, s/update/checkPool > but the pools have to be checked earlier during initialization phase, so s/have/need > the 'checkPool' block has been moved to storagePoolUpdateAllState.

Re: [libvirt] [PATCH] compile failure 'src/cpu/cpu_map.xml': No such file or directory'

2015-03-25 Thread Ján Tomko
On Wed, Mar 25, 2015 at 10:59:41AM -0400, Amy Fong wrote: > On Wed, Mar 25, 2015 at 10:35:45AM +0100, Ján Tomko wrote: > > On Mon, Mar 23, 2015 at 01:48:06PM -0400, Amy Fong wrote: > > > >From 73172eeed1fcffcfae088a3059fbca0689b7437f Mon Sep 17 00:00:00 2001 > > > From: Amy Fong > > > Date: Mon, 2

Re: [libvirt] [PATCH 7/7] storage: Create/Delete pool status XML

2015-03-25 Thread John Ferlan
On 03/24/2015 06:06 AM, Erik Skultety wrote: > Once we introduced virStoragePoolSaveStatus function, create a status > XML every time a pool is created (virStoragePoolCreate, > storageDriverAutostart) > > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=117

[libvirt] [PATCH 1/7] Rename virDomainIOThreadsInfoFree to virDomainIOThreadInfoFree

2015-03-25 Thread Ján Tomko
This function only frees the info for one thread. --- daemon/remote.c | 2 +- include/libvirt/libvirt-domain.h | 2 +- src/libvirt-domain.c | 6 +++--- src/libvirt_public.syms | 2 +- src/qemu/qemu_driver.c | 4 ++-- src/remote/remote_driver.c

[libvirt] [PATCH 3/7] Rename DomainGetIOThreadsInfo to DomainGetIOThreadInfo

2015-03-25 Thread Ján Tomko
While it returns info about multiple threads, the version without the plural is easier to read. --- daemon/remote.c | 12 ++-- include/libvirt/libvirt-domain.h | 2 +- src/driver-hypervisor.h | 4 ++-- src/libvirt-domain.c | 14 +++--- src/li

[libvirt] [PATCH 7/7] add cpu time to iothreadinfo

2015-03-25 Thread Ján Tomko
Add cpuTime to virDomainIOThreadInfo, fill it out in the qemu driver and print it in virsh. --- daemon/remote.c | 1 + include/libvirt/libvirt-domain.h | 1 + src/qemu/qemu_driver.c | 10 ++ src/remote/remote_driver.c | 1 + src/remote/remote_protocol.x

[libvirt] [PATCH 6/7] Do not use vshPrintPinInfo in iothreadinfo

2015-03-25 Thread Ján Tomko
Just format the bitmap via virBitmapFormat. --- tools/virsh-domain.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index afd92b1..cb9cb9d 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -6834,6 +6834,7

[libvirt] [PATCH 2/7] Rename qemuMonitorIOThreadsInfo* to qemuMonitorIOThreadInfo*

2015-03-25 Thread Ján Tomko
It only deals with a single thread. --- src/qemu/qemu_driver.c | 4 ++-- src/qemu/qemu_monitor.c | 4 ++-- src/qemu/qemu_monitor.h | 10 +- src/qemu/qemu_monitor_json.c | 8 src/qemu/qemu_monitor_json.h | 2 +- src/qemu/qemu_process.c | 4 ++-- tests/qemu

[libvirt] [PATCH 4/7] gendispatch: remove IOThreads from name fixups

2015-03-25 Thread Ján Tomko
No more APIs have IOThreads in their name now. --- src/rpc/gendispatch.pl | 1 - 1 file changed, 1 deletion(-) diff --git a/src/rpc/gendispatch.pl b/src/rpc/gendispatch.pl index aa73d0c..b642d6e 100755 --- a/src/rpc/gendispatch.pl +++ b/src/rpc/gendispatch.pl @@ -67,7 +67,6 @@ sub fixup_name {

[libvirt] [PATCH 0/7] iothread api followups

2015-03-25 Thread Ján Tomko
Looking at the proposed SetIOThread API, I noticed that the virsh command for printing the info is named 'iothreadsinfo'. This seemed counter-intuitive for me. Since the API has not been released yet, I propose a rename of the command to: iothreadinfo (patch 5) and the API for freeing one struct t

Re: [libvirt] [PATCH v4 1/2] cleanup conf/device_conf.h inclusion from util/virnetdev.h

2015-03-25 Thread Ján Tomko
On Wed, Mar 25, 2015 at 07:33:41PM +0530, Shivaprasad G Bhat wrote: > Move the struct and enum definitions from device_conf.h to > virnetdev.h thus avoiding the file inclusion. > > The wrong reference of conf files from util/ is allowed > in Makefile.am for now. The reason being, > The change in M

[libvirt] [PATCH 5/7] virsh: rename iothreadsinfo to iothreadinfo

2015-03-25 Thread Ján Tomko
The plural seems unnecessary. --- tools/virsh-domain.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index c8e0233..afd92b1 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -6792,7 +6792,7 @@ cmdSetvcpu

Re: [libvirt] [PATCH v4 2/2] network_conf: check if bridge exists on host for user created bridges

2015-03-25 Thread Ján Tomko
On Wed, Mar 25, 2015 at 07:35:12PM +0530, Shivaprasad G Bhat wrote: > virNetworkBridgeInUse() doesn't check if the bridge is manually created > outside of libvirt. Check if the bridge actually exist on host using the > virNetDevExists(). > > Signed-off-by: Shivaprasad G Bhat > --- > src/conf/net

Re: [libvirt] [PATCH 0/7] iothread api followups

2015-03-25 Thread John Ferlan
On 03/25/2015 02:39 PM, Ján Tomko wrote: > Looking at the proposed SetIOThread API, I noticed > that the virsh command for printing the info is named 'iothreadsinfo'. > This seemed counter-intuitive for me. > > Since the API has not been released yet, I propose a rename of the command to: > ioth

Re: [libvirt] [PATCH 1/7] Implement public API for virDomainIOThreadsSet

2015-03-25 Thread John Ferlan
On 03/25/2015 11:37 AM, Peter Krempa wrote: > On Wed, Mar 25, 2015 at 16:29:22 +0100, Ján Tomko wrote: >> On Thu, Mar 19, 2015 at 01:08:22PM -0400, John Ferlan wrote: >>> Add virDomainIOThreadsSet to allow setting the number of IOThreads for >>> a domain. >>> >>> The API supports updating both th

[libvirt] [PATCH 3/3] libxl: drop virDomainObj lock when destroying a domain

2015-03-25 Thread Jim Fehlig
A destroy operation can take considerable time on large memory domains due to scrubbing the domain' memory. The operation is running in the context of a job, so unlocking the domain and allowing query operations is safe. Signed-off-by: Jim Fehlig --- src/libxl/libxl_domain.c | 4 src/libxl

[libvirt] [PATCH 0/3] libxl: domain destroy fixes

2015-03-25 Thread Jim Fehlig
This small series of patches fixes some issues wrt domain destroy in the libxl driver. The primary motivation for this work is to prevent locking the virDomainObj during long running destroy operations on large memory domains. Patch 1 moves job acquisition from libxlDomainStart to it's callers so

[libvirt] [PATCH 2/3] libxl: acquire a job when destroying a domain

2015-03-25 Thread Jim Fehlig
A job should be acquired at the beginning of a domain destroy operation, not at the end when cleaning up the domain. Fix two occurances of this late job acquisition in the libxl driver. Doing so renders libxlDomainCleanup unused, so it is removed. Signed-off-by: Jim Fehlig --- src/libxl/libxl_

[libvirt] [PATCH 1/3] libxl: Move job acquisition in libxlDomainStart to callers

2015-03-25 Thread Jim Fehlig
Let callers of libxlDomainStart decide when it is appropriate to acquire a job on the associated virDomainObj. Signed-off-by: Jim Fehlig --- src/libxl/libxl_domain.c | 24 -- src/libxl/libxl_driver.c | 53 +++- 2 files changed, 52 i

Re: [libvirt] [PATCH 0/7] Implement Set IOThreads Command

2015-03-25 Thread John Ferlan
On 03/19/2015 01:08 PM, John Ferlan wrote: > These patches will implement the Set IOThreads command to complete > the IOThreads family of calls/settings. There are 3 patches in the > middle (3, 4, & 5) which are just refactoring the SetVcpus code so > that the SetIOThreads code can make use of t

Re: [libvirt] [PATCH 5/7] virsh: rename iothreadsinfo to iothreadinfo

2015-03-25 Thread John Ferlan
On 03/25/2015 02:39 PM, Ján Tomko wrote: > The plural seems unnecessary. > --- > tools/virsh-domain.c | 14 +++--- > 1 file changed, 7 insertions(+), 7 deletions(-) > You would need to adjust virsh.pod too. > diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c > index c8e0233..a

Re: [libvirt] [PATCH 1/7] Implement public API for virDomainIOThreadsSet

2015-03-25 Thread John Ferlan
>> >> This seems ok for the use case where we just give a domain a few >> iothreads and all the disks will share them. >> >> But if you go for one iothread per disk, creating holes in iothread >> indexes could make sense - we allow unplugging disks from the middle. >> >> I can't think of a case wh

Re: [libvirt] [Xen-devel] [PATCH 2/3] libxl: acquire a job when destroying a domain

2015-03-25 Thread Konrad Rzeszutek Wilk
On Wed, Mar 25, 2015 at 02:08:35PM -0600, Jim Fehlig wrote: > A job should be acquired at the beginning of a domain destroy operation, > not at the end when cleaning up the domain. Fix two occurances of this > late job acquisition in the libxl driver. Doing so renders > libxlDomainCleanup unused,

[libvirt] [PATCH] libxl: Fix memory leak if pthread_create fails.

2015-03-25 Thread Konrad Rzeszutek Wilk
If we fail to create the thread we leak the shutdown_info structure. Signed-off-by: Konrad Rzeszutek Wilk --- src/libxl/libxl_domain.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index 774b070..0ac5c62 100644 --- a/src

Re: [libvirt] [PATCH 0/2] fail out if enable userns but disable netns

2015-03-25 Thread Chen, Hanxiao
> -Original Message- > From: libvir-list-boun...@redhat.com [mailto:libvir-list-boun...@redhat.com] > On > Behalf Of Chen Hanxiao > Sent: Monday, March 23, 2015 11:46 AM > To: libvir-list@redhat.com > Subject: [libvirt] [PATCH 0/2] fail out if enable userns but disable netns > > > Chen

[libvirt] [PATCH 1/1] nodeinfo: Increase the num of CPU thread siblings to a larger value

2015-03-25 Thread Wei Huang
Current libvirt can only handle up to 1024 thread siblings when it reads Linux sysfs topology/thread_siblings. This isn't enough for Linux distributions that support a large value. This patch fixes the problem by using VIR_ALLOC()/VIR_FREE(), instead of using a fixed-size (1024) local char array. I

[libvirt] [PATCH] qemu: fix cannot start a vm with memory device with address

2015-03-25 Thread Luyao Huang
When start a vm which have a memory device with address, the error like this : error: Failed to start domain test3 error: internal error: early end of file from monitor: possible problem: 2015-03-26T03:45:52.338891Z qemu-kvm: -device pc-dimm,node=0,memdev=memdimm0, id=dimm0,slot=0,base=4294967296:

Re: [libvirt] [libvirt-test-API][PATCH 2/2] Add cases to basic_network.conf

2015-03-25 Thread hongming
ACK and Pushed Thanks Hongming On 02/15/2015 03:02 PM, Jincheng Miao wrote: Signed-off-by: Jincheng Miao --- cases/basic_network.conf | 24 1 files changed, 24 insertions(+), 0 deletions(-) diff --git a/cases/basic_network.conf b/cases/basic_network.conf index e9

Re: [libvirt] [PATCH] Fix common misspellings

2015-03-25 Thread Martin Kletzander
On Wed, Mar 25, 2015 at 10:44:53AM -0600, Eric Blake wrote: On 03/23/2015 02:46 AM, Martin Kletzander wrote: - In exceptional circumstances longer initial embargos may be + In exceptional circumstances longer initial embargoes may be This one is ambiguous (I've seen both spellings;