Re: [libvirt] [PATCH 02/17] qemu: Introduce qemuDomainDeviceDefSkipController

2017-12-05 Thread John Ferlan
On 12/05/2017 09:18 AM, Ján Tomko wrote: > On Mon, Dec 04, 2017 at 08:38:52PM -0500, John Ferlan wrote: >> In order to be able to reuse some code for both controller def >> validation and command line building, create a convenience helper >> that will perform the "skip" avoidance checks. It will

[libvirt] [libvirt-php PATCH] Fix crash in VIRT_HASH_CURRENT_KEY_INFO macro

2017-12-05 Thread Dawid Zamirski
The PHP7 variant of the macro wasn't safe if the hash key was not a string type. This was found when running php script with just libvirt_connect call under xdebug session which segfaulted. This patch makes the following changes: * make sure that tmp_name is initialized to NULL * set the key name

Re: [libvirt] [PATCH] nwfilter: don't crash listing filters in unprivileged daemon

2017-12-05 Thread John Ferlan
On 12/05/2017 11:41 AM, Daniel P. Berrange wrote: > The unprivileged libvirtd does not support nwfilter config, by leaves the > driver active. It is supposed to result in all APIs being an effective > no-op, but several APIs rely on driver->nwfilters being non-NULL, or they > will reference a

Re: [libvirt] [sandbox 6/6] Don't hardcode interpreter path

2017-12-05 Thread Daniel P. Berrange
On Tue, Dec 05, 2017 at 10:53:22AM +0100, Cédric Bosdonnat wrote: > This is particularly useful on operating systems that don't ship > Python as part of the base system (eg. FreeBSD) while still working > just as well as it did before on Linux. > --- > bin/virt-sandbox-image

Re: [libvirt] [sandbox 5/6] Convert to python3

2017-12-05 Thread Daniel P. Berrange
On Tue, Dec 05, 2017 at 10:53:21AM +0100, Cédric Bosdonnat wrote: > Python2 is going to die soon, convert to python3. I'm unclear whether this change drops py2 support, or whether it makes it work with py2+3 in parallel. The commit message suggests py3 only, but then this: > @@ -418,6 +416,18

Re: [libvirt] [sandbox 4/6] service: fix bad ConfigMountHostImage constructor call

2017-12-05 Thread Daniel P. Berrange
On Tue, Dec 05, 2017 at 10:53:20AM +0100, Cédric Bosdonnat wrote: > Since commit 68406aff8 ConfigMountHostImage needs a format parameter, > virt-sandbox-service needs to fit the new API. > --- > bin/virt-sandbox-service | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) Reviewed-by:

Re: [libvirt] [sandbox 3/6] Add tests .log and .trs files to gitignore

2017-12-05 Thread Daniel P. Berrange
On Tue, Dec 05, 2017 at 10:53:19AM +0100, Cédric Bosdonnat wrote: > --- > .gitignore | 2 ++ > 1 file changed, 2 insertions(+) Reviewed-by: Daniel P. Berrange Regards, Daniel -- |: https://berrange.com -o-https://www.flickr.com/photos/dberrange :| |:

Re: [libvirt] [sandbox 2/6] machine: use squash security mode for non-root virt-sandbox mounts

2017-12-05 Thread Daniel P. Berrange
On Tue, Dec 05, 2017 at 10:53:18AM +0100, Cédric Bosdonnat wrote: > When running virt-sandbox as a user with host-bind mount, the user > can't write in the mounted folder. If run as root, use passthrough > security mode, otherwise use squashed one to fix this. > --- >

Re: [libvirt] [sandbox 1/6] Pass debug and verbose values to init

2017-12-05 Thread Daniel P. Berrange
On Tue, Dec 05, 2017 at 10:53:17AM +0100, Cédric Bosdonnat wrote: > libvirt-sandbox-init-common is expecting -d and -v parameters to > set it in debug or verbose mode... but those will never be passed > by the launcher program. Hmm, libvirt-sandbox-init-{qemu,lxc} both know how to pass -d to

[libvirt] [PATCH] nwfilter: don't crash listing filters in unprivileged daemon

2017-12-05 Thread Daniel P. Berrange
The unprivileged libvirtd does not support nwfilter config, by leaves the driver active. It is supposed to result in all APIs being an effective no-op, but several APIs rely on driver->nwfilters being non-NULL, or they will reference a NULL pointer. Rather than adding checks for NULL in many

Re: [libvirt] [rust PATCH] README: update libvirt.org links

2017-12-05 Thread Daniel P. Berrange
On Tue, Dec 05, 2017 at 04:55:14PM +0100, Ján Tomko wrote: > The documentation page used the link from before libvirt.h was split > into multiple files. > > The master repo linked to the go bindings. > > Fix both and switch them to https, which is now default for the website. > --- > Although

[libvirt] [rust PATCH] README: update libvirt.org links

2017-12-05 Thread Ján Tomko
The documentation page used the link from before libvirt.h was split into multiple files. The master repo linked to the go bindings. Fix both and switch them to https, which is now default for the website. --- Although trivial, I did not push these since I'm not a maintainer. README.md | 4

Re: [libvirt] [PATCH 16/17] qemu: Introduce qemuDomainDeviceDefValidateControllerUSB

2017-12-05 Thread Ján Tomko
On Mon, Dec 04, 2017 at 08:39:06PM -0500, John Ferlan wrote: Move the USB controller validation checs out of qemu_command and *checks into the proper qemu_domain validation helper. We will start slowly and also modity the xml2argv test to change *modify from a RUN to PARSE failure check

Re: [libvirt] [PATCH 02/17] qemu: Introduce qemuDomainDeviceDefSkipController

2017-12-05 Thread Ján Tomko
On Mon, Dec 04, 2017 at 08:38:52PM -0500, John Ferlan wrote: In order to be able to reuse some code for both controller def validation and command line building, create a convenience helper that will perform the "skip" avoidance checks. It will also set some flags to allow the caller to

Re: [libvirt] [PATCH 04/17] qemu: Move CCW S390 Address check to controller def validate

2017-12-05 Thread Ján Tomko
On Mon, Dec 04, 2017 at 08:38:54PM -0500, John Ferlan wrote: Move the call to qemuDomainCheckCCWS390AddressSupport from qemuBuildControllerDevStr to qemuDomainDeviceDefValidateController. This means we will get the qemuCaps from the driver opaque variable passed to qemuDomainDeviceDefValidate.

Re: [libvirt] [PATCH 05/17] tests: Remove use of IDE disk for pseries floppy test

2017-12-05 Thread Ján Tomko
On Mon, Dec 04, 2017 at 08:38:55PM -0500, John Ferlan wrote: From: Lin Ma Adding an IDE controller for a machinetype that has no built-in IDE controller, libvirt will log an error. Currently the machinetype list which returns by qemuDomainMachineHasBuiltinIDE only includes

Re: [libvirt] [PATCH 06/17] tests: Drop IDE controller in CCW

2017-12-05 Thread Ján Tomko
On Mon, Dec 04, 2017 at 08:38:56PM -0500, John Ferlan wrote: From: Lin Ma Adding an IDE controller for a machinetype that has no built-in IDE controller, libvirt will log an error. Currently the machinetype list which returns by qemuDomainMachineHasBuiltinIDE only includes

Re: [libvirt] [PATCH 03/17] qemu: Use virDomainControllerType in qemuBuildControllerDevStr switch

2017-12-05 Thread Ján Tomko
On Mon, Dec 04, 2017 at 08:38:53PM -0500, John Ferlan wrote: Make sure all types of virDomainControllerType are handled in the switch statement. Signed-off-by: John Ferlan --- src/qemu/qemu_command.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ACK Jan

[libvirt] [REBASE PATCH v2 10/10] qemu: Allow showing the dump progress for memory only dump

2017-12-05 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=916061 If the QEMU version running is new enough (based on the DUMP_COMPLETED event), then we can add a 'detach' boolean to the dump-guest-memory command in order to tell QEMU to run in a thread. This ensures that we don't lock out other commands while

[libvirt] [REBASE PATCH v2 08/10] qemu: Introduce qemuDomainGetJobInfoDumpStats

2017-12-05 Thread John Ferlan
Add an API to allow fetching the Dump statistics for the job via the qemuDomainGetJobInfo API. Signed-off-by: John Ferlan --- src/qemu/qemu_driver.c | 56 -- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git

[libvirt] [REBASE PATCH v2 09/10] qemu: Add dump completed event to the capabilities

2017-12-05 Thread John Ferlan
Add the DUMP_COMPLETED check to the capabilities. This is the mechanism used to determine whether the dump-guest-memory command can support the "-detach" option and thus be able to wait on the event and allow for a query of the progress of the dump. Signed-off-by: John Ferlan

[libvirt] [REBASE PATCH v2 02/10] qemu: Alter dump-guest-memory command generation

2017-12-05 Thread John Ferlan
The qemuMonitorJSONMakeCommand can properly handle a NULL string by using the "S:" parameter instead of "s:", so let's use that of having in if/else condition that only adds the "s:". Signed-off-by: John Ferlan --- src/qemu/qemu_monitor_json.c | 18 +- 1 file

[libvirt] [REBASE PATCH v2 04/10] qemu: Introduce qemuProcessHandleDumpCompleted

2017-12-05 Thread John Ferlan
Add a couple of booleans to mark when there's a dump completion event waiting and when a dump completed event has been received. To ensure the dump completed event from a non memory-only dump doesn't cause the a dump completed event to be fired, only broadcast if there's a completion event

[libvirt] [REBASE PATCH v2 01/10] qemu: Clean up style for the qemuDumpToFd definition

2017-12-05 Thread John Ferlan
Alter the function definition to follow more recent style Signed-off-by: John Ferlan --- src/qemu/qemu_driver.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 5eae7d24a..f8ccc8879 100644

[libvirt] [REBASE PATCH v2 06/10] qemu: Add new parameter to qemuMonitorDumpToFd

2017-12-05 Thread John Ferlan
Add a @detach parameter to the API in order allow running the QEMU code as a thread. Signed-off-by: John Ferlan --- src/qemu/qemu_driver.c | 2 +- src/qemu/qemu_monitor.c | 7 +-- src/qemu/qemu_monitor.h | 3 ++- src/qemu/qemu_monitor_json.c | 4 +++-

[libvirt] [REBASE PATCH v2 07/10] qemu: Introduce qemuDomainGetJobInfoMigrationStats

2017-12-05 Thread John Ferlan
Extract out the parts of qemuDomainGetJobStatsInternal that get the migration stats. We're about to add the ability to get just dump information. Signed-off-by: John Ferlan --- src/qemu/qemu_driver.c | 52 -- 1 file changed, 33

[libvirt] [REBASE PATCH v2 00/10] Implement query-dump command

2017-12-05 Thread John Ferlan
Original v2: https://www.redhat.com/archives/libvir-list/2017-November/msg00779.html Rebase due to additional capabilitiies v2 Cover: v1: https://www.redhat.com/archives/libvir-list/2017-November/msg00731.html Differences from v1 (besides more patches) Rather than use a timing loop in order to

[libvirt] [REBASE PATCH v2 05/10] qemu: Introduce qemuMonitor[JSON]QueryDump

2017-12-05 Thread John Ferlan
Add the query-dump API's in order to allow the dump-guest-memory to be used to monitor progress. Signed-off-by: John Ferlan --- src/qemu/qemu_monitor.c | 14 + src/qemu/qemu_monitor.h | 11 +++ src/qemu/qemu_monitor_json.c | 69

[libvirt] [REBASE PATCH v2 03/10] qemu: Add support for DUMP_COMPLETED event

2017-12-05 Thread John Ferlan
The event is fired when the domain memory only dump completes. Wire up the code to extract and send along the status. Signed-off-by: John Ferlan --- src/qemu/qemu_monitor.c | 18 ++ src/qemu/qemu_monitor.h | 19 +++

Re: [libvirt] [[RFC] 0/8] Implement async QEMU event handling in libvirtd.

2017-12-05 Thread Prerna
I spent a while trying to work through this proposal, here are a few points which need more thought: On Wed, Nov 8, 2017 at 7:22 PM, Daniel P. Berrange wrote: > On Mon, Nov 06, 2017 at 06:43:12AM +0100, Prerna wrote: > > Thanks for your reply Daniel. I am still on vacation

[libvirt] [PATCH] maint: Bump version number to 4.0.0

2017-12-05 Thread Andrea Bolognani
As documented in https://libvirt.org/downloads.html#schedule https://libvirt.org/downloads.html#numbering the next release will happen in the middle of January 2018 and, being the first release of a new year, will bring a brand new major version number with it. Signed-off-by: Andrea

Re: [libvirt] [PATCH 3/3] travis: Don't try to install brew packages twice

2017-12-05 Thread Daniel P. Berrange
On Mon, Dec 04, 2017 at 05:23:47PM +0100, Andrea Bolognani wrote: > gettext, gnutls and libgcrypt are already installed on the > system, so we don't need to request their installation. > > Signed-off-by: Andrea Bolognani > --- > .travis.yml | 2 +- > 1 file changed, 1

Re: [libvirt] [PATCH 2/3] travis: Upgrade brew packages

2017-12-05 Thread Daniel P. Berrange
On Mon, Dec 04, 2017 at 05:23:46PM +0100, Andrea Bolognani wrote: > Installed packages might be outdated by the time the build > runs, so we should update them. > > Signed-off-by: Andrea Bolognani > --- > .travis.yml | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >

Re: [libvirt] [PATCH 1/3] util: gettid() is Linux-specific

2017-12-05 Thread Daniel P. Berrange
On Mon, Dec 04, 2017 at 05:23:45PM +0100, Andrea Bolognani wrote: > The manual page clearly states that > > gettid() is Linux-specific and should not be used in programs > that are intended to be portable. > > Unfortunately, it looks like macOS implemented the functionality > and defined

[libvirt] [sandbox 3/6] Add tests .log and .trs files to gitignore

2017-12-05 Thread Cédric Bosdonnat
--- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 83831bb..c4e2217 100644 --- a/.gitignore +++ b/.gitignore @@ -58,3 +58,5 @@ bin/virt-sandbox bin/virt-sandbox-service-util build/ bin/*.1 +*.log +*.trs -- 2.15.1 -- libvir-list mailing list

[libvirt] [sandbox 6/6] Don't hardcode interpreter path

2017-12-05 Thread Cédric Bosdonnat
This is particularly useful on operating systems that don't ship Python as part of the base system (eg. FreeBSD) while still working just as well as it did before on Linux. --- bin/virt-sandbox-image | 2 +- bin/virt-sandbox-service | 2 +-

[libvirt] [sandbox 1/6] Pass debug and verbose values to init

2017-12-05 Thread Cédric Bosdonnat
libvirt-sandbox-init-common is expecting -d and -v parameters to set it in debug or verbose mode... but those will never be passed by the launcher program. Writing the core.debug and core.verbose parameters in the sandbox configuration makes those values actually usable from the init. ---

[libvirt] [sandbox 5/6] Convert to python3

2017-12-05 Thread Cédric Bosdonnat
Python2 is going to die soon, convert to python3. --- bin/virt-sandbox-service| 68 ++--- libvirt-sandbox/image/cli.py| 18 - libvirt-sandbox/image/sources/docker.py | 41 ++-- libvirt-sandbox/image/template.py

[libvirt] [sandbox 0/6] Misc patches

2017-12-05 Thread Cédric Bosdonnat
Hi all, Here are a few patches I found sitting on my local copy. I also added a few patches to convert to python3. Cédric Bosdonnat (6): Pass debug and verbose values to init machine: use squash security mode for non-root virt-sandbox mounts Add tests .log and .trs files to gitignore

[libvirt] [sandbox 2/6] machine: use squash security mode for non-root virt-sandbox mounts

2017-12-05 Thread Cédric Bosdonnat
When running virt-sandbox as a user with host-bind mount, the user can't write in the mounted folder. If run as root, use passthrough security mode, otherwise use squashed one to fix this. --- libvirt-sandbox/libvirt-sandbox-builder-machine.c | 5 - 1 file changed, 4 insertions(+), 1

[libvirt] [sandbox 4/6] service: fix bad ConfigMountHostImage constructor call

2017-12-05 Thread Cédric Bosdonnat
Since commit 68406aff8 ConfigMountHostImage needs a format parameter, virt-sandbox-service needs to fit the new API. --- bin/virt-sandbox-service | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/virt-sandbox-service b/bin/virt-sandbox-service index 45f4517..c34c6f3

Re: [libvirt] [PATCH 0/4] tests: Drop more useless prefixes

2017-12-05 Thread Ján Tomko
On Tue, Dec 05, 2017 at 09:01:15AM +0100, Michal Privoznik wrote: Yet again, trimmed patches, whole patches can be found here: https://github.com/zippy2/libvirt/commits/qemuxml2xmldata Michal Privoznik (4): test: Drop useless prefix for qemuagent test data test: Drop useless prefix for

[libvirt] [PATCH 0/4] tests: Drop more useless prefixes

2017-12-05 Thread Michal Privoznik
Yet again, trimmed patches, whole patches can be found here: https://github.com/zippy2/libvirt/commits/qemuxml2xmldata Michal Privoznik (4): test: Drop useless prefix for qemuagent test data test: Drop useless prefix for qemuargv2xml test data test: Drop useless prefix for

[libvirt] [PATCH 2/4] test: Drop useless prefix for qemuargv2xml test data

2017-12-05 Thread Michal Privoznik
There's no reason for the files to have qemuargv2xml- prefix since they all live under qemuargv2xmldata directory. Signed-off-by: Michal Privoznik --- tests/qemuargv2xmltest.c | 4 ++-- .../{qemuargv2xml-boot-cdrom.args =>

[libvirt] [PATCH 3/4] test: Drop useless prefix for qemuxml2xmldata test data

2017-12-05 Thread Michal Privoznik
There's no reason for the files to have qemuxml2xmlout- prefix since they all live under qemuxml2xmloutdata directory. Signed-off-by: Michal Privoznik --- tests/qemuxml2xmltest.c | 8 ...arch64-aavmf-virtio-mmio.xml =>

[libvirt] [PATCH 1/4] test: Drop useless prefix for qemuagent test data

2017-12-05 Thread Michal Privoznik
There's no reason for the files to have qemuagent- prefix since they all live under qemuagentdata directory. Signed-off-by: Michal Privoznik --- tests/qemuagenttest.c| 2 +- tests/qemuagentdata/{qemuagent-fsinfo.xml => fsinfo.xml} | 0 2

[libvirt] [PATCH 4/4] test: Drop useless prefix for genericxml2xml test data

2017-12-05 Thread Michal Privoznik
There's no reason for the files to have generic- prefix since they all live under genericxml2xmlindata and genericxml2xmloutdata directories. Signed-off-by: Michal Privoznik --- tests/genericxml2xmltest.c| 4 ++--