Re: [libvirt] [PATCH 1/2] rpc: Report proper close reason

2014-12-01 Thread Jiri Denemark
On Sun, Nov 30, 2014 at 20:09:08 +0100, Martin Kletzander wrote: Whenever client socket was marked as closed for some reason, it could've been changed when really closing the connection. With this patch the proper reason is kept since the first time it's marked as closed. Signed-off-by:

[libvirt] [PATCH 0/2] fix attached vm cannot get a right label

2014-12-01 Thread Luyao Huang
When call qemuProcessAttach to attach a qemu process, libvirt will generate a wrong label for DAC, and do not set imagelabel for both of them, no imagelabel will cause some other issue. After this patch guest label will be : seclabel type='static' model='selinux' relabel='yes'

[libvirt] [PATCH 1/2] qemu: fix some small issue in qemuProcessAttach

2014-12-01 Thread Luyao Huang
There are some small issue in qemuProcessAttach: 1.Fix virSecurityManagerGetProcessLabel always get pid = 0, move 'vm-pid = pid' before call virSecurityManagerGetProcessLabel. 2.Use virSecurityManagerGenLabel to get image label. 3.Fix always set selinux label for other security driver label.

[libvirt] [PATCH 2/2] security: Add a new func use stat to get process DAC label

2014-12-01 Thread Luyao Huang
When use qemuProcessAttach to attach a qemu process, cannot get a right DAC label. Add a new func to get process label via stat func. Do not remove virDomainDefGetSecurityLabelDef before try to use stat to get process DAC label, because There are some other func call virSecurityDACGetProcessLabel.

Re: [libvirt] [libvirt-python PATCH] fix examples

2014-12-01 Thread Peter Krempa
Mention which example you are fixing. On 11/28/14 09:57, Pavel Hrdina wrote: The dhcpleases example had an old usage of print function. The formating of leases record was also wrong. I presume you want to make it work in python3. It might be worth mentioning that explicitly. The

Re: [libvirt] [PATCH 2/2] virsh: Really disconnect on keepalive timeout

2014-12-01 Thread Jiri Denemark
On Sun, Nov 30, 2014 at 20:09:09 +0100, Martin Kletzander wrote: Commit 676cb4f4e762b8682a06c6dab1f690fbcd939550 added client keepalive support for virsh. But because whenever the connection is closed, virsh tries to reconnect, unless the disconnection happened with the reason

Re: [libvirt] [PATCH 2/2] virsh: Really disconnect on keepalive timeout

2014-12-01 Thread Martin Kletzander
On Mon, Dec 01, 2014 at 11:05:04AM +0100, Jiri Denemark wrote: On Sun, Nov 30, 2014 at 20:09:09 +0100, Martin Kletzander wrote: Commit 676cb4f4e762b8682a06c6dab1f690fbcd939550 added client keepalive support for virsh. But because whenever the connection is closed, virsh tries to reconnect,

Re: [libvirt] [PATCH 1/2] qemu: fix some small issue in qemuProcessAttach

2014-12-01 Thread Martin Kletzander
On Mon, Dec 01, 2014 at 05:54:35PM +0800, Luyao Huang wrote: There are some small issue in qemuProcessAttach: 1.Fix virSecurityManagerGetProcessLabel always get pid = 0, move 'vm-pid = pid' before call virSecurityManagerGetProcessLabel. 2.Use virSecurityManagerGenLabel to get image label.

Re: [libvirt] [PATCH 2/2] conf: Add device-related code for panic devices

2014-12-01 Thread Peter Krempa
On 11/30/14 21:10, Martin Kletzander wrote: Signed-off-by: Martin Kletzander mklet...@redhat.com --- src/conf/domain_conf.c | 76 - src/conf/domain_conf.h | 2 ++ src/qemu/qemu_driver.c | 6 src/qemu/qemu_hotplug.c | 1 + 4 files

Re: [libvirt] [PATCH 2/2] security: Add a new func use stat to get process DAC label

2014-12-01 Thread Martin Kletzander
On Mon, Dec 01, 2014 at 05:54:36PM +0800, Luyao Huang wrote: When use qemuProcessAttach to attach a qemu process, cannot get a right DAC label. Add a new func to get process label via stat func. Do not remove virDomainDefGetSecurityLabelDef before try to use stat to get process DAC label,

Re: [libvirt] [PATCH 1/2] conf: Add device-related code for TPM devices

2014-12-01 Thread Peter Krempa
On 11/30/14 21:10, Martin Kletzander wrote: Signed-off-by: Martin Kletzander mklet...@redhat.com --- src/conf/domain_conf.c | 52 - src/conf/domain_conf.h | 5 + src/qemu/qemu_driver.c | 6 ++ src/qemu/qemu_hotplug.c | 1 + 4

Re: [libvirt] [PATCH 1/2] qemu: fix some small issue in qemuProcessAttach

2014-12-01 Thread Martin Kletzander
On Mon, Dec 01, 2014 at 11:17:54AM +0100, Martin Kletzander wrote: On Mon, Dec 01, 2014 at 05:54:35PM +0800, Luyao Huang wrote: There are some small issue in qemuProcessAttach: 1.Fix virSecurityManagerGetProcessLabel always get pid = 0, move 'vm-pid = pid' before call

[libvirt] [PATCH v2 0/2] virsh: Don't wait for reconnection when it's unnecessary

2014-12-01 Thread Martin Kletzander
Before when disconnected due to keepalive timeout: $ virsh -k1 -K1 list 2014-12-01 10:58:42.725+: 1643: info : libvirt version: 1.2.11 2014-12-01 10:58:42.725+: 1643: warning : virKeepAliveTimerInternal:143 : No response from client 0x7fa8b7c46f70 after 1 keepalive messages in 2

[libvirt] [PATCH v2 2/2] virsh: Don't reconnect after the command when disconnected

2014-12-01 Thread Martin Kletzander
Each command that needs a connection causes a new connection to be made. Reconnecting after a command failed is pointless, mainly when there is no other command to run. Removeing three lines of code takes care of that and keeps virsh working as it should. Signed-off-by: Martin Kletzander

[libvirt] [PATCH v2 1/2] rpc: Report proper close reason for keepalive disconnections

2014-12-01 Thread Martin Kletzander
Whenever client socket was disconnected due to keepalive timeout, the I/O event loop did not exit and continued until the point where the hangup was found. Ending with an error right away when the keepalive times out takes care of this problem. Signed-off-by: Martin Kletzander

Re: [libvirt] [PATCH v1 4/5] qemu_migration: Send disk sizes to the other side

2014-12-01 Thread Peter Krempa
On 11/27/14 14:55, Michal Privoznik wrote: Up 'til now, users need to precreate non-shared storage on migration themselves. This is not very friendly requirement and we should do something about it. In this patch, the migration cookie is extended, so that nbd/ section does not only contain NBD

Re: [libvirt] [PATCH 1/2] conf: Add device-related code for TPM devices

2014-12-01 Thread Martin Kletzander
On Mon, Dec 01, 2014 at 11:23:06AM +0100, Peter Krempa wrote: On 11/30/14 21:10, Martin Kletzander wrote: Signed-off-by: Martin Kletzander mklet...@redhat.com --- src/conf/domain_conf.c | 52 - src/conf/domain_conf.h | 5 +

Re: [libvirt] [PATCH] network: Let domains be restricted to local DNS

2014-12-01 Thread John Ferlan
On 11/20/2014 09:46 PM, Josh Stone wrote: This adds a new localOnly attribute on the domain element of the network xml. With this set to yes, DNS requests under that domain will only be resolved by libvirt's dnsmasq, never forwarded upstream. This was how it worked before commit

Re: [libvirt] [PATCH v4 6/6] qemu-command: introduce new vgamem attribute for QXL video device

2014-12-01 Thread Giuseppe Scrivano
Pavel Hrdina phrd...@redhat.com writes: diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 6313d30..5c1b1de 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -10272,6 +10272,7 @@ virDomainVideoDefParseXML(xmlNodePtr node, char *heads = NULL; char

Re: [libvirt] [PATCH v4 6/6] qemu-command: introduce new vgamem attribute for QXL video device

2014-12-01 Thread Pavel Hrdina
On 12/01/2014 12:53 PM, Giuseppe Scrivano wrote: Pavel Hrdina phrd...@redhat.com writes: diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 6313d30..5c1b1de 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -10272,6 +10272,7 @@

[libvirt] [PATCH] conf: Don't redefine virDomainTPMDefPtr

2014-12-01 Thread Martin Kletzander
Signed-off-by: Martin Kletzander mklet...@redhat.com --- Notes: Pushed as a build-breaker. src/conf/domain_conf.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 4ef2300..439f3c0 100644 --- a/src/conf/domain_conf.h +++

Re: [libvirt] [PATCH] qemu: Drop OVMF whitelist

2014-12-01 Thread Paolo Bonzini
On 19/11/2014 18:20, Michal Privoznik wrote: As discussed on the upstream list, it's better not to make this kind of predictions in libvirt. It may happen that qemu learns how to enable OVMF on other architectures too and we shouldn't try to chase that. Signed-off-by: Michal Privoznik

Re: [libvirt] [PATCH] network: Let domains be restricted to local DNS

2014-12-01 Thread Laine Stump
On 11/30/2014 04:06 PM, Martin Kletzander wrote: On Thu, Nov 20, 2014 at 06:46:41PM -0800, Josh Stone wrote: This adds a new localOnly attribute on the domain element of the network xml. With this set to yes, DNS requests under that domain will only be resolved by libvirt's dnsmasq, never

Re: [libvirt] [PATCH v4 6/6] qemu-command: introduce new vgamem attribute for QXL video device

2014-12-01 Thread Giuseppe Scrivano
Pavel Hrdina phrd...@redhat.com writes: The vgamem is a new attribute for QXL. The vram stil exists and its only silently updated to proper value. The configuration with vram=9216 is wrong and should be updated in virt-manager tests. the issue exists when the type of an existing QXL device is

[libvirt] [PATCH] qemu: Use AAVMF as UEFI default on ARMs

2014-12-01 Thread Michal Privoznik
One of the things I've spotted while playing with OVMF is, that on different architectures the OVMF firmware has different names. Like arm and aarch64: it's AAVMF_{CODE,VARS}.fd. We should reflect that. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/qemu/qemu.conf | 5 -

Re: [libvirt] [PATCH] network: Let domains be restricted to local DNS

2014-12-01 Thread Martin Kletzander
On Mon, Dec 01, 2014 at 07:49:32AM -0500, Laine Stump wrote: On 11/30/2014 04:06 PM, Martin Kletzander wrote: On Thu, Nov 20, 2014 at 06:46:41PM -0800, Josh Stone wrote: This adds a new localOnly attribute on the domain element of the network xml. With this set to yes, DNS requests under that

Re: [libvirt] [PATCH v4 6/6] qemu-command: introduce new vgamem attribute for QXL video device

2014-12-01 Thread Pavel Hrdina
On 12/01/2014 01:50 PM, Giuseppe Scrivano wrote: Pavel Hrdina phrd...@redhat.com writes: The vgamem is a new attribute for QXL. The vram stil exists and its only silently updated to proper value. The configuration with vram=9216 is wrong and should be updated in virt-manager tests. the issue

Re: [libvirt] [PATCH v2 1/5] Introduce virDomainResumeFlags API

2014-12-01 Thread Peter Krempa
On 11/06/14 14:01, Michal Privoznik wrote: The old DomainResume API lacks flags argument. This is unfortunate, because there may exist some use cases where an additional work could be done on domain resume. However, without flags it's not possible. Signed-off-by: Michal Privoznik

Re: [libvirt] [PATCH v2 2/5] Implement virDomainResumeFlags in all drivers

2014-12-01 Thread Peter Krempa
On 11/06/14 14:01, Michal Privoznik wrote: This practically boils down to: 1) rename DomainResume implementation to DomainResumeFlags 2) make DomainResume call DomainResumeFlags(dom, 0); Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/esx/esx_driver.c | 14

Re: [libvirt] [PATCH v2 3/5] qemu: Split qemuDomainSetTime into two functions

2014-12-01 Thread Peter Krempa
On 11/06/14 14:01, Michal Privoznik wrote: This is pure code movement to dig out the function internals into a separate functions as the code is to be reused later. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/qemu/qemu_driver.c | 86

Re: [libvirt] [PATCH v2 5/5] virsh: Implement virDomainResumeFlags

2014-12-01 Thread Peter Krempa
On 11/06/14 14:01, Michal Privoznik wrote: This is done by introducing '--sync-time' to already existing 'resume' command. If the option is used, the newer Flags() API is called. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tools/virsh-domain.c | 13 -

Re: [libvirt] [PATCH v2 4/5] qemuDomainResumeFlags: Introduce VIR_DOMAIN_RESUME_SYNC_TIME

2014-12-01 Thread Peter Krempa
On 11/12/14 18:40, Michal Privoznik wrote: On 06.11.2014 15:31, Eric Blake wrote: On 11/06/2014 02:01 PM, Michal Privoznik wrote: This flag can be used to sync the domain's time right after domain CPUs are started. It's basically backing call of two subsequent APIs into one: 1)

[libvirt] [PATCH] docs: Correct invalid hyperlinks

2014-12-01 Thread Martin Kletzander
Since libvirt.h was split into multiple files and similarly docs/libvirt-libvirt.html, docs/hvsupport.html have bad hyperlinks. The same happens for all the html.in files that used code class='docref' tag, because page.xsl has no idea where to point the link that's found. Signed-off-by: Martin

[libvirt] [PATCH v2 1/4] storage: Introduce storagePoolLookupByPath

2014-12-01 Thread Michal Privoznik
While this could be exposed as a public API, it's not done yet as there's no demand for that yet. Anyway, this is just preparing the environment for easier volume creation on the destination. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/storage/storage_driver.c | 36

[libvirt] [PATCH v2 0/4] Precreate storage on migration

2014-12-01 Thread Michal Privoznik
Version two of: https://www.redhat.com/archives/libvir-list/2014-November/msg01048.html diff to v1: -Switch from qemuDomainGetBlockInfoImpl() to qemuMonitorBlockStatsUpdateCapacity() -s/alloc/capacity/ -small fixes raised by Peter Michal Privoznik (4): storage: Introduce

[libvirt] [PATCH v2 2/4] qemuMonitorJSONBlockStatsUpdateCapacity: Don't skip disks

2014-12-01 Thread Michal Privoznik
The function queries the block devices visible to qemu ('query-block') and parses the qemu's output. The info is returned in a hash table which is expected to be pre-filled by qemuMonitorJSONGetAllBlockStatsInfo(). However, in the next patch we are not going to call the latter function at all, so

[libvirt] [PATCH v2 4/4] qemu_migration: Precreate missing storage

2014-12-01 Thread Michal Privoznik
Based on previous commit, we can now precreate missing volumes. While digging out the functionality from storage driver would be nicer, if you've seen the code it's nearly impossible. So I'm going from the other end: 1) For given disk target, disk path is looked up. 2) For the disk path, storage

[libvirt] [PATCH v2 3/4] qemu_migration: Send disk sizes to the other side

2014-12-01 Thread Michal Privoznik
Up 'til now, users need to precreate non-shared storage on migration themselves. This is not very friendly requirement and we should do something about it. In this patch, the migration cookie is extended, so that nbd/ section does not only contain NBD port, but info on disks being migrated. This

Re: [libvirt] [PATCH 2/2] security: Add a new func use stat to get process DAC label

2014-12-01 Thread Luyao Huang
On 12/01/2014 06:24 PM, Martin Kletzander wrote: On Mon, Dec 01, 2014 at 05:54:36PM +0800, Luyao Huang wrote: When use qemuProcessAttach to attach a qemu process, cannot get a right DAC label. Add a new func to get process label via stat func. Do not remove virDomainDefGetSecurityLabelDef

Re: [libvirt] [PATCH v4 6/6] qemu-command: introduce new vgamem attribute for QXL video device

2014-12-01 Thread Giuseppe Scrivano
Pavel Hrdina phrd...@redhat.com writes: Well, I think that this is not correct usage of the libvirt XML. You should not just change one part of the device configuration. If user of virt-manager change the device type, you should create a new XML according to the new device type and copy all

Re: [libvirt] [PATCH 0/2] Add more duplicate scsi_host/fc_host adapter checks

2014-12-01 Thread John Ferlan
On 11/18/2014 04:26 PM, John Ferlan wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1159180 Currently libvirt only detects duplicate fc_host scsi_host adapter sources when the incoming source type definition is the same as the pool type. This misses the even more oddball cases where a

Re: [libvirt] [PATCH 2/2] security: Add a new func use stat to get process DAC label

2014-12-01 Thread Luyao Huang
On 12/01/2014 11:20 PM, Martin Kletzander wrote: On Mon, Dec 01, 2014 at 11:05:30PM +0800, Luyao Huang wrote: On 12/01/2014 06:24 PM, Martin Kletzander wrote: On Mon, Dec 01, 2014 at 05:54:36PM +0800, Luyao Huang wrote: When use qemuProcessAttach to attach a qemu process, cannot get a right

Re: [libvirt] [PATCH 1/2] qemu: fix some small issue in qemuProcessAttach

2014-12-01 Thread Luyao Huang
On 12/01/2014 06:27 PM, Martin Kletzander wrote: On Mon, Dec 01, 2014 at 11:17:54AM +0100, Martin Kletzander wrote: On Mon, Dec 01, 2014 at 05:54:35PM +0800, Luyao Huang wrote: There are some small issue in qemuProcessAttach: 1.Fix virSecurityManagerGetProcessLabel always get pid = 0, move

[libvirt] [PATCH v4 10/15] parallels: Add domainCreateWithFlags() function.

2014-12-01 Thread Dmitry Guryanov
From: Alexander Burluka aburl...@parallels.com domainCreateWithFlags function is used by OpenStack/Nova to boot an instance. Signed-off-by: Dmitry Guryanov dgurya...@parallels.com --- src/parallels/parallels_driver.c | 10 ++ 1 file changed, 10 insertions(+) diff --git

[libvirt] [PATCH v4 12/15] parallels: implement domainUndefine and domainUndefineFlags

2014-12-01 Thread Dmitry Guryanov
Signed-off-by: Dmitry Guryanov dgurya...@parallels.com --- src/parallels/parallels_driver.c | 26 ++ src/parallels/parallels_sdk.c| 18 ++ src/parallels/parallels_sdk.h| 2 ++ 3 files changed, 46 insertions(+) diff --git

[libvirt] [PATCH v4 13/15] parallels: return PRL_RESULT from waitJob and getJobResult

2014-12-01 Thread Dmitry Guryanov
Return error code, returned by parallels SDK from waitJob and getJobResult, so that caller can handle different errors. Signed-off-by: Dmitry Guryanov dgurya...@parallels.com --- src/parallels/parallels_sdk.c | 67 ++- 1 file changed, 35 insertions(+), 32

[libvirt] [PATCH v4 11/15] parallels: add cdroms support

2014-12-01 Thread Dmitry Guryanov
Get cdrom devices list from parallels server in prlsdkLoadDomains and add ability to define a domain with cdroms. Signed-off-by: Dmitry Guryanov dgurya...@parallels.com --- src/parallels/parallels_sdk.c | 70 ++- 1 file changed, 63 insertions(+), 7

[libvirt] [PATCH v4 08/15] parallels: refactor parallelsDomainDefineXML

2014-12-01 Thread Dmitry Guryanov
First, we don't need to call prlsdkApplyConfig after creating new VM or containers, because it's done in functions prlsdkCreateVm and prlsdkCreateCt. No need to check, if domain exists in the list after prlsdkAddDomain. Also organize code, so that we can call virObjectUnlock in one place.

[libvirt] [PATCH v4 01/15] parallels: move IS_CT macro to parallels_utils.h

2014-12-01 Thread Dmitry Guryanov
This macro will be used in paralles_sdk.c so move it to common header. Signed-off-by: Dmitry Guryanov dgurya...@parallels.com --- src/parallels/parallels_driver.c | 2 -- src/parallels/parallels_utils.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[libvirt] [PATCH v4 14/15] parallels: fix getJobResultHelper

2014-12-01 Thread Dmitry Guryanov
When PrlJob_GetRetCode sets second argument to error value it means sdk function failed and we must return error from getJobResultHelper. Signed-off-by: Dmitry Guryanov dgurya...@parallels.com --- src/parallels/parallels_sdk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[libvirt] [PATCH v4 04/15] parallels: handle events from parallels server

2014-12-01 Thread Dmitry Guryanov
From: Alexander Burluka aburl...@parallels.com Subscribe to events from parallels server. It's needed for 2 things: to update cached domains list and to send corresponding libvirt events. Parallels server sends a lot of different events, in this patch we handle only some of them. In the future

[libvirt] [PATCH v4 06/15] parallels: rewrite parallelsApplyConfig with SDK

2014-12-01 Thread Dmitry Guryanov
Rewrite code, which applies domain configuration given to virDomainDefineXML function to the VM of container registered in PCS. This code first check if there are unsupported parameters in domain XML and if yes - reports error. Some of such parameters are not supported by PCS, for some - it's not

[libvirt] [PATCH v4 05/15] parallels: reimplement functions, which change domain state

2014-12-01 Thread Dmitry Guryanov
Change domain state using parallels SDK functions instead of prlctl command. We don't need to send events from these functions now, becase events handler will send them. But we still need to update virDomainObj in privconn-domains. Signed-off-by: Dmitry Guryanov dgurya...@parallels.com ---

[libvirt] [PATCH v4 09/15] parallels: added function virDomainIsActive()

2014-12-01 Thread Dmitry Guryanov
From: Alexander Burluka aburl...@parallels.com That function is necessary for proper domain removal in openstack/nova. Signed-off-by: Dmitry Guryanov dgurya...@parallels.com --- src/parallels/parallels_driver.c | 19 +++ 1 file changed, 19 insertions(+) diff --git

[libvirt] [PATCH v4 07/15] parallels: create VMs and containers with sdk

2014-12-01 Thread Dmitry Guryanov
This patch replaces code, which creates domains by running prlctl command. prlsdkCreateVm/Ct will do prlsdkApplyConfig, because we send request to the server only once in this case. But prlsdkApplyConfig will be called also from parallelsDomainDefineXML function. There is no problem with it,

[libvirt] [PATCH v4 02/15] parallels: get domain info with SDK

2014-12-01 Thread Dmitry Guryanov
From: Alexander Burluka aburl...@parallels.com Obtain information about domains using parallels sdk instead of prlctl. prlsdkLoadDomains functions behaves as former parallelsLoadDomains with NULL as second parameter (name) - it fills parallelsConn.domains list. prlsdkLoadDomain is now able to

[libvirt] [PATCH v4 03/15] parallels: move parallelsDomNotFoundError to parallels_utils.h

2014-12-01 Thread Dmitry Guryanov
Move macro parallelsDomNotFoundError to file parallels_utils.h, because it will be used in parallels_sdk.c. Signed-off-by: Dmitry Guryanov dgurya...@parallels.com --- src/parallels/parallels_driver.c | 8 src/parallels/parallels_utils.h | 8 2 files changed, 8 insertions(+), 8

Re: [libvirt] [PATCH 1/2] qemu: fix some small issue in qemuProcessAttach

2014-12-01 Thread Martin Kletzander
On Mon, Dec 01, 2014 at 11:30:09PM +0800, Luyao Huang wrote: On 12/01/2014 06:27 PM, Martin Kletzander wrote: On Mon, Dec 01, 2014 at 11:17:54AM +0100, Martin Kletzander wrote: On Mon, Dec 01, 2014 at 05:54:35PM +0800, Luyao Huang wrote: There are some small issue in qemuProcessAttach:

[libvirt] [PATCH v4 00/15] parallels: rewrite driver with parallels SDK

2014-12-01 Thread Dmitry Guryanov
This patch series replaces all code, which used prlctl command to interact with parallels cloud server with calls to parallels sdk functions. The model of this driver remain almost the same - in creates a list of virDomainObj objects on connect and then functions, which returns different

Re: [libvirt] [PATCH] qemu: Use AAVMF as UEFI default on ARMs

2014-12-01 Thread Cole Robinson
On 12/01/2014 07:48 AM, Michal Privoznik wrote: One of the things I've spotted while playing with OVMF is, that on different architectures the OVMF firmware has different names. Like arm and aarch64: it's AAVMF_{CODE,VARS}.fd. We should reflect that. Signed-off-by: Michal Privoznik

[libvirt] [PATCH v4 15/15] parallels: report proper error in Create/Destroy/Suspend e.t.c.

2014-12-01 Thread Dmitry Guryanov
If we want to perform some operation and domain state is not suitable for that operation, we should report error VIR_ERR_OPERATION_INVALID. Signed-off-by: Dmitry Guryanov dgurya...@parallels.com --- src/parallels/parallels_sdk.c | 37 +++--

[libvirt] [PATCH 03/11] Replace virNetworkFree with virObjectUnref

2014-12-01 Thread John Ferlan
Since virNetworkFree will call virObjectUnref anyway, let's just use that directly so as to avoid the possibility that we inadvertently clear out a pending error message when using the public API. Signed-off-by: John Ferlan jfer...@redhat.com --- cfg.mk | 4 ++--

[libvirt] [PATCH 02/11] Replace virDomainFree with virObjectUnref

2014-12-01 Thread John Ferlan
Since virDomainFree will call virObjectUnref anyway, let's just use that directly so as to avoid the possibility that we inadvertently clear out a pending error message when using the public API. Signed-off-by: John Ferlan jfer...@redhat.com --- cfg.mk | 12

[libvirt] [PATCH 04/11] Replace virNodeDeviceFree with virObjectUnref

2014-12-01 Thread John Ferlan
Since virNodeDeviceFree will call virObjectUnref anyway, let's just use that directly so as to avoid the possibility that we inadvertently clear out a pending error message when using the public API. Signed-off-by: John Ferlan jfer...@redhat.com --- cfg.mk | 4 ++--

[libvirt] [PATCH 11/11] Replace virDomainSnapshotFree with virObjectUnref

2014-12-01 Thread John Ferlan
Since virDomainSnapshotFree will call virObjectUnref anyway, let's just use that directly so as to avoid the possibility that we inadvertently clear out a pending error message when using the public API. Signed-off-by: John Ferlan jfer...@redhat.com --- cfg.mk | 4 ++--

[libvirt] [PATCH 10/11] Replace virInterfaceFree with virObjectUnref

2014-12-01 Thread John Ferlan
Since virInterfac3Free will call virObjectUnref anyway, let's just use that directly so as to avoid the possibility that we inadvertently clear out a pending error message when using the public API. Signed-off-by: John Ferlan jfer...@redhat.com --- cfg.mk | 4

[libvirt] [PATCH 09/11] Replace virNWFilterFree with virObjectUnref

2014-12-01 Thread John Ferlan
Since virNWFilterFree will call virObjectUnref anyway, let's just use that directly so as to avoid the possibility that we inadvertently clear out a pending error message when using the public API. Signed-off-by: John Ferlan jfer...@redhat.com --- cfg.mk | 4 ++--

[libvirt] [PATCH 08/11] Replace virSecretFree with virObjectUnref

2014-12-01 Thread John Ferlan
Since virSecretFree will call virObjectUnref anyway, let's just use that directly so as to avoid the possibility that we inadvertently clear out a pending error message when using the public API. Signed-off-by: John Ferlan jfer...@redhat.com --- cfg.mk| 4 ++--

[libvirt] [PATCH 01/11] rpc: Replace virXXXFree with virObjectUnref

2014-12-01 Thread John Ferlan
Modify the various virXXXFree calls to only call virObjectUnref. Calling the public API will reset the last error thus clearing out a pending error. Signed-off-by: John Ferlan jfer...@redhat.com --- src/rpc/gendispatch.pl | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-)

[libvirt] [PATCH 00/11] Replace virXXXFree calls with virObjectUnref

2014-12-01 Thread John Ferlan
Based on some recent review comments and a bit of internal IRC, this set of patches will change all the existing virXXXFree calls found in daemon/* and src/* to be virObjectUnref instead and then add a rule to inhibit usage unless the string/call is found in docs/*, tests/*, examples/*, tools/*,

[libvirt] [PATCH 07/11] Replace virStreamFree with virObjectUnref

2014-12-01 Thread John Ferlan
Since virStreamFree will call virObjectUnref anyway, let's just use that directly so as to avoid the possibility that we inadvertently clear out a pending error message when using the public API. Signed-off-by: John Ferlan jfer...@redhat.com --- cfg.mk | 4 ++--

[libvirt] [PATCH 06/11] Replace virStoragePoolFree with virObjectUnref

2014-12-01 Thread John Ferlan
Since virStoragePoolFree will call virObjectUnref anyway, let's just use that directly so as to avoid the possibility that we inadvertently clear out a pending error message when using the public API. Signed-off-by: John Ferlan jfer...@redhat.com --- cfg.mk | 2 +-

[libvirt] [PATCH 05/11] Replace virStorageVolFree with virObjectUnref

2014-12-01 Thread John Ferlan
Since virStorageVolFree will call virObjectUnref anyway, let's just use that directly so as to avoid the possibility that we inadvertently clear out a pending error message when using the public API. Signed-off-by: John Ferlan jfer...@redhat.com --- cfg.mk | 4 ++--

Re: [libvirt] [PATCH] docs: Correct invalid hyperlinks

2014-12-01 Thread Michal Privoznik
On 01.12.2014 15:37, Martin Kletzander wrote: Since libvirt.h was split into multiple files and similarly docs/libvirt-libvirt.html, docs/hvsupport.html have bad hyperlinks. The same happens for all the html.in files that used code class='docref' tag, because page.xsl has no idea where to point

[libvirt] [PATCH] libvirt.spec.in: BuildRequires: python-devel

2014-12-01 Thread Michal Privoznik
As of f48ab7d8 we are trying to use python-devel to check python's version (or at least gnulib is doing that). However, the specfile doesn't say anything about it and therefore bootstrapping may fail on a minimal installation on rawhide. Signed-off-by: Michal Privoznik mpriv...@redhat.com ---

[libvirt] [PATCH] nwfilter: fix crash when adding non-existing nwfilter

2014-12-01 Thread Pavel Hrdina
Adding non-existing nwfilter to a network interface device without any nwfilter specified will crash libvirt daemon with segfault. The reason is that the nwfilter is not found an libvirt will try to restore old nwfilter configuration but there is no nwfilter specified. Signed-off-by: Pavel Hrdina

[libvirt] [PATCH 3/4] domain_conf: Resolve Coverity CHECKED_RETURN

2014-12-01 Thread John Ferlan
Commit id '0d36a5d05' modified the code slightly, but removed the return value check thus causing Coverity to complain that this call was the only one where the return value wasn't checked. Since nothing was done previously if there was a failure, just use ignore_value here to pacify Coverity

[libvirt] [PATCH 0/4] Resolve some Coverity issues

2014-12-01 Thread John Ferlan
The issues found in the first 3 patches aren't usually seen, but I've had them sitting around awhile and figured they should be posted anyway since the last issue was seen from a recent change... John Ferlan (4): hotplug: Resolve Coverity FORWARD_NULL virhook: Resolve Coverity NULL_RETURNS

[libvirt] [PATCH 2/4] virhook: Resolve Coverity NULL_RETURNS

2014-12-01 Thread John Ferlan
Coverity complains that many other callers to return err from virGetLastError() will check if err is not NULL before dereferencing it. Just do the same here for safety. Signed-off-by: John Ferlan jfer...@redhat.com --- src/util/virhook.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

[libvirt] [PATCH 1/4] hotplug: Resolve Coverity FORWARD_NULL

2014-12-01 Thread John Ferlan
Coverity complained that because the cfg-macFilter call checked net-ifname != NULL before calling ebtablesRemoveForwardAllowIn, then the virNetDevOpenvswitchRemovePort call should have the same check. However, if I move the ebtables call prior to the check for TYPE_DIRECT (where there is a

Re: [libvirt] [libvirt-python PATCH] fix examples

2014-12-01 Thread Pavel Hrdina
On 11/28/2014 06:08 PM, Nehal J Wani wrote: On Fri, Nov 28, 2014 at 2:27 PM, Pavel Hrdina phrd...@redhat.com wrote: The dhcpleases example had an old usage of print function. The formating of leases record was also wrong. The event-test example had an old usage of exceptions. Signed-off-by:

Re: [libvirt] [libvirt-python PATCH] fix examples

2014-12-01 Thread Pavel Hrdina
On 12/01/2014 11:00 AM, Peter Krempa wrote: Mention which example you are fixing. On 11/28/14 09:57, Pavel Hrdina wrote: The dhcpleases example had an old usage of print function. The formating of leases record was also wrong. I presume you want to make it work in python3. It might be

[libvirt] [PATCH 4/4] libxl: Resolve Coverity CHECKED_RETURN

2014-12-01 Thread John Ferlan
Commit id 'cb88d433' refactored the calling sequence to use a thread; however, in doing so lost the check for if virNetSocketAccept returns failure. Since other code makes that check, Coverity complains. Although a false positive, adding back the failure check pacifies Coverity Signed-off-by:

[libvirt] [PATCH 08/11] qemu: retrieve dirty sync count

2014-12-01 Thread Cristian Klein
Signed-off-by: Cristian Klein cristikl...@gmail.com --- src/qemu/qemu_monitor.h | 1 + src/qemu/qemu_monitor_json.c | 4 src/qemu/qemu_monitor_text.c | 1 + tests/qemumonitorjsontest.c | 1 + 4 files changed, 7 insertions(+) diff --git a/src/qemu/qemu_monitor.h

[libvirt] [PATCH 05/11] qemu: implement virDomainMigrateStartPostCopy

2014-12-01 Thread Cristian Klein
Signed-off-by: Cristian Klein cristikl...@gmail.com --- src/qemu/qemu_driver.c | 50 ++ 1 file changed, 50 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 06803b4..fc7de23 100644 --- a/src/qemu/qemu_driver.c +++

[libvirt] [PATCH 00/11] Post-Copy Live Migration Support

2014-12-01 Thread Cristian Klein
Qemu currently implements pre-copy live migration. VM memory pages are first copied from the source hypervisor to the destination, potentially multiple times as pages get dirtied during transfer, then VCPU state is migrated. Unfortunately, if the VM dirties memory faster than the network

[libvirt] [PATCH 04/11] qemu: implemented post-copy migration logic

2014-12-01 Thread Cristian Klein
Perform phase stops once migration switched to post-copy. Confirm phase waits for post-copy to finish before killing the VM. Signed-off-by: Cristian Klein cristikl...@gmail.com --- src/qemu/qemu_driver.c| 8 src/qemu/qemu_migration.c | 46

[libvirt] [PATCH 01/11] Added public API for post-copy migration

2014-12-01 Thread Cristian Klein
Signed-off-by: Cristian Klein cristikl...@gmail.com --- include/libvirt/libvirt-domain.h | 5 +++ src/driver-hypervisor.h | 5 +++ src/libvirt-domain.c | 92 src/libvirt_public.syms | 1 + src/remote/remote_driver.c |

[libvirt] [PATCH 07/11] virsh: added --postcopy-after to migrate command

2014-12-01 Thread Cristian Klein
Signed-off-by: Cristian Klein cristikl...@gmail.com --- tools/virsh-domain.c | 60 ++-- tools/virsh.pod | 5 + 2 files changed, 63 insertions(+), 2 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index

[libvirt] [PATCH 06/11] virsh: added --enable-postcopy and migrate-start-postcopy

2014-12-01 Thread Cristian Klein
Signed-off-by: Cristian Klein cristikl...@gmail.com --- tools/virsh-domain.c | 50 ++ tools/virsh.pod | 11 +++ 2 files changed, 61 insertions(+) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 750411b..1753f6e 100644

[libvirt] [PATCH 09/11] qemu: implemented VIR_MIGRATE_POSTCOPY_AFTER_PRECOPY

2014-12-01 Thread Cristian Klein
Signed-off-by: Cristian Klein cristikl...@gmail.com --- src/qemu/qemu_driver.c| 2 ++ src/qemu/qemu_migration.c | 49 +++ src/qemu/qemu_migration.h | 3 ++- 3 files changed, 49 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_driver.c

[libvirt] [PATCH 03/11] qemu: implemented VIR_MIGRATE_ENABLE_POSTCOPY

2014-12-01 Thread Cristian Klein
Signed-off-by: Cristian Klein cristikl...@gmail.com --- src/qemu/qemu_migration.c | 82 +++ src/qemu/qemu_migration.h | 3 +- 2 files changed, 84 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index

[libvirt] [PATCH 02/11] qemu: added low-level post-copy migration functions

2014-12-01 Thread Cristian Klein
Signed-off-by: Cristian Klein cristikl...@gmail.com --- src/qemu/qemu_monitor.c | 24 ++-- src/qemu/qemu_monitor.h | 4 src/qemu/qemu_monitor_json.c | 23 ++- src/qemu/qemu_monitor_json.h | 1 + 4 files changed, 49 insertions(+), 3

[libvirt] [PATCH 10/11] virsh: added --postcopy-after-precopy to migrate

2014-12-01 Thread Cristian Klein
Signed-off-by: Cristian Klein cristikl...@gmail.com --- tools/virsh-domain.c | 6 ++ tools/virsh.pod | 5 + 2 files changed, 11 insertions(+) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 52e91d9..c453dc4 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c

[libvirt] [PATCH 11/11] Revert Do not allow changing the UUID of a nwfilter

2014-12-01 Thread Cristian Klein
This reverts commit 46a811db0731cedaea0153fc223faa6096cee5b5. It causes random problems in OpenStack, which displays the following error: error : virNWFilterObjAssignDef:3075 : operation failed: filter 'nova-no-nd-reflection' already exists with uuid ef783c9f-ae1c-4242-8cd5-9cef5ec4fa7a

Re: [libvirt] [PATCH v4 00/15] parallels: rewrite driver with parallels SDK

2014-12-01 Thread Maxim Nestratov
01.12.2014 18:38, Dmitry Guryanov пишет: This patch series replaces all code, which used prlctl command to interact with parallels cloud server with calls to parallels sdk functions. The model of this driver remain almost the same - in creates a list of virDomainObj objects on connect and then

Re: [libvirt] [PATCH] network: Let domains be restricted to local DNS

2014-12-01 Thread Josh Stone
On 12/01/2014 05:18 AM, Martin Kletzander wrote: On Mon, Dec 01, 2014 at 07:49:32AM -0500, Laine Stump wrote: On 11/30/2014 04:06 PM, Martin Kletzander wrote: On Thu, Nov 20, 2014 at 06:46:41PM -0800, Josh Stone wrote: This adds a new localOnly attribute on the domain element of the network

Re: [libvirt] [PATCH] network: Let domains be restricted to local DNS

2014-12-01 Thread Josh Stone
On 12/01/2014 03:40 AM, John Ferlan wrote: On 11/20/2014 09:46 PM, Josh Stone wrote: This adds a new localOnly attribute on the domain element of the network xml. With this set to yes, DNS requests under that domain will only be resolved by libvirt's dnsmasq, never forwarded upstream.

Re: [libvirt] [PATCHv5 0/3] leaseshelper: Couple of improvements

2014-12-01 Thread Nehal J Wani
On Thu, Nov 20, 2014 at 7:28 PM, Peter Krempa pkre...@redhat.com wrote: Nehal J Wani (1): leaseshelper: improvements to support all events Peter Krempa (2): leaseshelper: Refactor control flow network: dnsmasq: Don't format lease file path src/network/bridge_driver.c

Re: [libvirt] [PATCH] network: Let domains be restricted to local DNS

2014-12-01 Thread Josh Stone
Update: I think it is indeed a dnsmasq bug -- details below... [trimming some context and cross-posting to dnsmasq-discuss] On 12/01/2014 10:50 AM, Josh Stone wrote: On 12/01/2014 05:18 AM, Martin Kletzander wrote: On Mon, Dec 01, 2014 at 07:49:32AM -0500, Laine Stump wrote: On 11/30/2014

  1   2   >