[libvirt] [PATCH 1/3] examples: Work around mingw printf() weakness

2019-01-08 Thread Eric Blake
mingw lacks %lld and %zu support in printf(); we were getting it from gnulib. But since commit acf522e8 stopped linking examples against gnulib, we are getting a build failure due to -Wformat flagging these strings. Keep the examples standalone, and work around mingw by using manual casts to types

[libvirt] [PATCH 3/3] examples: Work around lack of mingw localtime_r()

2019-01-08 Thread Eric Blake
mingw lacks localtime_r(); we were getting it from gnulib. But since commit acf522e8 stopped linking examples against gnulib, we are getting a build failure. Keep the examples standalone, and work around mingw by using the non-reentrant localtime() (safe since our examples are single-threaded),

[libvirt] [PATCH 0/3] Fix examples/ under mingw

2019-01-08 Thread Eric Blake
My recent patch to make all of the examples work independently of gnulib worked fine on Linux, but failed on mingw: https://travis-ci.org/libvirt/libvirt/jobs/476898635 The whole point of gnulib is to work around portability pitfalls so we don't have to bend over backwards thinking about it in

[libvirt] [PATCH 2/3] examples: Work around lack of mingw sigaction()

2019-01-08 Thread Eric Blake
mingw lacks sigaction(); we were getting it from gnulib. But since commit acf522e8 stopped linking examples against gnulib, we are getting a build failure. Keep the examples standalone, and work around mingw by using signal() instead. Signed-off-by: Eric Blake --- examples/domtop/domtop.c

Re: [libvirt] [PATCH 0/3] Fix examples/ under mingw

2019-01-08 Thread John Ferlan
On 1/8/19 2:56 PM, Eric Blake wrote: > My recent patch to make all of the examples work independently of > gnulib worked fine on Linux, but failed on mingw: > https://travis-ci.org/libvirt/libvirt/jobs/476898635 > > The whole point of gnulib is to work around portability pitfalls so > we don't

[libvirt] [PATCH 1/2] src: Fix a few unmarked_diagnostics issues

2019-01-08 Thread Andrea Bolognani
These were not caught by our current regular expressions but will be caught by the improved ones we're about to introduce, so fix them ahead of time. Signed-off-by: Andrea Bolognani --- src/libxl/libxl_driver.c | 8 src/openvz/openvz_driver.c| 4 ++-- src/qemu/qemu_agent.c

[libvirt] [PATCH 0/2] syntax-check: Fix unmarked_diagnostics on FreeBSD

2019-01-08 Thread Andrea Bolognani
... and fix some issues in the process. Andrea Bolognani (2): src: Fix a few unmarked_diagnostics issues syntax-check: Simplify and fix unmarked_diagnostics cfg.mk| 4 ++-- src/libxl/libxl_driver.c | 8 src/openvz/openvz_driver.c| 4 ++--

[libvirt] [PATCH 2/2] syntax-check: Simplify and fix unmarked_diagnostics

2019-01-08 Thread Andrea Bolognani
The check was concerning itself with whitespace where it didn't need to, and used some confusing escaping for one of its regular expressions - which GNU sed was fine with, but FreeBSD's sed didn't like one bit. Switch to extended regular expressions (which, incidentally, were already in use in

Re: [libvirt] [dbus PATCH] util: fix virtDBusUtilDecodeUUID

2019-01-08 Thread Michal Privoznik
On 1/8/19 9:01 AM, Pavel Hrdina wrote: > This function is supposed to convert ASCII character into its hex > representation, however the current implementation was wrong because > the first comparison would be false for all printable characters. In > most cases it worked but for example '$' which

Re: [libvirt] [PATCH v2 0/2] Makefile.am cleanups

2019-01-08 Thread Michal Privoznik
On 1/8/19 6:58 AM, Eric Blake wrote: > Since v1: > - push patch 1, 2 that had successful reviews > - new patch 1 > - rewrite old patch 3 to remove all use of gnulib from examples/, > rather than being partitioned based on what uses config.h (in part > by reverting Jan's recent patch that added

Re: [libvirt] [PATCH v2 0/2] Makefile.am cleanups

2019-01-08 Thread Ján Tomko
On Mon, Jan 07, 2019 at 11:58:40PM -0600, Eric Blake wrote: Since v1: - push patch 1, 2 that had successful reviews - new patch 1 - rewrite old patch 3 to remove all use of gnulib from examples/, rather than being partitioned based on what uses config.h (in part by reverting Jan's recent patch

[libvirt] [dbus PATCH] util: fix virtDBusUtilDecodeUUID

2019-01-08 Thread Pavel Hrdina
This function is supposed to convert ASCII character into its hex representation, however the current implementation was wrong because the first comparison would be false for all printable characters. In most cases it worked but for example '$' which is 0x24 in HEX would be incorrectly converted

Re: [libvirt] [PATCH 0/2] syntax-check: Fix unmarked_diagnostics on FreeBSD

2019-01-08 Thread Eric Blake
On 1/8/19 9:06 AM, Andrea Bolognani wrote: > ... and fix some issues in the process. > > Andrea Bolognani (2): > src: Fix a few unmarked_diagnostics issues > syntax-check: Simplify and fix unmarked_diagnostics Reviewed-by: Eric Blake > > cfg.mk| 4 ++-- >

Re: [libvirt] [PATCH 21/27] network: add public APIs for network port object

2019-01-08 Thread Michal Privoznik
On 12/24/18 3:59 PM, Daniel P. Berrangé wrote: > Introduce a new virNetworPort object that will present an attachment to > a virtual network from a VM. > > Signed-off-by: Daniel P. Berrangé > --- > include/libvirt/libvirt-network.h | 49 + > include/libvirt/virterror.h | 3 + >

Re: [libvirt] [PATCH 09/27] conf: introduce virNetworkPortDefPtr struct and XML support

2019-01-08 Thread Michal Privoznik
On 12/24/18 3:58 PM, Daniel P. Berrangé wrote: > Introduce a virNetworkPortDefPtr struct to represent the data associated > with a virtual network port. Add APIs for parsing/formatting XML docs > with the data. > > Signed-off-by: Daniel P. Berrangé > --- > src/conf/Makefile.inc.am

Re: [libvirt] [PATCH 24/27] virsh: add support for network port APIs

2019-01-08 Thread Michal Privoznik
On 12/24/18 3:59 PM, Daniel P. Berrangé wrote: > Signed-off-by: Daniel P. Berrangé > --- > tools/virsh-completer.c | 51 + > tools/virsh-completer.h | 4 + > tools/virsh-network.c | 399 +++- > tools/virsh-network.h | 5 + > 4 files changed, 458

Re: [libvirt] [PATCH 05/27] network: add missing bandwidth limits for bridge forward type

2019-01-08 Thread Michal Privoznik
On 12/24/18 3:58 PM, Daniel P. Berrangé wrote: > In the case of a network with forward=bridge, which has a bridge device > listed, we are capable of setting bandwidth limits but fail to call the > function to register them. > > Signed-off-by: Daniel P. Berrangé > --- >

Re: [libvirt] [PATCH 00/27] network: refactor to decouple virt drivers from network driver

2019-01-08 Thread Michal Privoznik
On 12/24/18 3:58 PM, Daniel P. Berrangé wrote: > Currently the network driver registers a set of callbacks with the virt > driver in order to handle allocating/releasing network ports associated > with guest NICs. > > This series introduces a virNetworkPortPtr object and associated XML > that

Re: [libvirt] [PATCH 02/27] network: restrict usage of port management APIs

2019-01-08 Thread Michal Privoznik
On 12/24/18 3:58 PM, Daniel P. Berrangé wrote: > The port allocation APIs are currently called unconditionally for all > types of NIC, but (mostly) only do anything for NICs with type=network. > > The exception is the port allocate API which does some validation even > for NICs with

Re: [libvirt] [PATCH 09/27] conf: introduce virNetworkPortDefPtr struct and XML support

2019-01-08 Thread Michal Privoznik
On 12/24/18 3:58 PM, Daniel P. Berrangé wrote: > Introduce a virNetworkPortDefPtr struct to represent the data associated > with a virtual network port. Add APIs for parsing/formatting XML docs > with the data. > > Signed-off-by: Daniel P. Berrangé > --- > src/conf/Makefile.inc.am

Re: [libvirt] [PATCH v2 2/2] examples: Avoid gnulib, have standalone examples

2019-01-08 Thread Eric Blake
On 1/7/19 11:58 PM, Eric Blake wrote: > Commit 0c6ad476 updated gnulib, which rearranged some of the > conditions in gnulib wrapper headers such that compilation > started failing on BSD systems when the normal system > tried to include another system header but instead got a > gnulib wrapper

[libvirt] [PATCH v2 4/6] storage: Add NFS storage pool mount options to command line

2019-01-08 Thread John Ferlan
If the NetFS Storage Pool Namespace XML data exists, format the mount options on the MOUNT command line. When the pool is started, the options will be generated on the command line along with the exportfs options already defined. To view the options of the running pool, use either 'nfsstat -m' or

[libvirt] [PATCH v2 2/6] nfs: Add infrastructure to manage XML namespace options

2019-01-08 Thread John Ferlan
Introduce the virStoragePoolNetFSMountOptionsDef to be used to manage the NFS Storage Pool XML Namespace for mount options. Using a new virStorageBackendNamespaceInit function, set the virStoragePoolXMLNamespace into the _virStoragePoolOptions when the storage backend is loaded. Signed-off-by:

[libvirt] [PATCH v2 6/6] rbd: Utilize storage pool namespace to manage config options

2019-01-08 Thread John Ferlan
Allow for adjustment of RBD configuration options via Storage Pool XML Namespace adjustments. Based off original patch/concept: https://www.redhat.com/archives/libvir-list/2014-May/msg00940.html Signed-off-by: John Ferlan --- docs/formatstorage.html.in| 45 +

[libvirt] [PATCH v2 5/6] virsh: Add source-mount-opts for pool commands

2019-01-08 Thread John Ferlan
Add the ability to add the mount options for the pool on the virsh command line for pool-{create|define}-as commands, such as. virsh pool-define-as nfstest netfs \ --source-host localhost \ --source-path "/var/lib/libvirt/images" \ --source-format nfs \

[libvirt] [PATCH v2 3/6] docs, tests: Add schema, description, and tests for NFS namespace

2019-01-08 Thread John Ferlan
Modify the storagepool.rng to allow for the usage of a different XML namespace to parse the netfs_mount_opts to be included with the storage source. Modify the storagepoolxml2xmltest to utilize a properly modified XML file to parse and format the namespace for a netfs storage pool.

[libvirt] [PATCH v2 1/6] conf: Introduce virStoragePoolXMLNamespace

2019-01-08 Thread John Ferlan
Introduce the infrastructure necessary to manage a Storage Pool XML Namespace. The general concept is similar to virDomainXMLNamespace, except that for Storage Pools the storage backend specific details can be stored within the _virStoragePoolOptions unlike the domain processing code which manages

[libvirt] [PATCH v2 0/6] Allow adding mountOpts to the storage pool mount command

2019-01-08 Thread John Ferlan
v1: https://www.redhat.com/archives/libvir-list/2018-December/msg00558.html Kept the subject the same, but the concept has been adjusted to follow issues pointed out by jtomko vis-a-vis allowing arbitrary options via XML. This series adds both the NFS and the RBD adjustments that were essentially

Re: [libvirt] [PATCH 0/2] syntax-check: Fix unmarked_diagnostics on FreeBSD

2019-01-08 Thread Ján Tomko
On Tue, Jan 08, 2019 at 04:06:01PM +0100, Andrea Bolognani wrote: ... and fix some issues in the process. Andrea Bolognani (2): src: Fix a few unmarked_diagnostics issues syntax-check: Simplify and fix unmarked_diagnostics cfg.mk| 4 ++-- src/libxl/libxl_driver.c

Re: [libvirt] [PATCH v3 RESEND] qemu: Process RDMA GID state change event

2019-01-08 Thread Yuval Shaia
ping... Yuval On Mon, Dec 24, 2018 at 12:15:12PM +0200, Yuval Shaia wrote: > This event is emitted on the monitor when a GID table in pvrdma device > is modified and the change needs to be propagate to the backend RDMA > device's GID table. > > The control over the RDMA device's GID table is

Re: [libvirt] [PATCH RFC 41/51] qemu: monitor: Add support for 'job-dismiss' command

2019-01-08 Thread Ján Tomko
On Wed, Dec 12, 2018 at 06:08:57PM +0100, Peter Krempa wrote: This belongs to the new job management API which can manage also non-block based jobs. The dismiss command is meant to remove a concluded job after we were able to get the final status. Signed-off-by: Peter Krempa ---

Re: [libvirt] [PATCH RFC 42/51] qemu: monitor: Add support for 'job-cancel' command

2019-01-08 Thread Ján Tomko
On Wed, Dec 12, 2018 at 06:08:58PM +0100, Peter Krempa wrote: This belongs to the new job management API which can manage also non-block based jobs. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 12 src/qemu/qemu_monitor.h | 4

Re: [libvirt] [PATCH RFC 43/51] qemu: monitor: Add support for 'job-complete' command

2019-01-08 Thread Ján Tomko
On Wed, Dec 12, 2018 at 06:08:59PM +0100, Peter Krempa wrote: This belongs to the new job management API which can manage also non-block based jobs. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 12 src/qemu/qemu_monitor.h | 4

Re: [libvirt] [PATCH RFC 44/51] qemu: monitor: Add infrastructure for 'query-jobs'

2019-01-08 Thread Ján Tomko
On Wed, Dec 12, 2018 at 06:09:00PM +0100, Peter Krempa wrote: Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 23 + src/qemu/qemu_monitor.h | 49 ++ src/qemu/qemu_monitor_json.c | 86 ++

Re: [libvirt] [PATCH RFC 45/51] qemu: blockjob: Add 'concluded' state for a block job

2019-01-08 Thread Ján Tomko
On Wed, Dec 12, 2018 at 06:09:01PM +0100, Peter Krempa wrote: This new state is entered when qemu finished the job but libvirt does not know whether it was successful or not. Signed-off-by: Peter Krempa --- src/qemu/qemu_blockjob.c | 2 +- src/qemu/qemu_blockjob.h | 2 ++ 2 files changed, 3

Re: [libvirt] [PATCH RFC 46/51] qemu: monitor: Implement support for 'JOB_STATUS_CHANGE' event

2019-01-08 Thread Ján Tomko
On Wed, Dec 12, 2018 at 06:09:02PM +0100, Peter Krempa wrote: This new event is a superset of the BLOCK_JOB* events and also covers jobs which don't bind to a VM disk. In this patch the monitor part is implemented. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 13

Re: [libvirt] [PATCH RFC 47/51] qemu: process: Don't trigger BLOCK_JOB* events with -blockdev

2019-01-08 Thread Ján Tomko
On Wed, Dec 12, 2018 at 06:09:03PM +0100, Peter Krempa wrote: With blockdev we'll need to use the JOB_STATUS_CHANGE so gate the old events by the blockdev capability. Signed-off-by: Peter Krempa --- src/qemu/qemu_process.c | 7 +++ 1 file changed, 7 insertions(+) Reviewed-by: Ján Tomko

Re: [libvirt] [PATCH RFC 48/51] qemu: blockjob: Add helper to convert monitor job status to internal state

2019-01-08 Thread Ján Tomko
On Wed, Dec 12, 2018 at 06:09:04PM +0100, Peter Krempa wrote: Signed-off-by: Peter Krempa --- src/qemu/qemu_blockjob.c | 41 src/qemu/qemu_blockjob.h | 3 +++ 2 files changed, 44 insertions(+) diff --git a/src/qemu/qemu_blockjob.c

Re: [libvirt] [PATCH RFC 49/51] qemu: Add handler for job state change event

2019-01-08 Thread Ján Tomko
On Wed, Dec 12, 2018 at 06:09:05PM +0100, Peter Krempa wrote: Add support for handling the event either synchronously or asynchronously using the event thread. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 3 ++ src/qemu/qemu_domain.h | 1 + src/qemu/qemu_driver.c | 23

Re: [libvirt] [PATCH RFC 51/51] qemu: process: Refresh -blockdev based blockjobs on reconnect to qemu

2019-01-08 Thread Ján Tomko
On Wed, Dec 12, 2018 at 06:09:07PM +0100, Peter Krempa wrote: Refresh the state of the jobs and process any events that might have happened while libvirt was not running. The job state processing requires some care to figure out if a job needs to be bumped.t d/t/ Signed-off-by: Peter