[libvirt] [PATCH] qemu: Escape external snapshot names containing comma

2019-02-12 Thread Eric Blake
The code for creating external snapshots for an offline domain called out to qemu-img without escaping commas in the manner that qemu-img expects. This also fixes a typo in the comment. Signed-off-by: Eric Blake --- Noticed by code inspection; I did not try very hard to see how easy or hard it

Re: [libvirt] [PATCH 5/5] qemuhotplugtest: Test guestfwd attach and detach

2019-02-12 Thread John Ferlan
On 2/11/19 10:40 AM, Michal Privoznik wrote: > Previous two commits demonstrate a hole in our test scenario. > Fix that. > > Signed-off-by: Michal Privoznik > --- > tests/qemuhotplugtest.c | 6 ++ > .../qemuhotplug-guestfwd.xml | 4 ++ >

Re: [libvirt] [PATCH 4/5] qemu_hotplug: Detach guestfwd using netdev_del

2019-02-12 Thread John Ferlan
On 2/11/19 10:40 AM, Michal Privoznik wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1624204 > > The guestfwd channels are -netdevs really. Hotunplug them as > such. Also, DEVICE_DELETED event is not triggered (surprisingly, > since we're not issuing device_del rather than netdev_del)

Re: [libvirt] [PATCH 3/5] qemu_hotplug: Attach guestfwd using netdev_add

2019-02-12 Thread John Ferlan
On 2/11/19 10:40 AM, Michal Privoznik wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1624204 > > The guestfwd channels are -netdevs really. Hotplug them as such. > > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_hotplug.c | 20 +++- > 1 file changed, 15

Re: [libvirt] [PATCH 2/5] qemuL: Drop "user-" prefix for guestfwd netdev

2019-02-12 Thread John Ferlan
$SUBJ: s/qemuL:/qemu:/ On 2/11/19 10:40 AM, Michal Privoznik wrote: > Introduced by d86c876a66e3. > > There is no real need to have "user-" prefix for chardev. > > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_command.c | 2 +- >

Re: [libvirt] [PATCH 1/5] qemuDomainDetachChrDevice: Use @tmpChr to build device string

2019-02-12 Thread John Ferlan
$SUBJ: qemu: Use @tmpChr in qemuDomainDetachChrDevice to build device string On 2/11/19 10:40 AM, Michal Privoznik wrote: > So far we are passing @chr to qemuBuildChrDeviceStr. This is > suboptimal beacuse @chr is just parsed XML definition provided by because > user which by definition may

Re: [libvirt] [RFC PATCH] udev: Remove udev handle from main loop when udev thread stops

2019-02-12 Thread John Ferlan
On 2/7/19 11:08 AM, Marc Hartmayer wrote: > Commit "nodedev: Move device enumumeration out of nodeStateInitialize" > (9f0ae0b18e3e620) has moved the heavy task of device enumeration into > a separate thread. The problem with this commit is that there is a > functionality change in the cleanup

Re: [libvirt] [PATCH v4 15/20] backup: Add new qemu monitor interactions

2019-02-12 Thread John Ferlan
On 2/6/19 2:18 PM, Eric Blake wrote: > Add some monitor commands to be used during backup/checkpoint > operations: > - another facet to query-block for learning bitmap size > - the new bitmap parameter to nbd-server-add-bitmap > - new block-dirty-bitmap-{add,enable,disable,merge} functions > >

Re: [libvirt] [PATCH v4 13/20] backup: Implement virsh support for checkpoints

2019-02-12 Thread John Ferlan
On 2/6/19 2:18 PM, Eric Blake wrote: > Introduce a bunch of new virsh commands for managing checkpoints > in isolation. More commands are needed for performing incremental > backups, but these commands were easy to implement by modeling > heavily after virsh-snapshot.c (no need for

Re: [libvirt] [PATCH v3 0/8] Make use of autofree within storage code

2019-02-12 Thread John Ferlan
On 2/12/19 9:18 AM, John Ferlan wrote: > v2: https://www.redhat.com/archives/libvir-list/2019-February/msg00477.html > > Changes since v2: > > * Pushed what was already agreed upon w/ R-by's, so in order to apply >this you'll need to get all those changes. > > * Repost extractions of

Re: [libvirt] [PATCH v4 12/20] wip: backup: Parse and output backup XML

2019-02-12 Thread John Ferlan
On 2/6/19 2:18 PM, Eric Blake wrote: > Accept XML describing a generic block job, and output it again > as needed. At the moment, it has some qemu-specific hacks, such > as storing internal XML for a node name, that might be cleaner > once full-tree node-name support goes in. > > Still not

Re: [libvirt] [PATCH v4 11/20] wip: backup: Parse and output checkpoint XML

2019-02-12 Thread John Ferlan
On 2/6/19 2:18 PM, Eric Blake wrote: > Work in progress - the checkpoint code is not quite passing > tests (part of that is figuring out the minimal XML that is > still valid as a element, or just use --no-domain flag). > > Signed-off-by: Eric Blake > --- > src/conf/checkpoint_conf.h

Re: [libvirt] [PATCH v3 17/17] qemu: domcaps: Report disk

2019-02-12 Thread Andrea Bolognani
On Fri, 2019-02-08 at 17:12 -0500, Cole Robinson wrote: > This generates new XML like: > > > > virtio > virtio-transitional > virtio-non-transitional > > > > Signed-off-by: Cole Robinson > --- > src/conf/domain_capabilities.c| 1

Re: [libvirt] [PATCH v3 16/17] qemu: Support scsi controller model=virtio-{non-}transitional

2019-02-12 Thread Andrea Bolognani
On Fri, 2019-02-08 at 17:12 -0500, Cole Robinson wrote: > Add devices. Ex: > > > > * "virtio-transitional" maps to qemu "virtio-scsi-pci-transitional" > * "virtio-non-transitional" maps to qemu "virtio-scsi-non-transitional" > > The naming here doesn't match the pre-existing

Re: [libvirt] [PATCH v3 13/17] conf: Add

2019-02-12 Thread Andrea Bolognani
On Fri, 2019-02-08 at 17:12 -0500, Cole Robinson wrote: [...] > @@ -13208,6 +13217,13 @@ virDomainInputDefParseXML(virDomainXMLOptionPtr > xmlopt, > goto error; > } > > +if (model && > +(def->model = virDomainInputModelTypeFromString(model)) < 0) { > +

[libvirt] [PATCH 6/6] Use NULLSTR_EMPTY even more

2019-02-12 Thread Ján Tomko
This time even in places that would possibly better be served by a more complex macro. Can be squashed into the previous patch if requested. Signed-off-by: Ján Tomko --- src/interface/interface_backend_netcf.c | 42 - src/nwfilter/nwfilter_dhcpsnoop.c | 2 +-

[libvirt] [PATCH 5/6] Use NULLSTR_EMPTY

2019-02-12 Thread Ján Tomko
Instead of repetitive: s ? s : "" use NULLSTR_EMPTY. Signed-off-by: Ján Tomko --- src/datatypes.c | 2 +- src/libvirt-admin.c | 2 +- src/libvirt.c| 2 +- src/lxc/lxc_controller.c | 2 +- src/qemu/qemu_command.c | 8

[libvirt] [PATCH 4/6] Remove EMPTY_STR macro

2019-02-12 Thread Ján Tomko
Another misleadingly named macro. Deprecate in favor of NULLSTR_STAR. Signed-off-by: Ján Tomko --- src/util/virlease.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/util/virlease.c b/src/util/virlease.c index 7c6c37ec9d..93ca72e3af 100644 ---

[libvirt] [PATCH 3/6] Remove EMPTYSTR macro

2019-02-12 Thread Ján Tomko
This macro neither takes nor produces an empty string. Remove it in favor of NULLSTR_MINUS. Signed-off-by: Ján Tomko --- src/internal.h| 5 - tools/virsh-network.c | 10 +- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/internal.h b/src/internal.h index

[libvirt] [PATCH 1/6] internal: introduce a family of NULLSTR macros

2019-02-12 Thread Ján Tomko
NULLSTR_EMPTY, the quiet child, NULLSTR_STAR, the famous one and NULLSTR_MINUS, the grumpy one. Signed-off-by: Ján Tomko --- src/internal.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a/src/internal.h b/src/internal.h index 3f3e567ac9..7c11f57e33 100644 ---

[libvirt] [PATCH 0/6] Introduce more NULLSTR macros

2019-02-12 Thread Ján Tomko
Instead of using EMPTY_?STR with various meanings, use a family of NULLSTR_.+ macros Ján Tomko (6): internal: introduce a family of NULLSTR macros tools: use NULLSTR_MINUS Remove EMPTYSTR macro Remove EMPTY_STR macro Use NULLSTR_EMPTY Use NULLSTR_EMPTY even more src/datatypes.c

[libvirt] [PATCH 2/6] tools: use NULLSTR_MINUS

2019-02-12 Thread Ján Tomko
Use the newly introduced macro in the few places that open-code it. Signed-off-by: Ján Tomko --- tools/virsh-domain-monitor.c | 4 ++-- tools/virsh-snapshot.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c

Re: [libvirt] [PATCH v3 12/17] qemu: Support vsock model=virtio-{non-}transitional

2019-02-12 Thread Andrea Bolognani
On Fri, 2019-02-08 at 17:12 -0500, Cole Robinson wrote: [...] > @@ -977,7 +977,18 @@ > qemuDomainDeviceCalculatePCIConnectFlags(virDomainDeviceDefPtr dev, > break; > > case VIR_DOMAIN_DEVICE_VSOCK: > -return virtioFlags; > +switch ((virDomainVsockModel)

Re: [libvirt] [PATCH v2 0/2] add debugcon-isa chardev guest interface

2019-02-12 Thread Andrea Bolognani
On Tue, 2019-02-12 at 16:07 +0100, Ján Tomko wrote: > On Tue, Feb 12, 2019 at 02:44:05PM +, Nikolay Shirokovskiy wrote: > > On 12.02.2019 17:37, Ján Tomko wrote: > > > On Thu, Feb 07, 2019 at 02:31:47PM +0300, Nikolay Shirokovskiy wrote: > > > > Diff from v1 [1]: > > > > = > >

Re: [libvirt] [PATCH v3 11/17] qemu: Support memballoon model=virtio-{non-}transitional

2019-02-12 Thread Andrea Bolognani
On Fri, 2019-02-08 at 17:12 -0500, Cole Robinson wrote: [...] > @@ -882,7 +882,10 @@ > qemuDomainDeviceCalculatePCIConnectFlags(virDomainDeviceDefPtr dev, > case VIR_DOMAIN_DEVICE_MEMBALLOON: > switch ((virDomainMemballoonModel) dev->data.memballoon->model) { > case

Re: [libvirt] Wiki account request

2019-02-12 Thread Daniel P . Berrangé
On Tue, Feb 12, 2019 at 04:30:01PM +0100, Pino Toscano wrote: > Hi, > > I'd like an account on the libvirt wiki, so I can add ideas to the GSoC > page. I'll take care of this and send you the details off list. Regards, Daniel -- |: https://berrange.com -o-

Re: [libvirt] [PATCH v3 10/17] qemu: Support filesystem model=virtio-{non-}transitional

2019-02-12 Thread Andrea Bolognani
On Fri, 2019-02-08 at 17:12 -0500, Cole Robinson wrote: [...] > @@ -677,8 +677,18 @@ > qemuDomainDeviceCalculatePCIConnectFlags(virDomainDeviceDefPtr dev, > break; > > case VIR_DOMAIN_DEVICE_FS: > -/* the only type of filesystem so far is virtio-9p-pci */ > -return

[libvirt] [PATCH 0/3] virjsontest: separate some tests into files

2019-02-12 Thread Ján Tomko
Ján Tomko (3): virjsontest: introduce DO_TEST_PARSE_FILE virjsontest: switch DO_TEST_PARSE_FILE to use output files virjsontest: switch AddAndRemove tests to work with files tests/virjsondata/add-remove-failure-in.json | 1 + tests/virjsondata/add-remove-success-in.json | 1 +

[libvirt] [PATCH 3/3] virjsontest: switch AddAndRemove tests to work with files

2019-02-12 Thread Ján Tomko
Instead of using JSON in C strings, put it in separate files for easier manipulation. Signed-off-by: Ján Tomko --- tests/virjsondata/add-remove-failure-in.json | 1 + tests/virjsondata/add-remove-success-in.json | 1 + tests/virjsondata/add-remove-success-out.json | 1 +

[libvirt] [PATCH 2/3] virjsontest: switch DO_TEST_PARSE_FILE to use output files

2019-02-12 Thread Ján Tomko
Also switch the expected output of DO_TEST_PARSE_FILE to be in a file, now that we demonstrated the input files match the expected string representation. Signed-off-by: Ján Tomko --- tests/virjsondata/parse-Harder-out.json | 4 ++ tests/virjsondata/parse-NotSoSimple-out.json | 3 ++

[libvirt] [PATCH 1/3] virjsontest: introduce DO_TEST_PARSE_FILE

2019-02-12 Thread Ján Tomko
Introduce a new macro DO_TEST_PARSE_FILE which takes the input JSON from a file instead of a C string. This lets us get rid of quote escaping and makes the JSON easier to edit. The output JSON is still taken from a string and will be moved separately. Signed-off-by: Ján Tomko ---

Re: [libvirt] [PATCH v3 09/17] conf: Add

2019-02-12 Thread Andrea Bolognani
On Fri, 2019-02-08 at 17:12 -0500, Cole Robinson wrote: [...] > @@ -10858,6 +10866,15 @@ virDomainFSDefParseXML(virDomainXMLOptionPtr xmlopt, > def->accessmode = VIR_DOMAIN_FS_ACCESSMODE_PASSTHROUGH; > } > > +model = virXMLPropString(node, "model"); > +if (model) { > +

Re: [libvirt] [PATCH v3 8/8] util: Introduce VIR_DEFINE_AUTOPTR_FUNC for virStorageSource

2019-02-12 Thread Ján Tomko
On Tue, Feb 12, 2019 at 09:19:06AM -0500, John Ferlan wrote: Let's make use of the auto __cleanup capabilities cleaning up any now unnecessary goto paths. Signed-off-by: John Ferlan Reviewed-by: Ján Tomko This was the only patch I got in 'cc:'. If that was not intentional, check your git

Re: [libvirt] [PATCH v3 7/8] util: Check for duplicated id in virStorageSourceParseRBDColonString

2019-02-12 Thread Ján Tomko
On Tue, Feb 12, 2019 at 09:19:05AM -0500, John Ferlan wrote: If we find multiple "id=" strings during processing, then we need to force an error since we cannot have multiple 's defined for a single source volume. Signed-off-by: John Ferlan --- src/util/virstoragefile.c | 5 + 1 file

Re: [libvirt] [PATCH v3 6/8] conf: Check for duplicate authdef during hostdev iSCSI processing

2019-02-12 Thread Ján Tomko
On Tue, Feb 12, 2019 at 09:19:04AM -0500, John Ferlan wrote: If virDomainHostdevSubsysSCSIiSCSIDefParseXML processing finds a duplicated structure, we should error out rather than continue. Signed-off-by: John Ferlan --- src/conf/domain_conf.c | 6 ++ 1 file changed, 6 insertions(+)

Re: [libvirt] [PATCH v3 5/8] tests: Fix memory leak in testCompareXMLToArgvFiles

2019-02-12 Thread Ján Tomko
On Tue, Feb 12, 2019 at 09:19:03AM -0500, John Ferlan wrote: Only one path will consume the @def; otherwise, we need to free it. Signed-off-by: John Ferlan --- tests/storagepoolxml2argvtest.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) Reviewed-by: Ján Tomko Jano

Re: [libvirt] [PATCH v3 4/8] storage: Use VIR_AUTOCLOSE

2019-02-12 Thread Ján Tomko
On Tue, Feb 12, 2019 at 09:19:02AM -0500, John Ferlan wrote: Modify code to use the VIR_AUTOCLOSE logic cleaning up any now unnecessary goto paths. Signed-off-by: John Ferlan Reviewed-by: Erik Skultety --- src/storage/storage_backend_logical.c | 3 +- src/storage/storage_backend_scsi.c|

Re: [libvirt] [PATCH v3 08/17] qemu: Support rng model=virtio-{non-}transitional

2019-02-12 Thread Andrea Bolognani
On Fri, 2019-02-08 at 17:11 -0500, Cole Robinson wrote: [...] > @@ -4553,6 +4553,11 @@ qemuDomainRNGDefValidate(const virDomainRNGDef *def, > modelIsSupported = virQEMUCapsGet(qemuCaps, >QEMU_CAPS_DEVICE_VIRTIO_RNG); > break; > +

Re: [libvirt] [PATCH v3 3/8] storage: Rework ret logic in storageBackendUpdateVolTargetInfo

2019-02-12 Thread Ján Tomko
On Tue, Feb 12, 2019 at 09:19:01AM -0500, John Ferlan wrote: Rather than overload @ret with trying serve multiple purposes, let's initialize @ret to -1 and introduce an @rc function return value that can be used for functions that may return -1 or -2 and only override @ret when rc < 0.

Re: [libvirt] [PATCH v3 2/8] storage: Use VIR_AUTOFREE for storage backends

2019-02-12 Thread Ján Tomko
On Tue, Feb 12, 2019 at 09:19:00AM -0500, John Ferlan wrote: Let's make use of the auto __cleanup capabilities. This also allows for the cleanup of some goto paths. Signed-off-by: John Ferlan --- src/storage/storage_backend.c | 9 +-- src/storage/storage_backend_disk.c |

[libvirt] Wiki account request

2019-02-12 Thread Pino Toscano
Hi, I'd like an account on the libvirt wiki, so I can add ideas to the GSoC page. Thanks, -- Pino Toscano signature.asc Description: This is a digitally signed message part. -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 0/5] Remove some volOptions from virStoragePoolTypeInfo

2019-02-12 Thread John Ferlan
On 2/7/19 8:53 AM, John Ferlan wrote: > While working through changes to add storage pool capabilities > I found that the volOptions definitions for a few pool types were > not necessary and in a couple of cases wrong. Figured I would > extract them out of my work on those adjustments while I'm

[libvirt] [PATCH v2 13/17] docs: Add description for Storage Pool Capabilities

2019-02-12 Thread John Ferlan
Signed-off-by: John Ferlan --- docs/docs.html.in | 1 + docs/format.html.in| 1 + docs/formatstoragecaps.html.in | 108 + docs/index.html.in | 1 + 4 files changed, 111 insertions(+) create mode 100644

[libvirt] [PATCH v2 14/17] libvirt: Introduce virConnectGetStoragePoolCapabilities

2019-02-12 Thread John Ferlan
Introduce the API to expose the storage pool capabilities along with all the remote munglement required to hook up the client. Signed-off-by: John Ferlan --- include/libvirt/libvirt-storage.h | 4 src/driver-storage.h | 5 src/libvirt-storage.c | 40

[libvirt] [PATCH v2 16/17] virsh: Expose virConnectGetStoragePoolCapabilities

2019-02-12 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1581670 Add a new storage pool command "poolcapabilities" to output the storage pool capabilities. This mimics the "domcapabilities" command with respect to naming. Signed-off-by: John Ferlan --- tools/virsh-pool.c | 42

[libvirt] [PATCH v2 15/17] storage: Introduce storageConnectGetStoragePoolCapabilities

2019-02-12 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1581670 Create the storage driver code to generate the output for the storage pool capabilities XML. Signed-off-by: John Ferlan --- src/storage/storage_driver.c | 24 1 file changed, 24 insertions(+) diff --git

[libvirt] [PATCH v2 11/17] conf: Add storage pool capability formatting

2019-02-12 Thread John Ferlan
Add support to format the storage pool capabilities using the virStoragePoolTypeInfoPtr to determine what capabilities exist for the various pools and the driver capabilities to determine whether the pool is compiled in and supported. Signed-off-by: John Ferlan --- src/conf/Makefile.inc.am

[libvirt] [PATCH v2 17/17] docs: Add news article

2019-02-12 Thread John Ferlan
Signed-off-by: John Ferlan --- docs/news.xml | 12 1 file changed, 12 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 8d6d58ae6a..074b0f2b02 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -59,6 +59,18 @@ of the network's bridge element.

[libvirt] [PATCH v2 10/17] docs: Add schema for storage pool capabilities

2019-02-12 Thread John Ferlan
Define a schema for the storage pool capabilities along with a test to show the general format. Signed-off-by: John Ferlan --- docs/schemas/storagepoolcaps.rng | 88 ++ libvirt.spec.in | 1 + mingw-libvirt.spec.in | 2 +

[libvirt] [PATCH v2 12/17] tests: Introduce storage pool capabilites test

2019-02-12 Thread John Ferlan
Add a new test for the storage pool capabilities. There will be one test mocked with every backend available (full) and one where only the file system pool is available. Signed-off-by: John Ferlan --- tests/Makefile.am | 6 +

[libvirt] [PATCH v2 09/17] storage: Process storage pool capabilities

2019-02-12 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1581670 During storage driver backend initialization, let's save which backends are available in the storage pool capabilities. In order to format those, we need add a connectGetCapabilities processor to the storageHypervisorDriver. This allows a

[libvirt] [PATCH v2 06/17] conf: Remove defaultFormat from VIR_STORAGE_POOL_ZFS

2019-02-12 Thread John Ferlan
The ZFS pool is document as not using pool format types, so remove the defaultFormat value. Signed-off-by: John Ferlan --- src/conf/storage_conf.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 25556db4f8..be64c09d37 100644 ---

[libvirt] [PATCH v2 08/17] conf: Introduce storage pool functions into capabilities

2019-02-12 Thread John Ferlan
Introduce the bare bones functions to processing capability data for the storage driver. Since there will be no need for the output, we need to filter that data. Signed-off-by: John Ferlan --- src/conf/capabilities.c | 74 src/conf/capabilities.h |

[libvirt] [PATCH v2 07/17] docs: Fix a few storage.html.in typos

2019-02-12 Thread John Ferlan
Fix the ZFS Valid Volume Format Types label and add the Valid pool format types for Vstorage pools. Signed-off-by: John Ferlan --- docs/storage.html.in | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/storage.html.in b/docs/storage.html.in index

[libvirt] [PATCH v2 02/17] conf: Remove volOptions for VIR_STORAGE_POOL_RBD

2019-02-12 Thread John Ferlan
The rbd pool is documented as not using the volume type, so let's just remove it. Signed-off-by: John Ferlan --- src/conf/storage_conf.c | 5 - 1 file changed, 5 deletions(-) diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 703093d3b5..c303898e0d 100644 ---

[libvirt] [PATCH v2 03/17] conf: Remove volOptions for VIR_STORAGE_POOL_SCSI

2019-02-12 Thread John Ferlan
The scsi pool is documented as not using the volume type, so let's just remove it. Signed-off-by: John Ferlan --- src/conf/storage_conf.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index c303898e0d..8cb0f75a91 100644 ---

[libvirt] [PATCH v2 05/17] conf: Remove volOptions for VIR_STORAGE_POOL_MPATH

2019-02-12 Thread John Ferlan
The multipath pool is documented as not using the volume type, so let's just remove it. Signed-off-by: John Ferlan --- src/conf/storage_conf.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index e699057fbf..25556db4f8 100644 ---

[libvirt] [PATCH v2 01/17] conf: Remove volOptions for VIR_STORAGE_POOL_SHEEPDOG

2019-02-12 Thread John Ferlan
The sheepdog pool is documented as not using the volume type, so let's just remove it. Besides it would have produced bad results since the defaultType is FILE but the formatting used the Disk types. Signed-off-by: John Ferlan --- src/conf/storage_conf.c | 4

[libvirt] [PATCH v2 04/17] conf: Remove volOptions for VIR_STORAGE_POOL_ISCSI[_DIRECT]

2019-02-12 Thread John Ferlan
The iscsi and iscsi-direct pools are documented as not using the volume type, so let's just remove it. Besides it would have produced bad output since formatting uses the Disk types. Signed-off-by: John Ferlan --- src/conf/storage_conf.c | 6 -- 1 file changed, 6 deletions(-) diff --git

[libvirt] [PATCH v2 00/17] Add support to list Storage Driver backend capabilities

2019-02-12 Thread John Ferlan
v1: https://www.redhat.com/archives/libvir-list/2019-January/msg00479.html Changes since v1: * The first 4 patches were already R-by'd and pushed. * From v1, rework patch 5 & 6 into what now is patches 8 & 9. The format of the output for what results in the output for the

Re: [libvirt] [PATCH v3 1/8] storage: Cleanup virStorageFileBackendGlusterReadlinkCallback

2019-02-12 Thread Ján Tomko
On Tue, Feb 12, 2019 at 09:18:59AM -0500, John Ferlan wrote: Rather than having two exit paths, let's use a @retval value and VIR_STEAL_PTR in order to unite the exit path through the error label. Signed-off-by: John Ferlan --- src/storage/storage_file_gluster.c | 7 --- 1 file changed, 4

Re: [libvirt] [PATCH v3 07/17] qemu: Support hostdev model=virtio-{non-}transitional

2019-02-12 Thread Andrea Bolognani
On Fri, 2019-02-08 at 17:11 -0500, Cole Robinson wrote: [...] > -if (hostdev->source.subsys.type == > VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI_HOST) > +if (hostdev->source.subsys.type == > VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI_HOST) { > +switch

[libvirt] [PATCH 0/2] further apparmor handling of opengl

2019-02-12 Thread Christian Ehrhardt
Further testing with opengl enabled graphics showed that we need much more rules than we initially added. Upstream apparmor has abstractions [1][2] for the majority of what we'd need, but those are in no Distribution yet so we can't rely on them. But we can add rules "like those known ones"

[libvirt] [PATCH 1/2] security: aa-helper: allow virt-aa-helper to read /dev/dri

2019-02-12 Thread Christian Ehrhardt
Change fb01e1a44 "virt-aa-helper: generate rules for gl enabled graphics devices" implemented the detection for gl enabled devices in virt-aa-helper. But it will in certain cases e.g. if no rendernode was explicitly specified need to read /dev/dri which it currently isn't allowed. Add a rule to

[libvirt] [PATCH 2/2] security: aa-helper: generate more rules for gl devices

2019-02-12 Thread Christian Ehrhardt
Change fb01e1a44 "virt-aa-helper: generate rules for gl enabled graphics devices" implemented the detection for gl enabled devices in virt-aa-helper. But further testing showed that it will need much more access for the full gl stack to work. Upstream apparmor just recently split those things out

Re: [libvirt] [PATCH v2 0/2] add debugcon-isa chardev guest interface

2019-02-12 Thread Ján Tomko
On Tue, Feb 12, 2019 at 02:44:05PM +, Nikolay Shirokovskiy wrote: On 12.02.2019 17:37, Ján Tomko wrote: On Thu, Feb 07, 2019 at 02:31:47PM +0300, Nikolay Shirokovskiy wrote: Diff from v1 [1]: = - expose the device as serial device instead of channel in config I use

Re: [libvirt] [PATCH v3 05/17] qemu: Support interface model=virtio-{non-}transitional

2019-02-12 Thread Andrea Bolognani
On Fri, 2019-02-08 at 17:11 -0500, Cole Robinson wrote: > Add new model handling for virtio transitional devices. Ex: > > > > > > * "virtio-transitional" maps to qemu "virtio-net-pci-transitional" > * "virtio-non-transitional" maps to qemu "virtio-net-pci-non-transitional" > >

Re: [libvirt] [PATCH v3 04/17] qemu: Support disk model=virtio-{non-}transitional

2019-02-12 Thread Andrea Bolognani
On Fri, 2019-02-08 at 17:11 -0500, Cole Robinson wrote: > Add new model values for virtio transitional devices. When > combined with bus='virtio': > > * "virtio-transitional" maps to qemu "virtio-blk-pci-transitional" > * "virtio-non-transitional" maps to qemu "virtio-blk-pci-non-transitional" >

Re: [libvirt] [PATCH v2 0/2] add debugcon-isa chardev guest interface

2019-02-12 Thread Nikolay Shirokovskiy
On 12.02.2019 17:37, Ján Tomko wrote: > On Thu, Feb 07, 2019 at 02:31:47PM +0300, Nikolay Shirokovskiy wrote: >> Diff from v1 [1]: >> = >> - expose the device as serial device instead of channel in config >> >> I use isa-debugcon name becase libvirt passes these names to qemu

Re: [libvirt] [PATCH v2 0/2] add debugcon-isa chardev guest interface

2019-02-12 Thread Ján Tomko
On Thu, Feb 07, 2019 at 02:31:47PM +0300, Nikolay Shirokovskiy wrote: Diff from v1 [1]: = - expose the device as serial device instead of channel in config I use isa-debugcon name becase libvirt passes these names to qemu as-is so I don't want to make exception for this device.

Re: [libvirt] [PATCH v2 2/2] qemu: implement debugcon-isa chardev

2019-02-12 Thread Ján Tomko
On Fri, Feb 08, 2019 at 04:02:38PM +0100, Andrea Bolognani wrote: On Thu, 2019-02-07 at 14:31 +0300, Nikolay Shirokovskiy wrote: +++ b/tests/qemuxml2argvtest.c @@ -1490,6 +1490,7 @@ mymain(void) QEMU_CAPS_DEVICE_ISA_SERIAL); DO_TEST("pci-serial-dev-chardev",

Re: [libvirt] [PATCH v2 1/2] conf: add debugcon chardev guest interface

2019-02-12 Thread Nikolay Shirokovskiy
On 11.02.2019 16:40, Andrea Bolognani wrote: > On Mon, 2019-02-11 at 08:14 +, Nikolay Shirokovskiy wrote: >> On 08.02.2019 17:34, Andrea Bolognani wrote: >>> Even with that fixed, while your code prevents a element >>> associated to the isa-debugcon to be automatically created, it >>>

Re: [libvirt] [PATCH v3 03/17] conf: Add

2019-02-12 Thread Andrea Bolognani
On Fri, 2019-02-08 at 17:11 -0500, Cole Robinson wrote: [...] > +++ b/docs/formatdomain.html.in > @@ -2922,6 +2922,17 @@ > Since 0.1.4 > > > + model > + > +Indicates the emulated device model of the disk. Typically > +

Re: [libvirt] [PATCH v2 2/2] qemu: implement debugcon-isa chardev

2019-02-12 Thread Ján Tomko
On Mon, Feb 11, 2019 at 06:23:32PM +0100, Andrea Bolognani wrote: On Mon, 2019-02-11 at 08:53 +, Nikolay Shirokovskiy wrote: On 08.02.2019 18:02, Andrea Bolognani wrote: > On Thu, 2019-02-07 at 14:31 +0300, Nikolay Shirokovskiy wrote: > [...] > > @@ -393,9 +393,11 @@

[libvirt] [PATCH v3 7/8] util: Check for duplicated id in virStorageSourceParseRBDColonString

2019-02-12 Thread John Ferlan
If we find multiple "id=" strings during processing, then we need to force an error since we cannot have multiple 's defined for a single source volume. Signed-off-by: John Ferlan --- src/util/virstoragefile.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/util/virstoragefile.c

[libvirt] [PATCH v3 0/8] Make use of autofree within storage code

2019-02-12 Thread John Ferlan
v2: https://www.redhat.com/archives/libvir-list/2019-February/msg00477.html Changes since v2: * Pushed what was already agreed upon w/ R-by's, so in order to apply this you'll need to get all those changes. * Repost extractions of code that were requested in code review, but not

[libvirt] [PATCH v3 4/8] storage: Use VIR_AUTOCLOSE

2019-02-12 Thread John Ferlan
Modify code to use the VIR_AUTOCLOSE logic cleaning up any now unnecessary goto paths. Signed-off-by: John Ferlan Reviewed-by: Erik Skultety --- src/storage/storage_backend_logical.c | 3 +- src/storage/storage_backend_scsi.c| 13 +-- src/storage/storage_file_fs.c | 15 +--

[libvirt] [PATCH v3 2/8] storage: Use VIR_AUTOFREE for storage backends

2019-02-12 Thread John Ferlan
Let's make use of the auto __cleanup capabilities. This also allows for the cleanup of some goto paths. Signed-off-by: John Ferlan --- src/storage/storage_backend.c | 9 +-- src/storage/storage_backend_disk.c | 62 +++ src/storage/storage_backend_fs.c

[libvirt] [PATCH v3 6/8] conf: Check for duplicate authdef during hostdev iSCSI processing

2019-02-12 Thread John Ferlan
If virDomainHostdevSubsysSCSIiSCSIDefParseXML processing finds a duplicated structure, we should error out rather than continue. Signed-off-by: John Ferlan --- src/conf/domain_conf.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index

[libvirt] [PATCH v3 8/8] util: Introduce VIR_DEFINE_AUTOPTR_FUNC for virStorageSource

2019-02-12 Thread John Ferlan
Let's make use of the auto __cleanup capabilities cleaning up any now unnecessary goto paths. Signed-off-by: John Ferlan Reviewed-by: Ján Tomko --- src/conf/domain_conf.c| 3 +- src/qemu/qemu_domain.c| 3 +- src/qemu/qemu_driver.c| 9 +-

[libvirt] [PATCH v3 5/8] tests: Fix memory leak in testCompareXMLToArgvFiles

2019-02-12 Thread John Ferlan
Only one path will consume the @def; otherwise, we need to free it. Signed-off-by: John Ferlan --- tests/storagepoolxml2argvtest.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/storagepoolxml2argvtest.c b/tests/storagepoolxml2argvtest.c index

[libvirt] [PATCH v3 3/8] storage: Rework ret logic in storageBackendUpdateVolTargetInfo

2019-02-12 Thread John Ferlan
Rather than overload @ret with trying serve multiple purposes, let's initialize @ret to -1 and introduce an @rc function return value that can be used for functions that may return -1 or -2 and only override @ret when rc < 0. Signed-off-by: John Ferlan --- src/storage/storage_util.c | 30

[libvirt] [PATCH v3 1/8] storage: Cleanup virStorageFileBackendGlusterReadlinkCallback

2019-02-12 Thread John Ferlan
Rather than having two exit paths, let's use a @retval value and VIR_STEAL_PTR in order to unite the exit path through the error label. Signed-off-by: John Ferlan --- src/storage/storage_file_gluster.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git

Re: [libvirt] [PATCH v2 2/2] qemu: implement debugcon-isa chardev

2019-02-12 Thread Nikolay Shirokovskiy
On 11.02.2019 20:23, Andrea Bolognani wrote: > On Mon, 2019-02-11 at 08:53 +, Nikolay Shirokovskiy wrote: >> On 08.02.2019 18:02, Andrea Bolognani wrote: >>> On Thu, 2019-02-07 at 14:31 +0300, Nikolay Shirokovskiy wrote: >>> [...] @@ -393,9 +393,11 @@

Re: [libvirt] [PATCH 0/4] virsh: iothreadinfo fixes

2019-02-12 Thread John Ferlan
On 2/12/19 6:06 AM, Ján Tomko wrote: > Ján Tomko (4): > virsh: reduce the optimism in cmdIOThreadInfo > virsh: do not assign negative values to niothreads > virsh: remove redundant virshNodeGetCPUCount > virsh: initialize info in cmdIOThreadInfo > > tools/virsh-domain.c | 19

Re: [libvirt] [PATCH v3 02/17] qemu: capabilities: Add virtio/vhost {non-}transitional

2019-02-12 Thread Andrea Bolognani
On Fri, 2019-02-08 at 17:11 -0500, Cole Robinson wrote: [...] > +++ b/src/qemu/qemu_capabilities.h > @@ -505,6 +505,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for > syntax-check */ > QEMU_CAPS_OBJECT_MEMORY_FILE_PMEM, /* -object memory-backend-file,pmem= > */ >

Re: [libvirt] [PATCH] qemu: do not format in qemu caps XML

2019-02-12 Thread Jiri Denemark
On Fri, Feb 08, 2019 at 17:51:30 +0100, Ján Tomko wrote: > Since commit a7424faff QMP is always used. > > Also, commit 932534e8 removed the last use of this apart from: > * parsing/formatting this in the caps cache > * using it as a temporary variable to know when to report an error > >

Re: [libvirt] [PATCH 9/9] virsh: allow empty targets in cmdDomFSInfo

2019-02-12 Thread Ján Tomko
On Tue, Feb 12, 2019 at 01:17:25PM +0100, Michal Privoznik wrote: On 2/12/19 10:21 AM, Ján Tomko wrote: Ever since the introduction of the guest-get-fsinfo command in QEMU commit 46d4c572 qga/qapi-schema.json says that the 'disks' array can possibly be empty. For example when getting the target

Re: [libvirt] [PATCH 9/9] virsh: allow empty targets in cmdDomFSInfo

2019-02-12 Thread Michal Privoznik
On 2/12/19 10:21 AM, Ján Tomko wrote: Ever since the introduction of the guest-get-fsinfo command in QEMU commit 46d4c572 qga/qapi-schema.json says that the 'disks' array can possibly be empty. For example when getting the target list is unsupported:

Re: [libvirt] [PATCH 0/9] virsh domfsinfo fixes

2019-02-12 Thread Michal Privoznik
On 2/12/19 10:21 AM, Ján Tomko wrote: Fix a crash and other issues: https://bugzilla.redhat.com/show_bug.cgi?id=1676354 Ján Tomko (9): vshtabletest: indent strings with expected output vsh-table: allow empty columns virsh: introduce ninfos variable in cmdDomFSInfo virsh: rename ret

[libvirt] [PATCH 2/4] virsh: do not assign negative values to niothreads

2019-02-12 Thread Ján Tomko
Use a temporary 'rc' variable to avoid comparing signed and unsigned integers in the cleanup section. Bug introduced by commit 3072ded which added the comparison against the unsigned 'i'. Also make niothreads size_t to mark that it should be unsigned. Signed-off-by: Ján Tomko ---

[libvirt] [PATCH 3/4] virsh: remove redundant virshNodeGetCPUCount

2019-02-12 Thread Ján Tomko
Since commit 4c4b821e it is not used for anything. Signed-off-by: Ján Tomko --- tools/virsh-domain.c | 5 - 1 file changed, 5 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 17dd992751..516b647401 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@

[libvirt] [PATCH 4/4] virsh: initialize info in cmdIOThreadInfo

2019-02-12 Thread Ján Tomko
Although it is not needed at the moment, do not rely on a value being set before the first jump to cleanup. Signed-off-by: Ján Tomko --- tools/virsh-domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index

[libvirt] [PATCH 1/4] virsh: reduce the optimism in cmdIOThreadInfo

2019-02-12 Thread Ján Tomko
Instead of using niothreads which defaults to zero, use the common pattern with a ret varaible set to true just before the cleanup label. Signed-off-by: Ján Tomko --- tools/virsh-domain.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/virsh-domain.c

[libvirt] [PATCH 0/4] virsh: iothreadinfo fixes

2019-02-12 Thread Ján Tomko
Ján Tomko (4): virsh: reduce the optimism in cmdIOThreadInfo virsh: do not assign negative values to niothreads virsh: remove redundant virshNodeGetCPUCount virsh: initialize info in cmdIOThreadInfo tools/virsh-domain.c | 19 ++- 1 file changed, 10 insertions(+), 9

[libvirt] [PATCH 0/9] virsh domfsinfo fixes

2019-02-12 Thread Ján Tomko
Fix a crash and other issues: https://bugzilla.redhat.com/show_bug.cgi?id=1676354 Ján Tomko (9): vshtabletest: indent strings with expected output vsh-table: allow empty columns virsh: introduce ninfos variable in cmdDomFSInfo virsh: rename ret to rc in cmdDomFSInfo virsh: do not access

[libvirt] [PATCH 3/9] virsh: introduce ninfos variable in cmdDomFSInfo

2019-02-12 Thread Ján Tomko
Do not use 'ret' throughout the whole function to avoid confusion and comparison of unsigned 'i' against signed 'ret'. Signed-off-by: Ján Tomko --- tools/virsh-domain.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index

[libvirt] [PATCH 8/9] virsh: use virBufferTrim in cmdDomFSInfo

2019-02-12 Thread Ján Tomko
Add comma after every string and trim the final one. Signed-off-by: Ján Tomko --- tools/virsh-domain.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index d21e77ce75..6124126576 100644 --- a/tools/virsh-domain.c +++

[libvirt] [PATCH 9/9] virsh: allow empty targets in cmdDomFSInfo

2019-02-12 Thread Ján Tomko
Ever since the introduction of the guest-get-fsinfo command in QEMU commit 46d4c572 qga/qapi-schema.json says that the 'disks' array can possibly be empty. For example when getting the target list is unsupported: https://bugzilla.redhat.com/show_bug.cgi?id=1567041 Pass an empty string instead of

[libvirt] [PATCH 2/9] vsh-table: allow empty columns

2019-02-12 Thread Ján Tomko
Trivially implement this by deleting the bogus check in vshTableSafeEncode. Now it returns an empty string for an empty string instead of returning NULL without setting an error. Signed-off-by: Ján Tomko --- tests/vshtabletest.c | 4 +++- tools/vsh-table.c| 3 --- 2 files changed, 3

  1   2   >