]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
6 years agoqemu: process: Handle all failure values for dimms in qemuProcessHandleAcpiOstInfo
Peter Krempa [Tue, 22 Jan 2019 11:14:39 +0000 (12:14 +0100)]
qemu: process: Handle all failure values for dimms in qemuProcessHandleAcpiOstInfo

Hanlde all the possible failure codes as per ACPI standard documented in
the function header.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1660410

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agoqemu: process: Improve documentation of values handled by qemuProcessHandleAcpiOstInfo
Peter Krempa [Tue, 22 Jan 2019 09:35:53 +0000 (10:35 +0100)]
qemu: process: Improve documentation of values handled by qemuProcessHandleAcpiOstInfo

We forgot to document the specific fields for the 0x103 and 0x200
sources which are tied to device removal and device hotplug
respectively.

The value description is based on the ACPI 6.2A standard Table 6-207 and
Table 6-208. At the time of writing of this patch the standard can be
accessed e.g. at:

https://www.uefi.org/sites/default/files/resources/ACPI%206_2_A_Sept29.pdf

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agoutil: Fixing invalid error checking from virPCIGetNetname()
Radoslaw Biernacki [Tue, 22 Jan 2019 19:26:15 +0000 (12:26 -0700)]
util: Fixing invalid error checking from virPCIGetNetname()

The @linkdev is In/Out function parameter as second order
reference pointer so requires first order dereference for
checking NULL which can be the result of virPCIGetNetName().

Fixes: d6ee56d7237 (util: change virPCIGetNetName() to not return error if device has no net name)
Signed-off-by: Radoslaw Biernacki <radoslaw.biernacki@linaro.org>
Signed-off-by: dann frazier <dann.frazier@canonical.com>
6 years agoutil: Fix for NULL dereference
Radoslaw Biernacki [Tue, 22 Jan 2019 19:26:14 +0000 (12:26 -0700)]
util: Fix for NULL dereference

The device xml parser code does not set "model" while parsing the
following XML:

  <interface type='hostdev'>
    <source>
      <address type='pci' domain='0x0002' bus='0x01' slot='0x00' function='0x2'/>
    </source>
  </interface>

The net->model can be NULL and therefore must be compared using
STREQ_NULLABLE instead of plain STREQ.

Fixes: ac47e4a6225 (qemu: replace "def->nets[i]" with "net" and "def->sounds[i]" with "sound")
Fixes: c7fc151eec7 (qemu: assign virtio devices to PCIe slot when appropriate)
Signed-off-by: Radoslaw Biernacki <radoslaw.biernacki@linaro.org>
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
6 years agoutil: Code simplification
Radoslaw Biernacki [Tue, 22 Jan 2019 19:26:13 +0000 (12:26 -0700)]
util: Code simplification

Removing redundant sections of the code

Signed-off-by: Radoslaw Biernacki <radoslaw.biernacki@linaro.org>
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
6 years agoutil: fixing wrong assumption that PF has to have netdev assigned
Radoslaw Biernacki [Tue, 22 Jan 2019 19:26:12 +0000 (12:26 -0700)]
util: fixing wrong assumption that PF has to have netdev assigned

libvirt wrongly assumes that VF netdev has to have the
netdev assigned to PF. There is no such requirement in SRIOV standard.
This patch change the virNetDevSwitchdevFeature() function to deal
with SRIOV devices which does not have netdev on PF. Also corrects
one comment about PF netdev assumption.

One example of such devices is ThunderX VNIC.
By applying this change, VF device is used for virNetlinkCommand() as
it is the only netdev assigned to VNIC.

Signed-off-by: Radoslaw Biernacki <radoslaw.biernacki@linaro.org>
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
6 years agovirt-aa-helper: generate rules for gl enabled graphics devices
Christian Ehrhardt [Mon, 14 Jan 2019 13:15:06 +0000 (15:15 +0200)]
virt-aa-helper: generate rules for gl enabled graphics devices

This adds the virt-aa-helper support for gl enabled graphics devices to
generate rules for the needed rendernode paths.

Example in domain xml:
<graphics type='spice'>
  <gl enable='yes' rendernode='/dev/dri/bar'/>
</graphics>

results in:
  "/dev/dri/bar" rw,

Special cases are:
- multiple devices with rendernodes -> all are added
- non explicit rendernodes -> follow recently added virHostGetDRMRenderNode
- rendernode without opengl (in egl-headless for example) -> still add
  the node

Fixes: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1757085
Reviewed-by: Erik Skultety <eskultet@redhat.com>
Acked-by: Jamie Strandboge <jamie@canonical.com>
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
6 years agoqemu: error out when vnc vncTLSx509secretUUID is unsupported
Ján Tomko [Tue, 15 Jan 2019 12:55:28 +0000 (13:55 +0100)]
qemu: error out when vnc vncTLSx509secretUUID is unsupported

Add a capability check to qemuDomainDefValidate and refuse to start
a domain with VNC graphics if the TLS secret was set in qemu.conf
and it's not supported.

Note that qemuDomainSecretGraphicsPrepare does not generate any
secret data if the capability is not present and qemuBuildTLSx509BackendProps
is not called at all.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoqemu: add support for encrypted VNC TLS keys
Ján Tomko [Mon, 14 Jan 2019 13:20:01 +0000 (14:20 +0100)]
qemu: add support for encrypted VNC TLS keys

Use the password stored in the secret driver under
the uuid specified by the vnc_tls_x509_secret_uuid
option in qemu.conf.

https://bugzilla.redhat.com/show_bug.cgi?id=1602418

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoqemu.conf: add vnc_tls_x509_secret_uuid
Ján Tomko [Mon, 14 Jan 2019 23:09:23 +0000 (00:09 +0100)]
qemu.conf: add vnc_tls_x509_secret_uuid

Add an option that lets the user specify the secret
that unlocks the server TLS key.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoqemu_process: fix debug message
Ján Tomko [Mon, 14 Jan 2019 13:24:39 +0000 (14:24 +0100)]
qemu_process: fix debug message

Be generic instead of trying to enumerate all the involved
device types.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoqemu: prepare secret for the graphics upfront
Ján Tomko [Mon, 14 Jan 2019 13:24:27 +0000 (14:24 +0100)]
qemu: prepare secret for the graphics upfront

Instead of hardcoding the TLS creds alias in
qemuBuildGraphicsVNCCommandLine, store it
in the domain private data.

Given that we only support one VNC graphics
and thus have only one alias per-domain,
this is overengineered, but it will allow us
to prepare the secret upfront when we start
supporting encrypted server TLS keys.

Note that the alias is not formatted anywhere
since we won't need to access it after domain
startup.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoqemu: add qemuDomainGraphicsPrivate data with a tlsAlias
Ján Tomko [Thu, 10 Jan 2019 14:50:11 +0000 (15:50 +0100)]
qemu: add qemuDomainGraphicsPrivate data with a tlsAlias

Also introduce the necessary callbacks.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoconf: add privateData to virDomainGraphicsDef
Ján Tomko [Thu, 10 Jan 2019 15:34:00 +0000 (16:34 +0100)]
conf: add privateData to virDomainGraphicsDef

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoconf: introduce virDomainGraphicsNew
Ján Tomko [Thu, 10 Jan 2019 14:34:06 +0000 (15:34 +0100)]
conf: introduce virDomainGraphicsNew

A helper function for allocating the virDomainGraphicsDef structure.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agorpm spec: remove %{extra_release} from spec
Daniel P. Berrangé [Mon, 21 Jan 2019 12:55:15 +0000 (12:55 +0000)]
rpm spec: remove %{extra_release} from spec

The %{extra_release} field was previously populated by data from the old
autobuild.sh file but is no longer used.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agotests: Add capabilities data for QEMU 4.0.0 x86_64
Cole Robinson [Fri, 11 Jan 2019 19:27:51 +0000 (14:27 -0500)]
tests: Add capabilities data for QEMU 4.0.0 x86_64

The next release of QEMU is going to be 4.0.0. A bit early, but
this adds capabilities data for x86_64 from current qemu git
15bede554162dda822cd762c689edb6fa32b6e3b

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
6 years agodocs: use JavaScript based PolicyKit .rules files
Mark McLoughlin [Wed, 16 Jan 2019 11:45:09 +0000 (11:45 +0000)]
docs: use JavaScript based PolicyKit .rules files

PolicyKit authentication rules have switched to a JavaScript based
format quite some time ago. See:

http://davidz25.blogspot.com/2012/06/authorization-rules-in-polkit.html

While backwards compat for the old .pkla format is still available, it
makes sense to point people first at the new format.

The SSHPolicyKitSetup wiki page seems pretty stale, so remove the
reference to it.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
6 years agovirQEMUDriverConfigLoadSWTPMEntry: use VIR_AUTOFREE
Ján Tomko [Mon, 21 Jan 2019 13:48:18 +0000 (14:48 +0100)]
virQEMUDriverConfigLoadSWTPMEntry: use VIR_AUTOFREE

Switch the function to use VIR_AUTOFREE and VIR_AUTOPTR macros
to get rid of the cleanup section.

Requested-by: John Ferlan <jferlan@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
6 years agovirQEMUDriverConfigLoadSecurityEntry: use VIR_AUTOFREE
Ján Tomko [Mon, 21 Jan 2019 13:48:18 +0000 (14:48 +0100)]
virQEMUDriverConfigLoadSecurityEntry: use VIR_AUTOFREE

Switch the function to use VIR_AUTOFREE and VIR_AUTOPTR macros
to get rid of the cleanup section.

Requested-by: John Ferlan <jferlan@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
6 years agovirQEMUDriverConfigLoadNVRAMEntry: use VIR_AUTOFREE
Ján Tomko [Mon, 21 Jan 2019 13:48:18 +0000 (14:48 +0100)]
virQEMUDriverConfigLoadNVRAMEntry: use VIR_AUTOFREE

Switch the function to use VIR_AUTOFREE and VIR_AUTOPTR macros
to get rid of the cleanup section.

Requested-by: John Ferlan <jferlan@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
6 years agovirQEMUDriverConfigLoadProcessEntry: use VIR_AUTOFREE
Ján Tomko [Mon, 21 Jan 2019 13:47:34 +0000 (14:47 +0100)]
virQEMUDriverConfigLoadProcessEntry: use VIR_AUTOFREE

Switch the function to use VIR_AUTOFREE and VIR_AUTOPTR macros
to get rid of the cleanup section.

Requested-by: John Ferlan <jferlan@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
6 years agoqemu: command: Don't format image properties for empty -drive
Peter Krempa [Tue, 15 Jan 2019 16:28:21 +0000 (17:28 +0100)]
qemu: command: Don't format image properties for empty -drive

If a -drive has no image, using image properties makes qemu whine that
they should not be used.

This patch stops formating cache/readonly/... for empty drives
for the pre-blockdev syntax. Unfortunately those parameters can't be
added later when inserting media, but on the other hand qemu will start
with an empty drive.

Since we already were able to start a VM with such config previously due
to qemu ignoring them I've opted just to skip formatting them.
Additionally with -blockdev support it will work as expected as the
image properties will be formatted when adding the image itself which is
not possible without it.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1651457

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agotests: qemuxml2argv: Add test case for empty CDROM with cache mode
Peter Krempa [Tue, 15 Jan 2019 16:44:43 +0000 (17:44 +0100)]
tests: qemuxml2argv: Add test case for empty CDROM with cache mode

Upcomming change will influence CDROM with cache mode so add a test
case.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agorpm spec: don't assume %{fedora} exists as a macro
Daniel P. Berrangé [Mon, 21 Jan 2019 14:05:13 +0000 (14:05 +0000)]
rpm spec: don't assume %{fedora} exists as a macro

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agoconfig-post: Remove duplicated 'undef WITH_CAPNG'
Radostin Stoyanov [Mon, 21 Jan 2019 13:07:14 +0000 (13:07 +0000)]
config-post: Remove duplicated 'undef WITH_CAPNG'

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
6 years agorpm spec: disable ceph on 32-bit architectures
Daniel P. Berrangé [Mon, 21 Jan 2019 12:20:14 +0000 (12:20 +0000)]
rpm spec: disable ceph on 32-bit architectures

Ceph in upstream and Fedora has dropped support for building on host
architectures which are 32-bit.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agoqemu: fix i6300esb watchdog hotplug on Q35
Laine Stump [Thu, 17 Jan 2019 20:05:54 +0000 (15:05 -0500)]
qemu: fix i6300esb watchdog hotplug on Q35

When commit 361c8dc17 added support for hotplugging the i6300esb
watchdog device (first in libvirt-3.9.0), it accidentally contstructed
the commandline for the device_add command before allocating a PCI
address for the device. With no PCI address specified in the command,
the watchdog would simply be placed at the lowest unused PCI slot.

On a 440fx guest, this doesn't cause a problem, because libvirt's PCI
address allocation algorithm would most likely give the same address
anyway (usually a slot on pci-root), so nobody noticed the omission of
address from the command.

But on a Q35 guest, the lowest unused PCI slot is on pcie-root, which
doesn't support hotplug; libvirt knows enough to assign a PCI address
that is on a pcie-to-pci-bridge (because its slots *do* support
hotplug), but qemu doesn't, so if there is no PCI address in the
command, qemu just tries to plug the new device into pcie-root, and
fails because it doesn't support hotplug, e.g.:

  error: Failed to attach device from watchdog.xml
  error: internal error: unable to execute QEMU command 'device_add':
  Bus 'pcie.0' does not support hotplugging

The solution is simply to build the command string after assigning a
PCI address, not before.

Resolves: https://bugzilla.redhat.com/1666559
Signed-off-by: Laine Stump <laine@laine.org>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoqemu: Assign device addresses earlier in qemuDomainAttachNetDevice
Wang Yechao [Mon, 17 Dec 2018 11:30:34 +0000 (19:30 +0800)]
qemu: Assign device addresses earlier in qemuDomainAttachNetDevice

If code in the @actualType switch needs to have/know which PCI
Address is being used, then we must assign it earlier. In particular
a vhost-user device needs to call qemuDomainSupportsNicdev which
requires an address to be defined.

Signed-off-by: Wang Yechao <wang.yechao255@zte.com.cn>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoqemu_conf: rename checkdefaultTLSx509certdir
Ján Tomko [Mon, 14 Jan 2019 22:57:12 +0000 (23:57 +0100)]
qemu_conf: rename checkdefaultTLSx509certdir

Use defaultTLSx509certdirPresent for consistencty.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoqemu_conf: split out virQEMUDriverConfigLoadDefaultTLSEntry
Ján Tomko [Mon, 14 Jan 2019 21:24:17 +0000 (22:24 +0100)]
qemu_conf: split out virQEMUDriverConfigLoadDefaultTLSEntry

Split out parts of the config parsing code to make
the parent function easier to read.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoqemu_conf: split out virQEMUDriverConfigLoadVNCEntry
Ján Tomko [Mon, 14 Jan 2019 21:15:40 +0000 (22:15 +0100)]
qemu_conf: split out virQEMUDriverConfigLoadVNCEntry

Split out parts of the config parsing code to make
the parent function easier to read.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoqemu_conf: split out virQEMUDriverConfigLoadNographicsEntry
Ján Tomko [Tue, 15 Jan 2019 09:23:06 +0000 (10:23 +0100)]
qemu_conf: split out virQEMUDriverConfigLoadNographicsEntry

Split out parts of the config parsing code to make
the parent function easier to read.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoqemu_conf: split out virQEMUDriverConfigLoadSPICEEntry
Ján Tomko [Tue, 15 Jan 2019 09:51:51 +0000 (10:51 +0100)]
qemu_conf: split out virQEMUDriverConfigLoadSPICEEntry

Split out parts of the config parsing code to make
the parent function easier to read.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoqemu_conf: split out virQEMUDriverConfigLoadSpecificTLS
Ján Tomko [Mon, 14 Jan 2019 21:03:05 +0000 (22:03 +0100)]
qemu_conf: split out virQEMUDriverConfigLoadSpecificTLS

Split out parts of the config parsing code to make
the parent function easier to read.

This is the only patch that mixes various augeas entry
groups in one function.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoqemu_conf: split out virQEMUDriverConfigLoadRemoteDisplayEntry
Ján Tomko [Mon, 14 Jan 2019 20:53:01 +0000 (21:53 +0100)]
qemu_conf: split out virQEMUDriverConfigLoadRemoteDisplayEntry

Split out parts of the config parsing code to make
the parent function easier to read.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoqemu_conf: split out virQEMUDriverConfigLoadSaveEntry
Ján Tomko [Tue, 15 Jan 2019 11:24:02 +0000 (12:24 +0100)]
qemu_conf: split out virQEMUDriverConfigLoadSaveEntry

Split out parts of the config parsing code to make
the parent function easier to read.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoqemu_conf: split out virQEMUDriverConfigLoadProcessEntry
Ján Tomko [Tue, 15 Jan 2019 11:35:59 +0000 (12:35 +0100)]
qemu_conf: split out virQEMUDriverConfigLoadProcessEntry

Split out parts of the config parsing code to make
the parent function easier to read.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoqemu_conf: split out virQEMUDriverConfigLoadDeviceEntry
Ján Tomko [Tue, 15 Jan 2019 11:33:26 +0000 (12:33 +0100)]
qemu_conf: split out virQEMUDriverConfigLoadDeviceEntry

Split out parts of the config parsing code to make
the parent function easier to read.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoqemu_conf: split out virQEMUDriverConfigLoadRPCEntry
Ján Tomko [Tue, 15 Jan 2019 11:33:07 +0000 (12:33 +0100)]
qemu_conf: split out virQEMUDriverConfigLoadRPCEntry

Split out parts of the config parsing code to make
the parent function easier to read.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoqemu_conf: split out virQEMUDriverConfigLoadNetworkEntry
Ján Tomko [Tue, 15 Jan 2019 11:32:40 +0000 (12:32 +0100)]
qemu_conf: split out virQEMUDriverConfigLoadNetworkEntry

Split out parts of the config parsing code to make
the parent function easier to read.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoqemu_conf: split out virQEMUDriverConfigLoadLogEntry
Ján Tomko [Tue, 15 Jan 2019 09:18:04 +0000 (10:18 +0100)]
qemu_conf: split out virQEMUDriverConfigLoadLogEntry

Split out parts of the config parsing code to make
the parent function easier to read.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoqemu_conf: split out virQEMUDriverConfigLoadNVRAMEntry
Ján Tomko [Tue, 15 Jan 2019 09:17:00 +0000 (10:17 +0100)]
qemu_conf: split out virQEMUDriverConfigLoadNVRAMEntry

Split out parts of the config parsing code to make
the parent function easier to read.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoqemu_conf: split out virQEMUDriverConfigLoadGlusterDebugEntry
Ján Tomko [Tue, 15 Jan 2019 09:14:44 +0000 (10:14 +0100)]
qemu_conf: split out virQEMUDriverConfigLoadGlusterDebugEntry

Split out parts of the config parsing code to make
the parent function easier to read.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoqemu_conf: split out virQEMUDriverConfigLoadSecurityEntry
Ján Tomko [Mon, 14 Jan 2019 20:28:57 +0000 (21:28 +0100)]
qemu_conf: split out virQEMUDriverConfigLoadSecurityEntry

Split out parts of the config parsing code to make
the parent function easier to read.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoqemu_conf: split out virQEMUDriverConfigLoadMemoryEntry
Ján Tomko [Tue, 15 Jan 2019 09:10:36 +0000 (10:10 +0100)]
qemu_conf: split out virQEMUDriverConfigLoadMemoryEntry

Split out parts of the config parsing code to make
the parent function easier to read.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoqemu_conf: split out virQEMUDriverConfigLoadSWTPMEntry
Ján Tomko [Mon, 14 Jan 2019 20:18:44 +0000 (21:18 +0100)]
qemu_conf: split out virQEMUDriverConfigLoadSWTPMEntry

Split out parts of the config parsing code to make
the parent function easier to read.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agorpc: virNetClientNew: fix socket leak on error path
Nikolay Shirokovskiy [Fri, 18 Jan 2019 08:10:41 +0000 (11:10 +0300)]
rpc: virNetClientNew: fix socket leak on error path

if virNetClientNew finishes with error before sock is set
to client object then sock does not get unrefed. This is
unexpected by function clients like virNetClientNewUNIX.
Let's make sure sock gets unrefed on any error path.

Next some clients like virNetClientNewLibSSH2 try to unref
sock on virNetClientNew errors. This is not correct even
before this patch because in some cases virNetClientNew
unrefed sock on error path by itself. Let's give up
sock managment to virNetClientNew entirely.

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agoqemu: process: Use enum belonging to correct type
Peter Krempa [Fri, 18 Jan 2019 07:39:40 +0000 (08:39 +0100)]
qemu: process: Use enum belonging to correct type

GCC was unhappy about comparison between two distinct enum types. Use
the correct value instead.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
6 years agoqemu: blockjob: Add job name into the data
Peter Krempa [Thu, 17 Jan 2019 16:01:55 +0000 (17:01 +0100)]
qemu: blockjob: Add job name into the data

Currently the job name corresponds to the disk the job belongs to. For
jobs which will not correspond to disks we'll need to track the name
separately.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agoqemu: blockjob: Convert qemuBlockJobSyncEndDisk to take job instead of disk
Peter Krempa [Tue, 27 Nov 2018 17:06:28 +0000 (18:06 +0100)]
qemu: blockjob: Convert qemuBlockJobSyncEndDisk to take job instead of disk

And rename it in accordance with the change.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agoqemu: migration: Don't call qemuBlockJobSyncEndDisk when block job has terminated
Peter Krempa [Tue, 27 Nov 2018 16:57:53 +0000 (17:57 +0100)]
qemu: migration: Don't call qemuBlockJobSyncEndDisk when block job has terminated

Now that the data is per-job, we don't really need to bother with
finishing the synchronous job handling if the job is already terminated.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agoqemu: Allocate diskPriv->blockjob only when there's a blockjob
Peter Krempa [Wed, 17 Oct 2018 15:22:38 +0000 (17:22 +0200)]
qemu: Allocate diskPriv->blockjob only when there's a blockjob

Rather than storing the presence of the blockjob in a flag we can bind
together the lifecycle of the job with the lifecycle of the object which
is tracking the data for it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agoqemu: blockjob: Pass job into qemuBlockJobUpdateDisk and rename it
Peter Krempa [Tue, 27 Nov 2018 12:55:28 +0000 (13:55 +0100)]
qemu: blockjob: Pass job into qemuBlockJobUpdateDisk and rename it

Instead of passing in the disk information, pass in the job and name the
function accordingly.

Few callers needed to be modified to have the job pointer handy.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agoqemu: blockjob: Consume new block job state in the processing function
Peter Krempa [Mon, 26 Nov 2018 14:29:55 +0000 (15:29 +0100)]
qemu: blockjob: Consume new block job state in the processing function

The processing function modifies the job state so it should make sure
that the variable holding the new state is cleared properly and not the
caller. The caller should only deal with the job state and not the
transition that happened.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agoqemu: blockjob: Remove error propagation from qemuBlockJobUpdateDisk
Peter Krempa [Tue, 4 Dec 2018 12:51:46 +0000 (13:51 +0100)]
qemu: blockjob: Remove error propagation from qemuBlockJobUpdateDisk

The job error can be safely accessed in the job structure, so we don't
need to propagate it through qemuBlockJobUpdateDisk.

Drop the propagation and refactor any caller that pased non-NULL error.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agoqemu: migration: Extract reporting of disk migration error
Peter Krempa [Mon, 26 Nov 2018 13:19:57 +0000 (14:19 +0100)]
qemu: migration: Extract reporting of disk migration error

The same message is reported in 3 distinct places. Move it out into a
single function.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agoqemu: blockjob: Track current state of blockjob
Peter Krempa [Thu, 17 Jan 2019 15:34:11 +0000 (16:34 +0100)]
qemu: blockjob: Track current state of blockjob

Add a field tracking the current state of job so that it can be queried
later. Until now the job state e.g. that the job is _READY for
finalizing was tracked only for mirror jobs. Add tracking of state for
all jobs.

Similarly to 'qemuBlockJobType' this maps the existing states of the
blockjob from virConnectDomainEventBlockJobStatus to
'qemuBlockJobState' so that we can track some internal states as well.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agoqemu: blockjob: Convert qemuBlockJobSyncBeginDisk to work with the job
Peter Krempa [Fri, 19 Oct 2018 07:14:54 +0000 (09:14 +0200)]
qemu: blockjob: Convert qemuBlockJobSyncBeginDisk to work with the job

Modify qemuBlockJobSyncBeginDisk to operate on qemuBlockt sJobDataPtr and
rename it accordingly.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agoqemu: blockjob: Pass in job to qemuBlockJobEventProcessLegacy
Peter Krempa [Fri, 23 Nov 2018 13:31:30 +0000 (14:31 +0100)]
qemu: blockjob: Pass in job to qemuBlockJobEventProcessLegacy

Don't split out individual fields, just pass in the job.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agoqemu: blockjob: Record job type when starting the job
Peter Krempa [Fri, 23 Nov 2018 11:45:32 +0000 (12:45 +0100)]
qemu: blockjob: Record job type when starting the job

We can properly track the job type when starting the job so that we
don't have to infer it later.

This patch also adds an enum of block job types specific to qemu
(qemuBlockjobType) which mirrors the public block job types
(virDomainBlockJobType) but allows for other types to be added later
which will not be public.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agoqemu: blockjob: Add reference to disk into struct qemuBlockJobData
Peter Krempa [Wed, 21 Nov 2018 14:36:47 +0000 (15:36 +0100)]
qemu: blockjob: Add reference to disk into struct qemuBlockJobData

Block jobs can also happen on objects which are not a disk at a given
point (e.g. the frontend was not hotplugged yet) and thus will be
eventually kept separately. Add a reference back to the disk for
blockjobs which do correspond to a disk.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agoqemu: blockjob: Drop unnecessary calls to qemuBlockJobSyncEndDisk
Peter Krempa [Thu, 22 Nov 2018 17:34:42 +0000 (18:34 +0100)]
qemu: blockjob: Drop unnecessary calls to qemuBlockJobSyncEndDisk

If the job wasn't started, we don't need to end the synchronous job. Add
a note and drop the unnecessary calls.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agoqemu: blockjob: Add functions for block job state control
Peter Krempa [Mon, 19 Nov 2018 15:48:09 +0000 (16:48 +0100)]
qemu: blockjob: Add functions for block job state control

Rather than directly modifying fields in the qemuBlockJobDataPtr
structure add a bunch of fields which allow to do the transitions.

This will help later when adding more complexity to the job handling.

APIs introduced in this patch are:

qemuBlockJobDiskNew - prepare for starting a new blockjob on a disk
qemuBlockJobDiskGetJob - get the block job data structure for a disk

For individual job state manipulation the following APIs are added:
qemuBlockJobStarted - Sets the job as started with qemu. Until that
                      the job can be cancelled without asking qemu.

qemuBlockJobStartupFinalize - finalize job startup. If the job was
                              started in qemu already, just releases
                              reference to the job object. Otherwise
                              clears everything as if the job was never
                              started.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agoqemu: migration: Separate startup of disk mirror from migration logic
Peter Krempa [Thu, 22 Nov 2018 15:16:24 +0000 (16:16 +0100)]
qemu: migration: Separate startup of disk mirror from migration logic

Extract the disk mirroring startup code from the loop into a separate
function to allow cleaner cleanup paths.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agoqemu: blockjob: Clarify that job 'status' field contains new state
Peter Krempa [Thu, 22 Nov 2018 14:05:50 +0000 (15:05 +0100)]
qemu: blockjob: Clarify that job 'status' field contains new state

The field is used to note the state the job has transitioned to while
handling the blockjob state change event. Rename the field so that it's
obvious that this is the new state and not the general state of the
blockjob.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agoqemu: blockjob: Turn struct qemuBlockJobData into a virObject
Peter Krempa [Wed, 14 Nov 2018 15:47:50 +0000 (16:47 +0100)]
qemu: blockjob: Turn struct qemuBlockJobData into a virObject

Reference counting will simplify semantics of the lifecycle of the
object.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agoqemu: migration: Simplify cancellation of migration blockjobs
Peter Krempa [Thu, 18 Oct 2018 11:13:21 +0000 (13:13 +0200)]
qemu: migration: Simplify cancellation of migration blockjobs

When cancelling job after a reconnect we can now use the disk block job
state rather than having to re-detect it in the migration code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agoqemu: driver: Remove block job status reprobing from qemuDomainBlockPivot
Peter Krempa [Mon, 12 Nov 2018 06:46:49 +0000 (07:46 +0100)]
qemu: driver: Remove block job status reprobing from qemuDomainBlockPivot

Now that we reprobe the status of blockjobs when reconnecting in
addition to handling job status events, the status reprobing can be
removed as we always track the correct status internally.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agoqemu: process: refresh block jobs on reconnect
Peter Krempa [Thu, 18 Oct 2018 10:34:49 +0000 (12:34 +0200)]
qemu: process: refresh block jobs on reconnect

Block job state was widely untracked by libvirt across restarts which
was allowed by a stateless block job finishing handler which discarded
disk state and redetected it. This is undesirable since we'll need to
track more information for individual blockjobs due to -blockdev
integration requirements.

In case of legacy blockjobs we can recover whether the job is present at
reconnect time by querying qemu. Adding tracking whether a job is
present will allow simplification of the non-shared-storage cancellation
code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agoqemu: migration: Properly note that non-shared-storage migration uses a blockjob
Peter Krempa [Thu, 18 Oct 2018 11:11:08 +0000 (13:11 +0200)]
qemu: migration: Properly note that non-shared-storage migration uses a blockjob

Internally we do a 'block-copy' to accomodate non-shared storage
migration but the code did not fill in that the block job was active on
the disk when starting the copy job. Since we handle block jobs finishes
regardless of having it registered it's not a problem but soon will
become one.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agoqemu: blockjob: Split out handling of completed jobs
Peter Krempa [Wed, 17 Oct 2018 12:51:56 +0000 (14:51 +0200)]
qemu: blockjob: Split out handling of completed jobs

qemuBlockJobEventProcessLegacy was getting too big. Remove handling of
completed jobs in a separate function.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agoqemu: blockjob: Rename qemuBlockJobEventProcess to qemuBlockJobEventProcessLegacy
Peter Krempa [Wed, 17 Oct 2018 12:43:01 +0000 (14:43 +0200)]
qemu: blockjob: Rename qemuBlockJobEventProcess to qemuBlockJobEventProcessLegacy

This will handle blockjob finalizing for the old approach so rename it
accordingly.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agoqemu: process: Consolidate error paths in qemuProcessHandleBlockJob
Peter Krempa [Wed, 17 Oct 2018 12:22:23 +0000 (14:22 +0200)]
qemu: process: Consolidate error paths in qemuProcessHandleBlockJob

'cleanup' label was accessed only from a jump to 'error'. Consolidate
everyting into 'cleanup'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agoqemu: Consolidate disk blockjob variables into a structure
Peter Krempa [Wed, 17 Oct 2018 06:57:08 +0000 (08:57 +0200)]
qemu: Consolidate disk blockjob variables into a structure

Struct qemuDomainDiskPrivate was holding multiple variables connected to
a disk block job. Consolidate them into a new struct qemuBlockJobData.

This will also allow simpler extensions to the block job mechanisms.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agoqemu: blockjob: Remove header dependency on qemu_domain.h
Peter Krempa [Tue, 16 Oct 2018 14:43:49 +0000 (16:43 +0200)]
qemu: blockjob: Remove header dependency on qemu_domain.h

The blockjob module uses 'qemuDomainAsyncJob' in it's public headers.
As I plan adding a new structure containing job data which will need to
be included in "qemu_domain.h" it's necessary to break the circular
dependency.

Convert 'qemuDomainAsyncJob' type to 'int' as it's an enum.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agoqemu: blockjob: Rename public APIs
Peter Krempa [Tue, 16 Oct 2018 14:36:18 +0000 (16:36 +0200)]
qemu: blockjob: Rename public APIs

All the public APIs of the qemu_blockjob module operate on a 'disk'.
Since I'll be adding APIs which operate on a job later let's rename the
existing ones.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agoqemu: blockjob: Unexport qemuBlockJobEventProcess
Peter Krempa [Tue, 16 Oct 2018 09:54:02 +0000 (11:54 +0200)]
qemu: blockjob: Unexport qemuBlockJobEventProcess

The function is now only called locally. Some code movement was
necessary to avoid forward declarations.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agoqemu: processBlockJobEvent: Use qemuBlockJobUpdate to process block job events
Peter Krempa [Tue, 16 Oct 2018 09:47:32 +0000 (11:47 +0200)]
qemu: processBlockJobEvent: Use qemuBlockJobUpdate to process block job events

Replace use of qemuBlockJobEventProcess with the general helper. A small
tweak is required to pass in the 'type' and 'status' of the job via the
appropriate private data variables.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agoqemu: blockjob: Emit VIR_DOMAIN_EVENT_ID_BLOCK_JOB only for local disks
Peter Krempa [Thu, 17 Jan 2019 12:52:09 +0000 (13:52 +0100)]
qemu: blockjob: Emit VIR_DOMAIN_EVENT_ID_BLOCK_JOB only for local disks

The event reports the disk path to identify the disk which makes sense
only for local disks. Additionally network backed disks like NBD don't
need to have a path so the callback would return NULL.

Report VIR_DOMAIN_EVENT_ID_BLOCK_JOB only for non-empty local disks.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agoqemu: blockjob: Extract emitting of libvirt events
Peter Krempa [Wed, 12 Sep 2018 15:13:16 +0000 (17:13 +0200)]
qemu: blockjob: Extract emitting of libvirt events

Put the emitting of VIR_DOMAIN_EVENT_ID_BLOCK_JOB and
VIR_DOMAIN_EVENT_ID_BLOCK_JOB_2 into a separate function.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agoqemu: fill out usage-specific TLS settings after parsing
Ján Tomko [Mon, 14 Jan 2019 22:06:06 +0000 (23:06 +0100)]
qemu: fill out usage-specific TLS settings after parsing

Instead of copying the default default values upfront
and then wondering whether the user has given us a new default,
leave the per-usage TLS certdirs and secrets empty during
parsing and only fill them afterwards if they weren't provided
by the user.

This means that instead of looking whether the specific certdir
paths match the default default, the Validate function (which
is called in between parsing and setting the defaults) can error
out for missing directories if the value is present, because
it must've come from the user.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoqemu.conf: fill out TLS verify attributes after parsing
Ján Tomko [Mon, 14 Jan 2019 21:51:00 +0000 (22:51 +0100)]
qemu.conf: fill out TLS verify attributes after parsing

Introduce a set of bool variables with the 'present' suffix
to track whether the value was actually specified.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoqemu: group swtpm entry in augeas file
Ján Tomko [Mon, 14 Jan 2019 20:18:26 +0000 (21:18 +0100)]
qemu: group swtpm entry in augeas file

They are meant to be together.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoqemu: fix double space in augeas file
Ján Tomko [Mon, 14 Jan 2019 20:18:18 +0000 (21:18 +0100)]
qemu: fix double space in augeas file

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agosrc: Don't use double-colon rules
Andrea Bolognani [Fri, 11 Jan 2019 10:03:53 +0000 (11:03 +0100)]
src: Don't use double-colon rules

According to the GNU Make manual, "double-colon rules are
somewhat obscure and not often very useful". Looking at
the few instances we have in libvirt, that certainly seems
to be the case, so just drop them.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
6 years agoqemu: remove comments for qemuDomainSecret.*Destroy functions
Ján Tomko [Tue, 15 Jan 2019 13:19:07 +0000 (14:19 +0100)]
qemu: remove comments for qemuDomainSecret.*Destroy functions

These all contain the same copy and pasted '@disk' error,
and only repeat the list of arguments.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
6 years agomaint: Post-release version bump to 5.1.0
Ján Tomko [Wed, 16 Jan 2019 07:28:49 +0000 (08:28 +0100)]
maint: Post-release version bump to 5.1.0

Signed-off-by: Ján Tomko <jtomko@redhat.com>
6 years agoRelease of libvirt-5.0.0
Daniel Veillard [Tue, 15 Jan 2019 19:29:40 +0000 (20:29 +0100)]
Release of libvirt-5.0.0

* docs/news.xml: updated for release

Signed-off-by: Daniel Veillard <veillard@redhat.com>
6 years agovirnetdevip: Avoid cast align warning
Ján Tomko [Tue, 15 Jan 2019 12:00:52 +0000 (13:00 +0100)]
virnetdevip: Avoid cast align warning

Commit 7282f455a got rid of the VIR_WARNINGS_NO_CAST_ALIGN macro
when refactoring the code and broke the build with clang.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
6 years agonews: Update for 5.0.0 release
Andrea Bolognani [Mon, 14 Jan 2019 16:49:18 +0000 (17:49 +0100)]
news: Update for 5.0.0 release

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
6 years agoqemu: Temporary disable owner remembering
Michal Privoznik [Mon, 14 Jan 2019 16:53:43 +0000 (17:53 +0100)]
qemu: Temporary disable owner remembering

Turns out, that there are few bugs that are not that trivial to
fix (e.g. around block jobs). Instead of rushing in not
thoroughly tested fixes disable the feature temporarily for the
release.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
ACKed-by: Peter Krempa <pkrempa@redhat.com>
6 years agopo: refresh translations from zanata
Daniel P. Berrangé [Mon, 14 Jan 2019 16:58:34 +0000 (16:58 +0000)]
po: refresh translations from zanata

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agoutil: make forgotten changes suggested during review of commit d40b820c
Laine Stump [Sat, 12 Jan 2019 21:14:50 +0000 (16:14 -0500)]
util: make forgotten changes suggested during review of commit d40b820c

I had intended to make these changes to commit d40b820c before
pushing, but forgot about it during the day between the initial review
and ACK.

Neither change is significant - just returning immediately when
virNetDevGetName() fails (instead of logging a debug message first)
and eliminating a comment that adds to confusion rather than
eliminating it. Still, the changes should be made to be more
consistent with nearly identical code just a few lines up (added in
commit 7282f455)

Signed-off-by: Laine Stump <laine@laine.org>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agonews: Move entry for libvirt picking DRI devices
Andrea Bolognani [Mon, 14 Jan 2019 13:32:31 +0000 (14:32 +0100)]
news: Move entry for libvirt picking DRI devices

The entry, introduced by commit 3934beb8579c, ended up
inside a comment instead of the XML document proper, and
as such didn't show up in the generated files.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
6 years agoutil: check accept_ra for all nexthop interfaces of multipath routes
Laine Stump [Tue, 8 Jan 2019 22:07:12 +0000 (17:07 -0500)]
util: check accept_ra for all nexthop interfaces of multipath routes

When checking the setting of accept_ra, we have assumed that all
routes have a single nexthop, so the interface of the route would be
in the RTA_OIF attribute of the netlink RTM_NEWROUTE message. But
multipath routes don't have an RTA_OIF; instead, they have an
RTA_MULTIPATH attribute, which is an array of rtnexthop, with each
rtnexthop having an interface. This patch adds a loop to look at the
setting of accept_ra of the interface for every rtnexthop in the
array.

Signed-off-by: Laine Stump <laine@laine.org>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
6 years agoqemu: Filter non SCSI hostdevs in qemuHostdevPrepareSCSIDevices
John Ferlan [Thu, 10 Jan 2019 23:05:12 +0000 (18:05 -0500)]
qemu: Filter non SCSI hostdevs in qemuHostdevPrepareSCSIDevices

When commit 1d94b3e7 added code to walk the [n]hostdevs list looking
to add shared hostdevs, it should've filtered any hostdevs that were
not SCSI hostdev's.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agoutil: use nlmsg_find_attr() instead of an open-coded loop
Laine Stump [Tue, 8 Jan 2019 19:13:00 +0000 (14:13 -0500)]
util: use nlmsg_find_attr() instead of an open-coded loop

This is about the same number of code lines, but is simpler, and more
consistent with what will be added to check another attribute in a
coming patch.

As a side effect, it

Resolves: https://bugzilla.redhat.com/1583131

Signed-off-by: Laine Stump <laine@laine.org>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
6 years agoutil: add a function to insert new interfaces to IPv6CheckForwarding list
Laine Stump [Mon, 7 Jan 2019 20:55:31 +0000 (15:55 -0500)]
util: add a function to insert new interfaces to IPv6CheckForwarding list

This same operation needs to be done in multiple places, so move the
inline code into a separate function.

Signed-off-by: Laine Stump <laine@laine.org>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
6 years agoutil: remove const specifier from nlmsghdr arg to virNetlinkDumpCallback()
Laine Stump [Sun, 6 Jan 2019 22:35:47 +0000 (17:35 -0500)]
util: remove const specifier from nlmsghdr arg to virNetlinkDumpCallback()

This is problematic if a callback function wants to send the nlmsghdr
to a library function that has no "const" in its prototype
(e.g. nlmsg_find_attr())

Signed-off-by: Laine Stump <laine@laine.org>
Reviewed-by: Erik Skultety <eskultet@redhat.com>