[libvirt] Availability of libvirt-1.3.3-rc2

2016-03-31 Thread Daniel Veillard
I pushed the rc2 tag in git head and signed tarball and rpms to the usual place: ftp://libvrt.org/libvirt/ I didn't really had time to test it TBH, seems we don't have too much red in the CI https://ci.centos.org/view/libvirt-project/ , mostly perl tests, and virt manager, better than a

[libvirt] [PATCH v2] migration: convert speed from Mb/sec to bytes/sec in drive-mirror jobs

2016-03-31 Thread Rudy Zhang
Commit id '7b7600b3' added qemuMigrationDriveMirror to handle NBD mirroring, but passed the migrate_speed listed in MiB/s to be used for the mirror_speed which expects a bytes/s value. This patch will convert the migrate_speed value to its mirror_speed equivalent. Signed-off-by: Rudy Zhang

[libvirt] [PATCH] migration: convert speed from Mb/sec to bytes/sec in drive-mirror jobs

2016-03-31 Thread Rudy Zhang
Commit id '7b7600b3' added qemuMigrationDriveMirror to handle NBD mirroring, but passed the migrate_speed listed in MiB/s to be used for the mirror_speed which expects a bytes/s value. This patch will convert the migrate_speed value to its mirror_speed equivalent. Signed-off-by: Rudy Zhang

Re: [libvirt] [PATCH] migration: convert speed from Mb/sec to bytes/sec in drive-mirror jobs

2016-03-31 Thread Rudy Zhang
On 16/3/31 上午5:47, John Ferlan wrote: On 03/28/2016 12:02 AM, Rudy Zhang wrote: Block migration speed is differect from memory migration speed, because it not convert speed from Mb/sec to bytes/sec in the drive-mirror job. "different" Perhaps better stated: Commit id '7b7600b3' added

Re: [libvirt] [PATCH 1/1] python: add python binding for Perf API

2016-03-31 Thread Ren, Qiaowei
> -Original Message- > From: Michal Privoznik [mailto:mpriv...@redhat.com] > Sent: Thursday, March 31, 2016 10:04 PM > To: Ren, Qiaowei; libvir-list@redhat.com > Subject: Re: [libvirt] [PATCH 1/1] python: add python binding for Perf API > > On 31.03.2016 08:16, Michal Privoznik wrote: >

Re: [libvirt] [PATCH] allow ip and route elements for netdev ethernet

2016-03-31 Thread Laine Stump
On 03/31/2016 05:22 AM, Vasiliy Tolstov wrote: Allow to use ip address and routes elements inside network ethernet. Also allow to configure point-to-point address for host side device. In order to allow for possible backporting of parts of this feature without requiring backports of the rest,

Re: [libvirt] [PATCH 31/38] admin: Introduce virAdmConnectGetLoggingLevel

2016-03-31 Thread Daniel P. Berrange
On Thu, Mar 31, 2016 at 07:49:04PM +0200, Erik Skultety wrote: > Enable libvirt users to query for the current logging level setting. I'm not really convinced we need to expose this via the API, as the 'log_level' flag has really long ago ceased to be something practical to use. We generate

Re: [libvirt] [PATCH 37/38] admin: Export logging level constants via libvirt-admin.h

2016-03-31 Thread Daniel P. Berrange
On Thu, Mar 31, 2016 at 07:49:10PM +0200, Erik Skultety wrote: > We should encourage libvirt users to use our own constants when modifying > logging level, instead of their own values. > --- > include/libvirt/libvirt-admin.h | 15 +++ > src/util/virlog.h | 10 --

Re: [libvirt] [PATCH 29/38] virlog: Introduce an API mutex that serializes all setters

2016-03-31 Thread Daniel P. Berrange
On Thu, Mar 31, 2016 at 07:49:02PM +0200, Erik Skultety wrote: > If the API isn't closed, a situation with 2 setters where one is about to > define a set of outputs and the other is already defining a new one, may > occur. > By resetting all outputs, all file descriptors are closed. However, the

Re: [libvirt] netdev ethernet allow to specify ip address and routes

2016-03-31 Thread Laine Stump
On 03/31/2016 05:23 AM, Vasiliy Tolstov wrote: 2016-03-23 20:46 GMT+03:00 Laine Stump : Since there is no documentation included with the patch, and the wrong RNG file has been modified, I'm not clear on exactly why a libvirt virtual network would use a peer address. Normally

[libvirt] [PATCH 38/38] virt-admin: Wire-up the logging APIs

2016-03-31 Thread Erik Skultety
Finally, now that all APIs have been introduced, wire them up to virt-admin and introduce dmn-log-info and dmn-log-define commands. --- tools/virt-admin.c | 208 + 1 file changed, 208 insertions(+) diff --git a/tools/virt-admin.c

[libvirt] [PATCH 29/38] virlog: Introduce an API mutex that serializes all setters

2016-03-31 Thread Erik Skultety
If the API isn't closed, a situation with 2 setters where one is about to define a set of outputs and the other is already defining a new one, may occur. By resetting all outputs, all file descriptors are closed. However, the other setter may still have a dangling reference to a file descriptor

[libvirt] [PATCH 33/38] admin: Introduce virAdmConnectGetLoggingOutputs

2016-03-31 Thread Erik Skultety
Enable libvirt users to query logging output settings. --- daemon/admin.c | 42 include/libvirt/libvirt-admin.h | 5 + src/admin/admin_protocol.x | 16 ++- src/admin/admin_remote.c| 43

[libvirt] [PATCH 35/38] admin: Introduce virAdmConnectSetLoggingFilters

2016-03-31 Thread Erik Skultety
Enable libvirt users to modify logging filters of a daemon from outside. --- daemon/admin.c | 10 ++ include/libvirt/libvirt-admin.h | 4 src/admin/admin_protocol.x | 12 +++- src/admin_protocol-structs | 5 + src/libvirt-admin.c |

[libvirt] [PATCH 34/38] admin: Introduce virAdmConnectSetLoggingLevel

2016-03-31 Thread Erik Skultety
Enable libvirt users to set logging level of a daemon from outside. --- daemon/admin.c | 10 ++ include/libvirt/libvirt-admin.h | 4 src/admin/admin_protocol.x | 12 +++- src/admin_protocol-structs | 5 + src/libvirt-admin.c | 35

[libvirt] [PATCH 28/38] virlog: Make virLogSetDefaultPriority trigger source update as well

2016-03-31 Thread Erik Skultety
The source update is only triggered when a logging filter gets changed (by incrementing virLogSerial counter), but if we also want to enable remote global priority tuning, any change to priority needs to trigger the source update as well. --- src/util/virlog.c | 1 + 1 file changed, 1

[libvirt] [PATCH 37/38] admin: Export logging level constants via libvirt-admin.h

2016-03-31 Thread Erik Skultety
We should encourage libvirt users to use our own constants when modifying logging level, instead of their own values. --- include/libvirt/libvirt-admin.h | 15 +++ src/util/virlog.h | 10 -- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git

[libvirt] [PATCH 27/38] virlog: Rename virLogFiltersSerial to virLogSerial

2016-03-31 Thread Erik Skultety
Global priority can be changed from outside as well. So far, updating priority is filter driven, meaning that source priority can only be changed when filters change. To assure, users can change the global priority from outside, make the serial more generic, so that any change to priority would

[libvirt] [PATCH 15/38] virlog: Introduce virLogOutputFree

2016-03-31 Thread Erik Skultety
Add a complementary method to virLogOutputNew. --- src/libvirt_private.syms | 1 + src/util/virlog.c| 21 - src/util/virlog.h| 1 + 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index

[libvirt] [PATCH 30/38] virlog: Acquire virLogAPILock in each setter API

2016-03-31 Thread Erik Skultety
Now that a lock to serialize setters has been introduced, make use of it and lock every log setting API. --- src/util/virlog.c | 8 1 file changed, 8 insertions(+) diff --git a/src/util/virlog.c b/src/util/virlog.c index 6aa9c91..240d6e3 100644 --- a/src/util/virlog.c +++

[libvirt] [PATCH 17/38] virlog: Introduce virLogFilterFree

2016-03-31 Thread Erik Skultety
Complementary method to virLogFilterNew. --- src/util/virlog.c | 10 ++ src/util/virlog.h | 1 + 2 files changed, 11 insertions(+) diff --git a/src/util/virlog.c b/src/util/virlog.c index 5da1af7..36fecda 100644 --- a/src/util/virlog.c +++ b/src/util/virlog.c @@ -1620,3 +1620,13 @@

[libvirt] [PATCH 07/38] virlog: Introduce virLogSetOutputs

2016-03-31 Thread Erik Skultety
This API is the entry point to output modification of the logger. Currently, everything is done by virLogParseOutputs which should do parsing only and a separate method which will do the definition part should be added. --- src/libvirt_private.syms | 1 + src/util/virlog.c| 23

[libvirt] [PATCH 21/38] virlog: Split filter parsing and filter defining to separate operations

2016-03-31 Thread Erik Skultety
Everything has been prepared to successfully split parsing and defining logic to separate operations. --- src/libvirt_private.syms | 1 + src/util/virlog.c| 100 +++ src/util/virlog.h| 8 ++-- tests/virlogtest.c | 7 ++-- 4

[libvirt] [PATCH 22/38] virlog: Split parsing and setting priority

2016-03-31 Thread Erik Skultety
Handling of outputs and filters has been changed in a way that splits parsing and defining. Do the same thing for logging priority as well, this however, doesn't need much of a preparation. --- src/util/virlog.c | 21 + tests/eventtest.c | 3 ++- 2 files changed, 11

[libvirt] [PATCH 25/38] virlog: Take a special care of syslog when setting new set of log outputs

2016-03-31 Thread Erik Skultety
Now that we're in the critical section, closelog and openlog need to be issued if the user setting changed, which is something that cannot be done beforehand, since syslog keeps its file descriptor private. --- src/util/virlog.c | 13 + 1 file changed, 13 insertions(+) diff --git

[libvirt] [PATCH 36/38] admin: Introduce virAdmConnectSetLoggingOutputs

2016-03-31 Thread Erik Skultety
Enable libvirt users to modify daemon's logging output settings from outside. --- daemon/admin.c | 10 ++ include/libvirt/libvirt-admin.h | 4 src/admin/admin_protocol.x | 12 +++- src/admin_protocol-structs | 5 + src/libvirt-admin.c

[libvirt] [PATCH 32/38] admin: Introduce virAdmConnectGetLoggingFilters

2016-03-31 Thread Erik Skultety
Enable libvirt users to query logging filter settings. --- daemon/admin.c | 45 + include/libvirt/libvirt-admin.h | 4 src/admin/admin_protocol.x | 16 ++- src/admin/admin_remote.c| 43

[libvirt] [PATCH 16/38] virlog: Introduce virLogOutputListFree

2016-03-31 Thread Erik Skultety
This is just a convenience method for discarding a list of outputs instead of using a 'for' loop everywhere. It is safe to pass -1 as the number of elements in the list as well as passing NULL as list reference. --- src/libvirt_private.syms | 1 + src/util/virlog.c| 20

[libvirt] [PATCH 18/38] virlog: Introduce virLogFilterListFree

2016-03-31 Thread Erik Skultety
This is just a convenience method for discarding a list of filters instead of using a 'for' loop everywhere. It is safe to pass -1 as the number of elements in the list as well as passing NULL as list reference. --- src/util/virlog.c | 20 src/util/virlog.h | 1 + 2 files

[libvirt] [PATCH 20/38] virlog: Split output parsing and output defining to separate operations

2016-03-31 Thread Erik Skultety
Everything has been prepared to successfully split parsing and defining logic to separate operations. --- src/util/virlog.c | 160 + src/util/virlog.h | 15 +++-- tests/testutils.c | 19 ++- tests/virlogtest.c | 5 +- 4 files changed,

[libvirt] [PATCH 12/38] virlog: Rename virLogAddOutputTo to virLogNewOutput

2016-03-31 Thread Erik Skultety
This is merely a cosmetic change to clearly state that we won't be adding a new output to the existing global set of outputs, instead we're always creating a completely new output that needs to be later placed into a list. --- src/util/virlog.c | 16 1 file changed, 8

[libvirt] [PATCH 26/38] virlog: Swap the new copy of outputs with the global existing one

2016-03-31 Thread Erik Skultety
Actually perform the swap between the active set of outputs and the user-provided copy. Deallocation ensures that no file descriptors that should not have been closed are not closed and all descriptors that should be closed are closed properly. --- src/util/virlog.c | 11 +-- 1 file

[libvirt] [PATCH 19/38] virlog: Make virLogReset methods use of virLog(Output|Filter)ListFree

2016-03-31 Thread Erik Skultety
Now that methods to free logging related lists were introduced, put them to a use. --- src/util/virlog.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/util/virlog.c b/src/util/virlog.c index a1f5872..7e0936c 100644 --- a/src/util/virlog.c +++

[libvirt] [PATCH 31/38] admin: Introduce virAdmConnectGetLoggingLevel

2016-03-31 Thread Erik Skultety
Enable libvirt users to query for the current logging level setting. --- daemon/admin.c | 8 include/libvirt/libvirt-admin.h | 1 + src/admin/admin_protocol.x | 15 ++- src/admin_protocol-structs | 7 +++ src/libvirt-admin.c | 33

[libvirt] [PATCH 23/38] virlog: Introduce virLogOutputExists

2016-03-31 Thread Erik Skultety
Outputs are a little bit trickier than filters, because if user wants to change the set of outputs that is currently defined for a different set that may contain outputs that do already exist in the current set, opening a file descriptor for that output would only work for files, but not for

[libvirt] [PATCH 13/38] virlog: Rename virLogDefineOutput to virLogOutputNew

2016-03-31 Thread Erik Skultety
Preparation for the fact, that opposite to the original define method that took an already existing global set of outputs and appended/defined a new output, virLogOutputNew only creates a new output, but caller is responsible for appending the output to a list and managing the list itself. ---

[libvirt] [PATCH 06/38] virlog: Introduce virLogSetFilters

2016-03-31 Thread Erik Skultety
This method will eventually replace the existing virLogParseFilters which currently does both parsing and defining. However, each method should do one thing only, so will the current virLogParseFilters method will be split into parsing and defining, only to be swallowed by the entry-point API

[libvirt] [PATCH 11/38] virlog: Introduce virLogDefineFilters

2016-03-31 Thread Erik Skultety
Prepare a method that only defines a set of filters. It takes a list of filters, preferably created by virLogParseFilters. The original set of filters is reset and replaced by the new user-provided set of filters. --- src/libvirt_private.syms | 1 + src/util/virlog.c| 25

[libvirt] [PATCH 01/38] virlog: Return void instead of int in virLogReset methods

2016-03-31 Thread Erik Skultety
In this particular case, reset is meant as clearing the whole list of outputs/filters, not resetting it to a predefined default setting. Looking at it from that perspective, returning the number of records removed doesn't help the caller in any way (not that any of the callers would actually check

[libvirt] [PATCH 03/38] virlog: Convert virLogFilters to a list of pointers to filters

2016-03-31 Thread Erik Skultety
Same as with outputs; since the operations will be further divided into smaller tasks, creating a filter will become a separate operation that will return a reference to a newly created filter. --- src/util/virlog.c | 41 +++-- 1 file changed, 23 insertions(+),

[libvirt] [PATCH 04/38] virlog: Export virLogOutputPtr through header

2016-03-31 Thread Erik Skultety
It needs to be exported, since some caller might (for some reason) want to create a logging output without calling the parser which does this. Also, some methods will use virLogOutputPtr as data type for one of its arguments. --- src/util/virlog.c | 2 -- src/util/virlog.h | 3 +++ 2 files

[libvirt] [PATCH 09/38] daemon: Replace virLogParseFilters with virLogSetFilters in callers

2016-03-31 Thread Erik Skultety
Similar to outputs, parser should do parsing only, thus the 'define' logic is going to be stripped from virLogParseFilters. Make this change transparent to all callers by using virLogSetFilters which has already been introduced earlier in this series. --- daemon/libvirtd.c | 2 +-

[libvirt] [PATCH 10/38] virlog: Introduce virLogDefineOutputs

2016-03-31 Thread Erik Skultety
Prepare a method that only defines a set of outputs. It takes a list of outputs, preferably created by virLogParseOutputs. The original set of outputs is reset and replaced by the new user-provided set of outputs. --- src/libvirt_private.syms | 1 + src/util/virlog.c| 25

[libvirt] [PATCH 02/38] virlog: Convert virLogOutputs to a list of pointers to outputs

2016-03-31 Thread Erik Skultety
Right now, we define outputs one after another. However, the correct flow should be to define a set of outputs as a whole unit. Therefore each output should be first created, placed into an array/list and the list will be defined. Output creation should be a separate operation, so an output will

[libvirt] [PATCH 00/38] Introduce APIs to change daemon's logging settings

2016-03-31 Thread Erik Skultety
This series implements administration APIs to modify daemon's logging settings which include priority, filters, and outputs. It also performs all necessary changes to enable this feature. Patches also involve some slight refactors to the existing code as well as wiring up the APIs to virt-admin

[libvirt] [PATCH 14/38] virlog: Rename virLogDefineFilter to virLogFilterNew

2016-03-31 Thread Erik Skultety
Same as for outputs, prepare for the fact, that defining is going to be done for the whole set of filters, rather than defining each filter individually. --- src/libvirt_private.syms | 2 +- src/util/virlog.c| 10 +- src/util/virlog.h| 6 +++--- 3 files changed, 9

[libvirt] [PATCH 24/38] virlog: Make use of virLogOutputExists

2016-03-31 Thread Erik Skultety
Start using the method that was introduced and described by commit 29d0068b. --- src/util/virlog.c | 83 ++- 1 file changed, 58 insertions(+), 25 deletions(-) diff --git a/src/util/virlog.c b/src/util/virlog.c index 204372f..62533b1 100644 ---

[libvirt] [PATCH 05/38] virlog: Export virLogFilterPtr through header

2016-03-31 Thread Erik Skultety
As with outputs, some methods declared through a header file need to know the datatype because of their arguments. --- src/util/virlog.c | 2 -- src/util/virlog.h | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/util/virlog.c b/src/util/virlog.c index 0be1701..b893365

[libvirt] [PATCH 08/38] daemon: Replace virLogParseOutputs with virLogSetOutputs in callers

2016-03-31 Thread Erik Skultety
Since virLogParseOutputs is going to be stripped from 'output defining' logic, replace all relevant occurrences with virLogSetOutputs to make the change transparent to all original callers (daemons mostly). --- daemon/libvirtd.c | 6 +++--- src/locking/lock_daemon.c | 6 +++---

Re: [libvirt] [PATCH] migration: convert speed from Mb/sec to bytes/sec in drive-mirror jobs

2016-03-31 Thread Ján Tomko
On Mon, Mar 28, 2016 at 12:02:09PM +0800, Rudy Zhang wrote: > Block migration speed is differect from memory migration speed, because > it not convert speed from Mb/sec to bytes/sec in the drive-mirror job. > It might be worth noting that this was introduced by commit 08cc14f [1], released in

Re: [libvirt] Hello and a question about QEMU log

2016-03-31 Thread Daniel P. Berrange
On Thu, Mar 31, 2016 at 03:07:25PM +0800, zhukaijie wrote: > Hello,Each running VM has it's command line logged in > /var/log/libvirt/qemu/${vmname}.And now I'd like to disable this log > function, that is to say, not to recordthe QEMU command line of VM. > Could you please tell me will can I

[libvirt] Hello and a question about QEMU log

2016-03-31 Thread zhukaijie
Hello,Each running VM has it's command line logged in /var/log/libvirt/qemu/${vmname}.And now I'd like to disable this log function, that is to say, not to recordthe QEMU command line of VM. Could you please tell me will can I configure it? Are there any configure info such as "log level" to

Re: [libvirt] [For 1.3.3 2/2] libxl: fix net device detach

2016-03-31 Thread Jim Fehlig
Daniel P. Berrange wrote: > On Wed, Mar 30, 2016 at 04:36:03PM -0600, Jim Fehlig wrote: >> Chunyan sent a nice cleanup patch for libxlDomainDetachNetDevice >> >> https://www.redhat.com/archives/libvir-list/2016-March/msg00926.html >> >> which I incorrectly modified before pushing as commit

Re: [libvirt] Host device assignment driver name vfio/ kvm

2016-03-31 Thread Moshe Levi
Thanks Laine, Adding the driver_name o the config did the trick, thanks ☺ Regarding the vifo error it seem that openstack does roleback if operation failed so that why you see the virDomainAttachDeviceFlags Anyhow I found that the in qemu 2.1 suspend is not working (I got error [1] ) so I

Re: [libvirt] Host device assignment driver name vfio/ kvm

2016-03-31 Thread Laine Stump
On 03/31/2016 11:58 AM, Moshe Levi wrote: Thanks Laine, Adding the driver_name o the config did the trick, thanks J Regarding the vifo error it seem that openstack does roleback if operation failed so that why you see the virDomainAttachDeviceFlags Anyhow I found that the in qemu 2.1

Re: [libvirt] [PATCH 2/2] qemuProcessVerifyGuestCPU: Avoid coverity false positive

2016-03-31 Thread John Ferlan
On 03/31/2016 11:28 AM, Michal Privoznik wrote: > On 31.03.2016 17:06, Ján Tomko wrote: >> On Thu, Mar 31, 2016 at 04:48:24PM +0200, Michal Privoznik wrote: >>> We use _LAST items in enums to mark the last position in given >>> enum. Now, if and enum is passed to switch(), compiler checks >>>

Re: [libvirt] build: workaround broken SASL header (again)

2016-03-31 Thread Ján Tomko
On Wed, Mar 30, 2016 at 08:52:38AM +0200, Fabiano Fidêncio wrote: > Compilation for xdg-app failed due to a buggy SASL headers present on > the used runtime (org.gnome.Sdk 3.18). > > In file included from rpc/virnetsaslcontext.h:24:0, > from rpc/virnetsaslcontext.c:25: >

Re: [libvirt] [PATCH 2/2] qemuProcessVerifyGuestCPU: Avoid coverity false positive

2016-03-31 Thread Michal Privoznik
On 31.03.2016 17:06, Ján Tomko wrote: > On Thu, Mar 31, 2016 at 04:48:24PM +0200, Michal Privoznik wrote: >> We use _LAST items in enums to mark the last position in given >> enum. Now, if and enum is passed to switch(), compiler checks >> that all the values from enum occur in 'case' enumeration.

[libvirt] [PATCH v2] host-validate: Improve CPU flags processing

2016-03-31 Thread Andrea Bolognani
Instead of relying on substring search, tokenize the input and process each CPU flag separately. This ensures CPU flag detection will continue to work correctly even if we start looking for CPU flags whose name might appear as part of other CPU flags' names. The result of processing is stored in

Re: [libvirt] [For 1.3.3 2/2] libxl: fix net device detach

2016-03-31 Thread Daniel P. Berrange
On Wed, Mar 30, 2016 at 04:36:03PM -0600, Jim Fehlig wrote: > Chunyan sent a nice cleanup patch for libxlDomainDetachNetDevice > > https://www.redhat.com/archives/libvir-list/2016-March/msg00926.html > > which I incorrectly modified before pushing as commit b5534e53. My > modification caused

Re: [libvirt] [For 1.3.3 1/2] libxl: fix attaching net device of type hostdev

2016-03-31 Thread Daniel P. Berrange
On Wed, Mar 30, 2016 at 04:36:02PM -0600, Jim Fehlig wrote: > Chunyan sent a correct patch to fix a resource leak on error in > libxlDomainAttachNetDevice > > https://www.redhat.com/archives/libvir-list/2016-March/msg00924.html > > I made what was thought to be an improvement and pushed the

Re: [libvirt] [PATCH] spec: fix trigger already defined issue on systems without systemd

2016-03-31 Thread Jean-Marc Liger
Le 29/03/2016 16:48, Jean-Marc Liger a écrit : Le 11/03/2016 15:18, Jean-Marc LIGER a écrit : There is a trigger already defined issue when you try to rebuild libvirt >= 1.3.0 for el6 with copr and most probably koji. Regards, Jean-Marc I've modified my patch after the nss update, someone

Re: [libvirt] [PATCH 2/2] qemuProcessVerifyGuestCPU: Avoid coverity false positive

2016-03-31 Thread Ján Tomko
On Thu, Mar 31, 2016 at 04:48:24PM +0200, Michal Privoznik wrote: > We use _LAST items in enums to mark the last position in given > enum. Now, if and enum is passed to switch(), compiler checks > that all the values from enum occur in 'case' enumeration. > Including _LAST. But coverity spots it's

[libvirt] [PATCH] util: Create virsecret module adding virSecretGetSecretString

2016-03-31 Thread John Ferlan
Commit id 'fb2bd208' essentially copied the qemuGetSecretString creating an libxlGetSecretString. Rather than have multiple copies of the same code, create virsecret.{c,h} files and place the common function in there. Usage is from both qemu_command.c and libxl_conf.c Signed-off-by: John Ferlan

[libvirt] [PATCH] Link xen driver against libxl

2016-03-31 Thread Guido Günther
to avoid the test failure 7) Test driver "xen" ... 2016-03-31 12:53:26.950+: 22430: debug : virDriverLoadModule:54 : Module load xen 2016-03-31 12:53:26.950+: 22430: error : virDriverLoadModule:73 : failed to load module

Re: [libvirt] [PATCH 1/2] virPerfReadEvent: Prefer saferead over read

2016-03-31 Thread Ján Tomko
On Thu, Mar 31, 2016 at 04:48:23PM +0200, Michal Privoznik wrote: > Do I really need to explain why? Do you really need to ask? > Well, if read() is interrupted int the middle of reading, we will > never read the rest (even though it's highly unlikely as we are > reading just 8 bytes). > >

[libvirt] [PATCH] apparmor: QEMU monitor socket moved

2016-03-31 Thread Guido Günther
The directory name changed in a89f05ba8df095875f5ec8a9065a585af63a010b. --- src/security/virt-aa-helper.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index a2d7226..0ded671 100644 --- a/src/security/virt-aa-helper.c +++

[libvirt] [PATCH 2/2] qemuProcessVerifyGuestCPU: Avoid coverity false positive

2016-03-31 Thread Michal Privoznik
We use _LAST items in enums to mark the last position in given enum. Now, if and enum is passed to switch(), compiler checks that all the values from enum occur in 'case' enumeration. Including _LAST. But coverity spots it's a dead code. And it really is. So to resolve this, we tend to put a

[libvirt] [PATCH] qemu: perf: Tweak flags before using them

2016-03-31 Thread Peter Krempa
@flags have a valid modification impact only after calling virDomainObjUpdateModificationImpact. virDomainObjGetOneDef calls it but doesn't update them in the caller. --- CC: mpriv...@redhat.com src/qemu/qemu_driver.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/qemu/qemu_driver.c

[libvirt] [PATCH 1/2] virPerfReadEvent: Prefer saferead over read

2016-03-31 Thread Michal Privoznik
Do I really need to explain why? Well, if read() is interrupted int the middle of reading, we will never read the rest (even though it's highly unlikely as we are reading just 8 bytes). Signed-off-by: Michal Privoznik --- src/util/virperf.c | 2 +- 1 file changed, 1

[libvirt] [PATCH 0/2] Couple of Coverity fixes

2016-03-31 Thread Michal Privoznik
*** SOME BLURB HERE *** Michal Privoznik (2): virPerfReadEvent: Prefer saferead over read qemuProcessVerifyGuestCPU: Avoid coverity false positive src/qemu/qemu_process.c | 2 ++ src/util/virperf.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) -- 2.7.3 -- libvir-list

Re: [libvirt] [PATCH 0/7] docs: Some website tweaks

2016-03-31 Thread Andrea Bolognani
On Thu, 2016-03-31 at 07:25 -0400, John Ferlan wrote: > On 03/30/2016 10:19 AM, Andrea Bolognani wrote: > >  > > Basically, the navigation menu is *way* too big, and takes > > the focus away from the actual content. Plus it's very easy > > for longish words to overflow it (see "Authentication" in

[libvirt] [PATCH 2/2] conf: store bootindex as unsigned int

2016-03-31 Thread Peter Krempa
The value is never negative thus there's no need to store it in a signed type. --- src/bhyve/bhyve_command.c | 3 +-- src/conf/domain_conf.c| 15 +++ src/conf/domain_conf.h| 2 +- src/qemu/qemu_command.c | 40 +---

[libvirt] [PATCH 1/2] conf: Pass the whole device info struct to virDomainDeviceBootParseXML

2016-03-31 Thread Peter Krempa
No need to extract the single element. --- src/conf/domain_conf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index d4c78fd..3dd8119 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -4816,7 +4816,7 @@

Re: [libvirt] [PATCH 1/1] python: add python binding for Perf API

2016-03-31 Thread Michal Privoznik
On 31.03.2016 08:16, Michal Privoznik wrote: > On 30.03.2016 04:13, Qiaowei Ren wrote: >> This patch adds the python binding for virDomainSetPerfEvents and >> virDomainSetPerfEvents API. >> >> Signed-off-by: Qiaowei Ren >> --- >> generator.py | 2 ++ >>

[libvirt] [PATCH 0/2] boot order storage/parsing cleanup

2016-03-31 Thread Peter Krempa
Few patches that I have laying around. Peter Krempa (2): conf: Pass the whole device info struct to virDomainDeviceBootParseXML conf: store bootindex as unsigned int src/bhyve/bhyve_command.c | 3 +-- src/conf/domain_conf.c| 19 +-- src/conf/domain_conf.h| 2 +-

[libvirt] [PATCH] virsh: support up to 64 migration options for command

2016-03-31 Thread Nikolay Shirokovskiy
Upcoming compression options for migration command patch series hits current limit of 32 possible options for a command. Lets take one step further and support 64 possible options. And all it takes is moving from 32 bit integers to 64 bit ones. The only less then trivial change i found is moving

Re: [libvirt] [PATCH 3/3] qemu: Generate channel target paths on hotplug as well

2016-03-31 Thread John Ferlan
On 03/30/2016 11:14 AM, Martin Kletzander wrote: > Since commit 714080791778e3dfbd484ccb3953bffd820b8ba9, qemu agent > channel cannot be plugged in because we won't generate its path > automatically. Let's not only fix that, but also add tests for it so > next time it's checked for. > Save

Re: [libvirt] [PATCH 2/3] qemu: Move channel path generation out of command creation

2016-03-31 Thread John Ferlan
On 03/30/2016 11:14 AM, Martin Kletzander wrote: > Put it into separate function called qemuDomainPrepareChannel() and call > it from the new qemuProcessPrepareDomain(). > > Signed-off-by: Martin Kletzander > --- > src/qemu/qemu_command.c | 25 +++-- >

Re: [libvirt] [PATCH 1/3] qemuhotplugtest: Allow testing of live data

2016-03-31 Thread John Ferlan
On 03/30/2016 11:13 AM, Martin Kletzander wrote: > For now, the test was dumping an XML of inactive domain (well, setting > the id to '-1' to be precise) when checking the results. This patch > enables future additions to test the live XML output as well. > > Signed-off-by: Martin Kletzander

[libvirt] [PATCH] remote: Add flags to remote_protocol-structs

2016-03-31 Thread Martin Kletzander
Caused by 3b6c8185328f. Signed-off-by: Martin Kletzander --- Pushed under the 'build-breaker' rule. src/remote_protocol-structs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/remote_protocol-structs b/src/remote_protocol-structs index 1257aac51dfb..652ab116

Re: [libvirt] [PATCH 0/7] docs: Some website tweaks

2016-03-31 Thread John Ferlan
On 03/30/2016 10:19 AM, Andrea Bolognani wrote: > Basically, the navigation menu is *way* too big, and takes > the focus away from the actual content. Plus it's very easy > for longish words to overflow it (see "Authentication" in > the screenshots below). > > The headers are probably bigger

Re: [libvirt] libvirt python binding and strange errors in logs

2016-03-31 Thread Vasiliy Tolstov
2016-03-31 11:37 GMT+03:00 Vasiliy Tolstov : > > > As i understand libvirt try to determine client alive and fails, my > code properly close libvirt connection, but may be it not freed? Or > something else broken with my code? > > i'm use libvirt-python from 1.2.1 to 1.2.9 and

Re: [libvirt] netdev ethernet allow to specify ip address and routes

2016-03-31 Thread Vasiliy Tolstov
2016-03-23 20:46 GMT+03:00 Laine Stump : > Since there is no documentation included with the patch, and the wrong RNG > file has been modified, I'm not clear on exactly why a libvirt virtual > network would use a peer address. > > Normally libvirt networks are made by creating a

[libvirt] [PATCH] allow ip and route elements for netdev ethernet

2016-03-31 Thread Vasiliy Tolstov
Allow to use ip address and routes elements inside network ethernet. Also allow to configure point-to-point address for host side device. Signed-off-by: Vasiliy Tolstov --- docs/formatdomain.html.in| 12 - docs/schemas/network.rng | 3 +++

[libvirt] [PATCH] allow ip and route elements for netdev ethernet

2016-03-31 Thread Vasiliy Tolstov
This is next part of network type ethernet patches, that adds ability to assign ip address and routes to tap devices for qemu driver like done before for lxc. Vasiliy Tolstov (1): allow ip and route elements for netdev ethernet docs/formatdomain.html.in| 12 -

Re: [libvirt] [RFC 1/6] conf: Get rid of virDomainCapsDevice

2016-03-31 Thread Andrea Bolognani
On Wed, 2016-03-30 at 13:19 -0400, John Ferlan wrote: > On 03/21/2016 01:28 PM, Andrea Bolognani wrote: > >  > > The struct contains a single boolean field which can be > > applied to domain capabilities that do not represent device > > availability. > >  > > Instead of trying to come up with a

[libvirt] [PATCH] virDomain{Get, Set}PerfEvents: Tweak documentation

2016-03-31 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/libvirt-domain.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 3e144b6..4f473c9 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@

Re: [libvirt] [PATCH v4 2/5] qemu monitor: add multithread compress parameters accessors

2016-03-31 Thread Jiri Denemark
On Wed, Mar 23, 2016 at 15:34:07 +0300, Nikolay Shirokovskiy wrote: > >> +typedef struct _qemuMonitorMigrationParameters > >> qemuMonitorMigrationParameters; > >> +typedef qemuMonitorMigrationParameters *qemuMonitorMigrationParametersPtr; > >> +struct _qemuMonitorMigrationParameters { > >> +

[libvirt] libvirt python binding and strange errors in logs

2016-03-31 Thread Vasiliy Tolstov
I'm use libvirt-python binding to export some metrics to ganglia from libvirt. python code http://paste.debian.net/422944/ when this script is running i get many erros in libvirtd.log like this: error : virNetSocketReadWire:1613 : End of file while reading data: Input/output error При этом

Re: [libvirt] [PATCH] host-validate: Improve CPU flags processing

2016-03-31 Thread Peter Krempa
On Wed, Mar 30, 2016 at 18:35:04 +0200, Andrea Bolognani wrote: > On Wed, 2016-03-30 at 09:28 +0200, Andrea Bolognani wrote: > > On Wed, 2016-03-30 at 08:36 +0200, Peter Krempa wrote: > > >  > > > Since you are already using libvirt's utils ... > > [...] > > >  > > > Why not virStringSplit ... > >

Re: [libvirt] [PATCH v4 1/5] migration: add compress method option

2016-03-31 Thread Nikolay Shirokovskiy
On 31.03.2016 09:53, Jiri Denemark wrote: > On Thu, Mar 24, 2016 at 11:08:31 +0300, Nikolay Shirokovskiy wrote: >>> The backward compatibility code will be limited to Parse/Dump parameters >>> and the rest of the code will just see a nice struct of compression >>> parameters without having to

Re: [libvirt] [PATCH 0/6] Couple of perf events APIs fixes

2016-03-31 Thread Peter Krempa
On Thu, Mar 31, 2016 at 07:28:55 +0200, Michal Privoznik wrote: > I really like to see these in before release and thus APIs get > written in the stone. > > One note though regarding the last patch: while writing it I've > noticed couple of other getter APIs don't grab any job at all. I > think

Re: [libvirt] [PATCH 2/6] virDomain{Get, Set}PerfEvents: Add @flags argument

2016-03-31 Thread Peter Krempa
On Thu, Mar 31, 2016 at 07:28:57 +0200, Michal Privoznik wrote: > I've noticed that these APIs are missing @flags argument. Even > though we don't have a use for them, it's our policy that every > new API must have @flags. > > Signed-off-by: Michal Privoznik > --- >

Re: [libvirt] [PATCH 6/6] virDomain{Get,Set}PerfEvents: Grab job

2016-03-31 Thread Peter Krempa
On Thu, Mar 31, 2016 at 07:29:01 +0200, Michal Privoznik wrote: > Even though we have the machine locked throughout whole APIs we > are querying/modifying domain internal state. We should grab a > job whilst doing that. > > Signed-off-by: Michal Privoznik > --- >

Re: [libvirt] [PATCH 5/6] virDomain{Get, Set}PerfEvents: support --config --live --current

2016-03-31 Thread Peter Krempa
On Thu, Mar 31, 2016 at 07:29:00 +0200, Michal Privoznik wrote: > Now that we have @flags we can support changing perf events just > in active or inactive configuration regardless of the other. > Previously, calling virDomainSetPerfEvents set events in both > active and inactive configuration at

Re: [libvirt] [PATCH 4/6] virsh: Make perf accept event list separated by commas

2016-03-31 Thread Peter Krempa
On Thu, Mar 31, 2016 at 07:28:59 +0200, Michal Privoznik wrote: > Everywhere else we use a comma separated list. There's no good > reason to make 'perf' command an exception. Currently, it accepts > string list separated by '|'. > > Signed-off-by: Michal Privoznik > --- >

Re: [libvirt] [PATCH 1/6] remoteDomainGetPerfEvents: Re-indent

2016-03-31 Thread Peter Krempa
On Thu, Mar 31, 2016 at 07:28:56 +0200, Michal Privoznik wrote: > There are few lines off the indentation. > > Signed-off-by: Michal Privoznik > --- > src/remote/remote_driver.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) ACK signature.asc

Re: [libvirt] [PATCH 3/6] virsh: Prefer VIRSH_COMMON_OPT_DOMAIN_FULL over full enumeration

2016-03-31 Thread Peter Krempa
On Thu, Mar 31, 2016 at 07:28:58 +0200, Michal Privoznik wrote: > We have a macro that does exactly what is done via full > enumeration. > > Signed-off-by: Michal Privoznik > --- > tools/virsh-domain.c | 6 +- > 1 file changed, 1 insertion(+), 5 deletions(-) I don't

Re: [libvirt] [PATCH v4 1/5] migration: add compress method option

2016-03-31 Thread Jiri Denemark
On Thu, Mar 24, 2016 at 11:08:31 +0300, Nikolay Shirokovskiy wrote: > > The backward compatibility code will be limited to Parse/Dump parameters > > and the rest of the code will just see a nice struct of compression > > parameters without having to worry about how it was called. And dealing > >

  1   2   >