Re: [libvirt] [PATCH v2 05/15] vbox: Cleanup vboxAttachDrives implementation

2017-11-03 Thread John Ferlan
On 11/03/2017 12:19 PM, Dawid Zamirski wrote: > On Fri, 2017-11-03 at 09:43 -0400, John Ferlan wrote: >> >> On 10/24/2017 03:35 PM, Dawid Zamirski wrote: >>> This commit primes vboxAttachDrives for further changes so when >>> they >>> are made, the diff is less noisy: >>> >>> * move variable decl

Re: [libvirt] How to best handle the reoccurring of rom changes breaking cross version migrations?

2017-11-03 Thread Philipp Hahn
Hello Am 03.11.2017 um 08:30 schrieb Christian Ehrhardt: > On Thu, Nov 2, 2017 at 4:34 PM, Daniel P. Berrange > wrote: >> >> On Thu, Nov 02, 2017 at 04:14:06PM +0100, Christian Ehrhardt wrote: >>> Ping - since there wasn't any reply so far - any best practices one could >>> share? >>> >>> Let me

Re: [libvirt] [PATCH v2 10/15] vbox: Process element in domain XML

2017-11-03 Thread Dawid Zamirski
On Fri, 2017-11-03 at 09:51 -0400, John Ferlan wrote: > > On 10/24/2017 03:35 PM, Dawid Zamirski wrote: > > > > +case VIR_DOMAIN_CONTROLLER_TYPE_SCSI: > > +VBOX_UTF8_TO_UTF16(VBOX_CONTROLLER_SCSI_NAME, > > &controllerName); > > +vboxBusType = StorageBus_SCSI; > > + > > +

Re: [libvirt] [PATCH v2 05/15] vbox: Cleanup vboxAttachDrives implementation

2017-11-03 Thread Dawid Zamirski
On Fri, 2017-11-03 at 09:43 -0400, John Ferlan wrote: > > On 10/24/2017 03:35 PM, Dawid Zamirski wrote: > > This commit primes vboxAttachDrives for further changes so when > > they > > are made, the diff is less noisy: > > > > * move variable declarations to the top of the function > > * add disk

Re: [libvirt] [PATCH v2 10/15] vbox: Process element in domain XML

2017-11-03 Thread Dawid Zamirski
On Fri, 2017-11-03 at 09:51 -0400, John Ferlan wrote: > > On 10/24/2017 03:35 PM, Dawid Zamirski wrote: > > This patch enables the VBOX driver to process the > > element > > in domain XML through which one can now customize the controller > > model. > > > > Since VirtualBox has two distinct SAS

[libvirt] [PATCH 00/12] qemu: Fully populate JSON formatters for the protocol layer (blockdev-add saga)

2017-11-03 Thread Peter Krempa
This adds the missing formatters for JSON properties for the storage. John Ferlan (1): qemu: block: Add JSON props generator for iSCSI protocol This patch was stolen from the iSCSI saga and fixed, since the formatter did not format the port number into the portal string. Peter Krempa (11): q

[libvirt] [PATCH 08/12] qemu: block: Add JSON props generator for RBD storage backing

2017-11-03 Thread Peter Krempa
--- src/qemu/qemu_block.c | 74 +++ 1 file changed, 74 insertions(+) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index 451d04694..8a1ce8262 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -593,6 +593,47 @@ qemuBlock

[libvirt] [PATCH 03/12] storage: Don't store leading '/' in image name when splitting out volume

2017-11-03 Thread Peter Krempa
Libvirt historically stores storage source path including the volume as one string in the XML, but that is not really flexible enough when dealing with the fields in the code. Previously we'd store the slash separating the two as part of the image name. This was fine for gluster but it's not necess

[libvirt] [PATCH 05/12] qemu: block: Add JSON props generator for 'curl' based storage backends

2017-11-03 Thread Peter Krempa
QEMU uses curl for accessing files using http(s) and ftp(s). They share common options so let's generate them in one helper. --- src/qemu/qemu_block.c | 63 +++ 1 file changed, 59 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_block.c b/sr

[libvirt] [PATCH 11/12] qemu: block: Add node-names to JSON backing storage strings

2017-11-03 Thread Peter Krempa
Format out the node-name if it was assigned for JSON-based storage specification. --- src/qemu/qemu_block.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index 6f6d294bf..6df0dc0fb 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block

[libvirt] [PATCH 07/12] qemu: block: Add JSON props generator for NBD storage backing

2017-11-03 Thread Peter Krempa
--- src/qemu/qemu_block.c | 32 1 file changed, 32 insertions(+) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index 4e588c724..451d04694 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -767,6 +767,34 @@ qemuBlockStorageSourceGetISCS

[libvirt] [PATCH 12/12] tests: Add testing of storage backend JSON props formatter

2017-11-03 Thread Peter Krempa
Add a new test program called 'qemublocktest' to test the block layer related stuff and test storage source to JSON generator by comparing it to the JSON parser. --- tests/Makefile.am | 14 +++- tests/qemublocktest.c | 189 ++ 2 files changed, 2

[libvirt] [PATCH 09/12] qemu: block: Add JSON props generator for sheepdog storage backing

2017-11-03 Thread Peter Krempa
--- src/qemu/qemu_block.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index 8a1ce8262..5f28c4dd6 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -865,6 +865,33 @@ qemuBlockStorageSourceGetRBDPr

[libvirt] [PATCH 01/12] qemu: block: Use proper type for servers for VxHS disks

2017-11-03 Thread Peter Krempa
Original implementation used 'SocketAddress' equivalent from qemu for the disk server field, while qemu documentation specifies 'InetSocketAddress'. The backing store parser uses the correct parsing function but the formatter used the incorrect one (and also with the legacy mode enabled which was w

[libvirt] [PATCH 04/12] storage: Store RBD image name as pool and image name

2017-11-03 Thread Peter Krempa
Similarly to how we store gluster names, split the name into a pool and image portions when paring the XML and store them separately. --- src/conf/domain_conf.c | 13 +++-- src/libxl/libxl_conf.c | 2 +- src/qemu/qemu_command.c

[libvirt] [PATCH 06/12] qemu: block: Add JSON props generator for iSCSI protocol

2017-11-03 Thread Peter Krempa
From: John Ferlan --- src/qemu/qemu_block.c | 70 ++- 1 file changed, 69 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index dedb92fd5..4e588c724 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_bloc

[libvirt] [PATCH 02/12] qemu: process: Split out useful parts from qemuBuildNetworkDriveURI

2017-11-03 Thread Peter Krempa
Extract the part formatting the basic URI part so that it can be reused to format JSON backing definitions. Parts specific to the command line format will remain in qemuBuildNetworkDriveURI. The new function is called qemuBlockStorageSourceGetURI. --- src/qemu/qemu_block.c | 58 +

[libvirt] [PATCH 10/12] qemu: block: Add JSON props generator for ssh storage backing

2017-11-03 Thread Peter Krempa
--- src/qemu/qemu_block.c | 36 1 file changed, 36 insertions(+) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index 5f28c4dd6..6f6d294bf 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -892,6 +892,38 @@ qemuBlockStorageSourceGet

[libvirt] [REPOST PATCH v6 8/8] docs: Add news article to describe iSCSI usage of secret object

2017-11-03 Thread John Ferlan
Signed-off-by: John Ferlan --- docs/news.xml | 10 ++ 1 file changed, 10 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 1de7898c80..0a09aeba30 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -52,6 +52,16 @@ + + + Securely pass iS

[libvirt] [REPOST PATCH v6 0/8] Use secret objects to pass iSCSI passwords

2017-11-03 Thread John Ferlan
Reposting after 3.9.0 release and refresh to current HEAD. Had to move the news.xml into the 3.10.0 section as well and address a couple of merge conflicts. Original: https://www.redhat.com/archives/libvir-list/2017-October/msg01012.html Copy of Original cover letter: v5: https://www.redhat.com/

[libvirt] [REPOST PATCH v6 4/8] qemu: Refactor qemuBuildSCSIiSCSIHostdevDrvStr slightly

2017-11-03 Thread John Ferlan
Rather than building the "file" string in qemuBuildSCSIHostdevDrvStr build it in the called helper. Signed-off-by: John Ferlan --- src/qemu/qemu_command.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 8e

[libvirt] [REPOST PATCH v6 6/8] qemu: Use secret objects to pass iSCSI passwords

2017-11-03 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1425757 The blockdev-add code provides a mechanism to sanely provide user and password-secret arguments for iscsi without placing them on the command line to be viewable by a 'ps -ef' type command or needing to create separate -iscsi devices for each dis

[libvirt] [REPOST PATCH v6 1/8] conf, qemu: Replace iscsisrc fields with virStorageSourcePtr

2017-11-03 Thread John Ferlan
Rather than picking apart the two pieces we need/want (path, hosts, and auth)- let's allocate/use a virStorageSourcePtr for iSCSI storage. The end result is that qemuBuildSCSIiSCSIHostdevDrvStr doesn't need to "fake" one for the qemuBuildNetworkDriveStr call. Signed-off-by: John Ferlan --- src/

[libvirt] [REPOST PATCH v6 7/8] docs: Add news article regarding auth/encryption placement

2017-11-03 Thread John Ferlan
Signed-off-by: John Ferlan --- docs/news.xml | 13 + 1 file changed, 13 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index ef855d8958..1de7898c80 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -35,6 +35,19 @@ + + + conf: Move the auth

[libvirt] [REPOST PATCH v6 3/8] qemu: Remove private hostdev

2017-11-03 Thread John Ferlan
Since it's not longer used to shuttle the @secinfo, let's remove the private hostdev completely. Signed-off-by: John Ferlan --- src/conf/domain_conf.c| 12 ++-- src/conf/domain_conf.h| 4 +--- src/lxc/lxc_native.c | 2 +- src/qemu/qemu_domain.c| 44

[libvirt] [REPOST PATCH v6 5/8] qemu: Get capabilities to use iscsi password-secret argument

2017-11-03 Thread John Ferlan
Add the capability to use the blockdev-add query-qmp-schema option to find the 'password-secret' parameter that will allow the iSCSI code to use the master secret object to encrypt the secret for an and only need to provide the object id of the secret on the command line thus obsfuscating the passp

[libvirt] [REPOST PATCH v6 2/8] qemu: Use private storage source for iscsi instead of private hostdev

2017-11-03 Thread John Ferlan
Rather than placing/using privateData about secinfo in the hostdev, let's use the virStorageSource private data instead. Signed-off-by: John Ferlan --- src/qemu/qemu_command.c | 7 --- src/qemu/qemu_domain.c | 24 2 files changed, 20 insertions(+), 11 deletions(-)

Re: [libvirt] [PATCH v2 15/15] vbox: Generate disk address element in dumpxml

2017-11-03 Thread John Ferlan
On 10/24/2017 03:35 PM, Dawid Zamirski wrote: > This patch adds element to each device since device > names alone won't adequately reflect the storage device layout in the > VM. With this patch, the ouput produced by dumpxml will faithfully > reproduce the storage layout of the VM if used with

Re: [libvirt] [PATCH v2 14/15] vbox: Process empty removable disks in dumpxml

2017-11-03 Thread John Ferlan
On 10/24/2017 03:35 PM, Dawid Zamirski wrote: > Previously any removable storage device without media attached was > omitted from domain XML dump. They're still (rightfully) omitted in > snapshot XMl dump but need to be accounted properly to for the device XML > names to stay in 'sync' between

Re: [libvirt] [PATCH v2 13/15] vbox: Cleanup vboxDumpDisks implementation

2017-11-03 Thread John Ferlan
On 10/24/2017 03:35 PM, Dawid Zamirski wrote: > Primer the code for further changes: > > * move variable declarations to the top of the function > * group together free/release statements > * error check and report VBOX API calls used > --- > src/vbox/vbox_common.c | 188 >

Re: [libvirt] [PATCH v2 12/15] vbox: Correctly generate drive name in dumpxml

2017-11-03 Thread John Ferlan
On 10/24/2017 03:35 PM, Dawid Zamirski wrote: > If a VBOX VM has e.g. a SATA and SCSI disk attached, the XML generated > by dumpxml used to produce "sda" for both of those disks. This is an > invalid domain XML as libvirt does not allow duplicate device names. To > address this, keep the running

Re: [libvirt] [PATCH v2 11/15] vbox: Add vboxDumpStorageControllers

2017-11-03 Thread John Ferlan
On 10/24/2017 03:35 PM, Dawid Zamirski wrote: > --- > src/vbox/vbox_common.c | 119 > + > 1 file changed, 119 insertions(+) > > diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c > index 9d45e4a76..715eb670e 100644 > --- a/src/vbox/vbox

Re: [libvirt] [PATCH v2 10/15] vbox: Process element in domain XML

2017-11-03 Thread John Ferlan
On 10/24/2017 03:35 PM, Dawid Zamirski wrote: > This patch enables the VBOX driver to process the element > in domain XML through which one can now customize the controller model. > > Since VirtualBox has two distinct SAS and SCSI they do not "map" > directly to libvirt XML, he VBOX driver uses

Re: [libvirt] [PATCH] cpu_map: Add cqm alternative name for cmt

2017-11-03 Thread Kashyap Chamarthy
On Thu, Nov 02, 2017 at 08:29:44PM +0100, Jiri Denemark wrote: > Linux kernel shows our "cmt" feature as "cqm". Let's mention the name in > the cpu_map.xml to make it easier to find. Thanks! Wasted a few hours looking for the wrong flag the other day. > Signed-off-by: Jiri Denemark > --- > src

Re: [libvirt] [PATCH v2 09/15] domain: Allow 'model' attribute for ide controller

2017-11-03 Thread John Ferlan
On 10/24/2017 03:35 PM, Dawid Zamirski wrote: > The optional values are 'piix3', 'piix4' or 'ich6'. Those will be > needed to allow setting IDE controller model in VirtualBox driver. > --- > docs/formatdomain.html.in | 4 > docs/schemas/domaincommon.rng | 18 -- > src/c

Re: [libvirt] [PATCH v2 08/15] vbox: Add more IStorageController API mappings

2017-11-03 Thread John Ferlan
On 10/24/2017 03:35 PM, Dawid Zamirski wrote: > This patch exposes additional methods of the native VBOX API to the > libvirt 'unified' vbox API to deal with IStorageController. The exposed > methods are: > > * IStorageController->GetStorageControllerType() > * IStorageController->SetStorageCont

Re: [libvirt] [PATCH v2 05/15] vbox: Cleanup vboxAttachDrives implementation

2017-11-03 Thread John Ferlan
On 10/24/2017 03:35 PM, Dawid Zamirski wrote: > This commit primes vboxAttachDrives for further changes so when they > are made, the diff is less noisy: > > * move variable declarations to the top of the function > * add disk variable to replace all the def->disks[i] instances > * add cleanup at

Re: [libvirt] [PATCH v2 07/15] vbox: Support empty removable drives.

2017-11-03 Thread John Ferlan
On 10/24/2017 03:35 PM, Dawid Zamirski wrote: > Original code was checking for non empty disk source before proceeding > to actually attach disk device to VM. This prevented from creating > empty removable devices like DVD or floppy. Therefore, this patch > re-organizes the loop work-flow to allo

Re: [libvirt] [PATCH v2 04/15] vbox: vboxAttachDrives now relies on address info

2017-11-03 Thread John Ferlan
On 10/24/2017 03:35 PM, Dawid Zamirski wrote: > Previously, the driver was computing VBOX's devicePort/deviceSlot values > based on device name and max port/slot values. While this worked, it > completely ignored values. Additionally, libvirt's built-in > virDomainDiskDefAssignAddress already do

Re: [libvirt] [PATCH v2 06/15] vbox: Errors in vboxAttachDrives are now critical

2017-11-03 Thread John Ferlan
On 10/24/2017 03:35 PM, Dawid Zamirski wrote: > Previously, if one tried to define a VBOX VM and the API failed to > perform the requested actions for some reason, it would just log the > error and move on to process remaining disk definitions. This is not > desired as it could result in incorrec

Re: [libvirt] [PATCH v2 03/15] vbox: Cleanup partially-defined VM on failure

2017-11-03 Thread John Ferlan
On 10/24/2017 03:35 PM, Dawid Zamirski wrote: > Since the VBOX API requires to register an initial VM before proceeding > to attach any remaining devices to it, any failure to attach such > devices should result in automatic cleanup of the initially registered > VM so that the state of VBOX regis

Re: [libvirt] [PATCH 0/9] qemu: command: -drive formatting cleanups (blockdev-add saga)

2017-11-03 Thread Ján Tomko
On Fri, Nov 03, 2017 at 01:03:28PM +0100, Peter Krempa wrote: Kill some ugly code. Peter Krempa (9): util: Fix condition check in virDiskNameToIndex qemu: command: Remove dead code when formatting -drive qemu: command: Move disk index validation closer to usage qemu: command: Directly report

Re: [libvirt] [PATCH v2 02/15] vbox: Close media when undefining domains

2017-11-03 Thread John Ferlan
On 10/24/2017 03:35 PM, Dawid Zamirski wrote: > When registering a VM we call OpenMedium on each disk image which adds it > to vbox's global media registry. Therefore, we should make sure to call > Close when unregistering VM so we cleanup the media registry entries > after ourselves - this does

Re: [libvirt] [PATCH v2 01/15] vbox: Update ATTRIBUTE_UNUSED usage

2017-11-03 Thread John Ferlan
On 10/24/2017 03:35 PM, Dawid Zamirski wrote: > Since the removal of VBOX <= 3x, the function arguments are actually > used so they should not be marked with ATTRIBUTE_UNUSED anymore. > --- > src/vbox/vbox_tmpl.c | 49 +++-- > 1 file changed, 23 insert

Re: [libvirt] [PATCH 7/9] qemu: command: Refactor blkiotune checks to tolerate NULL qemuCaps

2017-11-03 Thread Ján Tomko
On Fri, Nov 03, 2017 at 01:03:35PM +0100, Peter Krempa wrote: To allow agregating the checks, refactor the code to check capabilities aggregating only if they were provided. --- src/qemu/qemu_command.c | 96 +++-- 1 file changed, 53 insertions(+), 43

Re: [libvirt] [PATCH 6/9] qemu: command: Merge checks from qemuBuildDriveStrValidate to qemuCheckDiskConfig

2017-11-03 Thread Ján Tomko
On Fri, Nov 03, 2017 at 01:03:34PM +0100, Peter Krempa wrote: Stash all the disk definition and capability checks into one function. --- src/qemu/qemu_command.c | 324 src/qemu/qemu_command.h | 3 +- src/qemu/qemu_driver.c | 2 +- 3 files changed

Re: [libvirt] [PATCH 4/9] qemu: command: Directly report bus type in qemuBuildDriveStrValidate

2017-11-03 Thread Ján Tomko
On Fri, Nov 03, 2017 at 01:03:32PM +0100, Peter Krempa wrote: All of the error message are already in a conditional block with known bus type. Inline the bus type rather than formatting it from a separate variable. --- src/qemu/qemu_command.c | 21 ++--- 1 file changed, 10 insertio

Re: [libvirt] [PATCH] conf: Don't inline virDomainNetTypeSharesHostView

2017-11-03 Thread Ján Tomko
On Thu, Nov 02, 2017 at 09:03:15PM +0100, Jiri Denemark wrote: When coverage build is enabled, gcc complains about it: In file included from qemu/qemu_agent.h:29:0, from qemu/qemu_driver.c:47: qemu/qemu_driver.c: In function 'qemuDomainSetInterfaceParameters': ./conf/domain_conf.

[libvirt] [PATCH 7/9] qemu: command: Refactor blkiotune checks to tolerate NULL qemuCaps

2017-11-03 Thread Peter Krempa
To allow agregating the checks, refactor the code to check capabilities only if they were provided. --- src/qemu/qemu_command.c | 96 +++-- 1 file changed, 53 insertions(+), 43 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c

[libvirt] [PATCH 8/9] qemu: command: Move blkiotune checks to qemuCheckDiskConfig

2017-11-03 Thread Peter Krempa
--- src/qemu/qemu_command.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index cfd9ef9e2..507401d3f 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -1220,6 +1220,9 @@ int qemuCheckDiskConfig(virDo

[libvirt] [PATCH 4/9] qemu: command: Directly report bus type in qemuBuildDriveStrValidate

2017-11-03 Thread Peter Krempa
All of the error message are already in a conditional block with known bus type. Inline the bus type rather than formatting it from a separate variable. --- src/qemu/qemu_command.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_command.c b

[libvirt] [PATCH 9/9] qemu: command: Move disk serial validation to checker function

2017-11-03 Thread Peter Krempa
--- src/qemu/qemu_command.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 507401d3f..1913bbf67 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -1428,6 +1428,10 @@ qemuCheckDiskConfig(virDomain

[libvirt] [PATCH 6/9] qemu: command: Merge checks from qemuBuildDriveStrValidate to qemuCheckDiskConfig

2017-11-03 Thread Peter Krempa
Stash all the disk definition and capability checks into one function. --- src/qemu/qemu_command.c | 324 src/qemu/qemu_command.h | 3 +- src/qemu/qemu_driver.c | 2 +- 3 files changed, 166 insertions(+), 163 deletions(-) diff --git a/src/qemu

[libvirt] [PATCH 5/9] qemu: command: Refactor qemuBuildDriveStrValidate to make qemuCaps optional

2017-11-03 Thread Peter Krempa
To allow merging this with other disk type checks we need to check qemuCaps only when available, since some of the checks are executed on disk cold-plug and thus capabilities should not be checked. Make the checks optional by making them conditional on qemuCaps not being NULL. --- src/qemu/qemu_c

[libvirt] [PATCH 3/9] qemu: command: Move disk index validation closer to usage

2017-11-03 Thread Peter Krempa
The disk index validation is used only in very specific cases and does not need to be performed otherwise. Move it out of the global check into the usage place. --- src/qemu/qemu_command.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/qemu/qemu_comman

[libvirt] [PATCH 2/9] qemu: command: Remove dead code when formatting -drive

2017-11-03 Thread Peter Krempa
busid and unitid are ever used only if the device is an SD card due to the check in qemuDiskBusNeedsDeviceArg. Since the SD card does not have an bus or unit number, most of the code and command line formatter can be removed since it will never be used. --- src/qemu/qemu_command.c | 37 +--

[libvirt] [PATCH 0/9] qemu: command: -drive formatting cleanups (blockdev-add saga)

2017-11-03 Thread Peter Krempa
Kill some ugly code. Peter Krempa (9): util: Fix condition check in virDiskNameToIndex qemu: command: Remove dead code when formatting -drive qemu: command: Move disk index validation closer to usage qemu: command: Directly report bus type in qemuBuildDriveStrValidate qemu: command: Refa

[libvirt] [PATCH 1/9] util: Fix condition check in virDiskNameToIndex

2017-11-03 Thread Peter Krempa
Use the more common '< 0' rather than the non-zero check. --- src/util/virutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virutil.c b/src/util/virutil.c index 170e92192..8bdcb02fd 100644 --- a/src/util/virutil.c +++ b/src/util/virutil.c @@ -562,7 +562,7 @@ int v

Re: [libvirt] [PATCH REPOST 0/8] Privatize _virStoragePoolObj and _virStorageVolDefList (Batch #3)

2017-11-03 Thread John Ferlan
ping^2, TKs, John On 10/19/2017 11:02 AM, John Ferlan wrote: > > ping? > > Tks - > > John > > On 10/06/2017 10:42 AM, John Ferlan wrote: >> Since the original series (19 patches): >> >> https://www.redhat.com/archives/libvir-list/2017-September/msg00594.html >> >> didn't garner any attention

Re: [libvirt] [PATCH 08/12] qemu: domain: Extract setup for disk source secrets

2017-11-03 Thread Peter Krempa
On Thu, Oct 26, 2017 at 11:12:08 -0400, John Ferlan wrote: > > > On 10/20/2017 09:47 AM, Peter Krempa wrote: > > Separate it so that it deals only with single virStorageSource, so that > > it can later be reused for full backing chain support. > > > > Two aliases are passed since authentication

Re: [libvirt] [PATCH v5 3/3] libvirtd: fix crash on termination

2017-11-03 Thread Nikolay Shirokovskiy
On 03.11.2017 11:42, Martin Kletzander wrote: > On Fri, Nov 03, 2017 at 11:07:36AM +0300, Nikolay Shirokovskiy wrote: >> On 02.11.2017 19:32, Martin Kletzander wrote: >>> This just makes the window of opportunity (between daemonServerClose() >>> and the actual removal of the virNetServerPtr from

[libvirt] [PATCH 2/2] apparmor, virt-aa-helper: allow ipv6

2017-11-03 Thread Christian Ehrhardt
In case ipv6 is used the network inet6 permission is required for virt-aa-helper. Signed-off-by: Christian Ehrhardt --- examples/apparmor/usr.lib.libvirt.virt-aa-helper | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/apparmor/usr.lib.libvirt.virt-aa-helper b/examples/apparmor/usr.l

[libvirt] [PATCH 0/2] Misc apparmor fixes

2017-11-03 Thread Christian Ehrhardt
Hi, here a few more apparmor fixes for your review. One is for an Ubuntu bug [1] which is non fatal, but denies a qemu fix to fully work. The other one I was carried in Ubuntu for some time and is related to ipv6 only setups where virt-aa-helper can fail if not permitted inet6. [1]: https://bugs.

[libvirt] [PATCH 1/2] apparmor: allow qemu to read max_segments

2017-11-03 Thread Christian Ehrhardt
Since qemu 2.9 via 9103f1ce "file-posix: Consider max_segments for BlockLimits.max_transfer" this is a new access that is denied by the qemu profile. It is non fatal, but prevents the fix mentioned to actually work. It should be safe to allow reading from that path. Since qemu opens a symlink pat

[libvirt] [PATCH] conf: Fix message when maximum vCPU count is less than current

2017-11-03 Thread Peter Krempa
Reword the message and drop the numbers (which were reversed) from it so that it actually makes sense. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1509151 --- src/conf/domain_conf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/conf/domain_conf.c b/src/co

Re: [libvirt] [PATCH v5 3/3] libvirtd: fix crash on termination

2017-11-03 Thread Martin Kletzander
On Fri, Nov 03, 2017 at 11:07:36AM +0300, Nikolay Shirokovskiy wrote: On 02.11.2017 19:32, Martin Kletzander wrote: This just makes the window of opportunity (between daemonServerClose() and the actual removal of the virNetServerPtr from the hash) smaller. That's why I don't see it as a fix, rat

Re: [libvirt] [PATCH v5 3/3] libvirtd: fix crash on termination

2017-11-03 Thread Nikolay Shirokovskiy
On 02.11.2017 19:32, Martin Kletzander wrote: > On Thu, Nov 02, 2017 at 10:49:35AM +0300, Nikolay Shirokovskiy wrote: >> >> >> On 01.11.2017 21:51, John Ferlan wrote: >>> >>> >>> On 10/31/2017 02:54 AM, Nikolay Shirokovskiy wrote: On 30.10.2017 19:21, Martin Kletzander wrote: >

Re: [libvirt] How to best handle the reoccurring of rom changes breaking cross version migrations?

2017-11-03 Thread Christian Ehrhardt
On Thu, Nov 2, 2017 at 4:34 PM, Daniel P. Berrange wrote: > > On Thu, Nov 02, 2017 at 04:14:06PM +0100, Christian Ehrhardt wrote: > > Ping - since there wasn't any reply so far - any best practices one could > > share? > > > > Let me add a TL;DR: > > - bump of ipxe rom versions change the size of