]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
3 years agoqemu: Move creation and opening of chardev backend FDs to host prepare step
Peter Krempa [Mon, 25 Oct 2021 10:42:16 +0000 (12:42 +0200)]
qemu: Move creation and opening of chardev backend FDs to host prepare step

The opening of files for FD passing for a chardev backend was
historically done in the function which is formatting the commandline.

This has multiple problems. Firstly the function takes a lot of
parameters which need to be passed through the commandline formatters.
This made the 'qemuBuildChrChardevStr' extremely unappealing to the
extent that we have multiple other custom formatters in places which
didn't really want to use the function.

Additionally the function is also creating files in the host in certain
configurations which is wrong for a commandline formatter to do. This
meant that e.g. not all chardev test cases can be converted to use
DO_TEST_CAPS_LATEST as we attempt to use such code path and attempt to
create files outside of the test directory.

This patch moves the opening of the filedescriptors from
'qemuBuildChrChardevFileStr' into a new helper
'qemuProcessPrepareHostBackendChardevOne' which is called using
'qemuDomainDeviceBackendChardevForeach'.

To preserve test behaviour we also have another instance
'testPrepareHostBackendChardevOne' which is populating mock
filedescriptors.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu: domain: Introduce helpers for initializing chardev backend of devices
Peter Krempa [Tue, 2 Nov 2021 13:15:58 +0000 (14:15 +0100)]
qemu: domain: Introduce helpers for initializing chardev backend of devices

Introduce qemuDomainDeviceBackendChardevForeach(One) which calls the
callback if either given device has a chardev backend or for all chardev
backends of all devices.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agovirDomainDeviceInfoIterateFlags: Export the symbol
Peter Krempa [Tue, 2 Nov 2021 13:15:10 +0000 (14:15 +0100)]
virDomainDeviceInfoIterateFlags: Export the symbol

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agovirHostCPUGetInfoPopulateLinux: Use automatic memory freeing for virBitmap
Peter Krempa [Tue, 7 Dec 2021 15:34:00 +0000 (16:34 +0100)]
virHostCPUGetInfoPopulateLinux: Use automatic memory freeing for virBitmap

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agovirt-host-validate-qemu: Use automatic memory freeing for virBitmap
Peter Krempa [Tue, 7 Dec 2021 15:34:00 +0000 (16:34 +0100)]
virt-host-validate-qemu: Use automatic memory freeing for virBitmap

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agovirt-host-validate-common: Use automatic memory freeing for virBitmap
Peter Krempa [Tue, 7 Dec 2021 15:34:00 +0000 (16:34 +0100)]
virt-host-validate-common: Use automatic memory freeing for virBitmap

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agovirLXCControllerSetup(Resource|Cgroup)Limits: Refactor cleanup
Peter Krempa [Tue, 7 Dec 2021 15:35:24 +0000 (16:35 +0100)]
virLXCControllerSetup(Resource|Cgroup)Limits: Refactor cleanup

Remove the pointless cleanup sections.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agolxc_controller: Use automatic memory freeing for virBitmap
Peter Krempa [Tue, 7 Dec 2021 15:34:00 +0000 (16:34 +0100)]
lxc_controller: Use automatic memory freeing for virBitmap

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agolibxlDomainGetNumaParameters: Don't clear a freshly allocated bitmap
Peter Krempa [Tue, 7 Dec 2021 15:18:24 +0000 (16:18 +0100)]
libxlDomainGetNumaParameters: Don't clear a freshly allocated bitmap

The bitmap is allocated just above the explicit clear, so it's already
empty.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agolibxl_driver: Use automatic memory freeing for virBitmap
Peter Krempa [Tue, 7 Dec 2021 15:17:38 +0000 (16:17 +0100)]
libxl_driver: Use automatic memory freeing for virBitmap

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agolxcSetCpusetTune: Refactor memory clearing
Peter Krempa [Tue, 7 Dec 2021 15:12:34 +0000 (16:12 +0100)]
lxcSetCpusetTune: Refactor memory clearing

Use automatic memory clearing for virBitmap and remove a reuse of a
temporary string.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agotest_driver: Use automatic memory freeing for temporary virBitmaps
Peter Krempa [Tue, 7 Dec 2021 15:08:07 +0000 (16:08 +0100)]
test_driver: Use automatic memory freeing for temporary virBitmaps

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoutil: bitmap: Unify parsing of bitmaps
Peter Krempa [Mon, 6 Dec 2021 15:28:44 +0000 (16:28 +0100)]
util: bitmap: Unify parsing of bitmaps

There were two separate instances of string->virBitmap code:
virBitmapParseInternal and virBitmapParseUnlimited.

By adding a flag to switch to expanding APIs we can merge the two
implementations into one.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agovirBitmapParseInternal: Allocate the bitmap in the caller
Peter Krempa [Mon, 6 Dec 2021 15:18:57 +0000 (16:18 +0100)]
virBitmapParseInternal: Allocate the bitmap in the caller

In order to prepare for reuse of the function, move the allocation of
the bitmap to the caller.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agovirBitmapParseSeparator: Remove separator parsing capability
Peter Krempa [Mon, 6 Dec 2021 15:16:18 +0000 (16:16 +0100)]
virBitmapParseSeparator: Remove separator parsing capability

Since the feature is not needed remove it and remove the function to
virBitmapParseInternal.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agovirBitmapSetBitExpand: Remove return value
Peter Krempa [Mon, 6 Dec 2021 14:55:46 +0000 (15:55 +0100)]
virBitmapSetBitExpand: Remove return value

The function can't fail at this point. Remove the return value.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agovirBitmapClearBitExpand: Remove return value
Peter Krempa [Mon, 6 Dec 2021 14:55:46 +0000 (15:55 +0100)]
virBitmapClearBitExpand: Remove return value

The function can't fail at this point. Remove the return value.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agovirBitmapUnion: Remove return value
Peter Krempa [Mon, 6 Dec 2021 14:55:46 +0000 (15:55 +0100)]
virBitmapUnion: Remove return value

The function can't fail at this point. Remove the return value.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agovirBitmapExpand: Remove return value
Peter Krempa [Mon, 6 Dec 2021 14:53:27 +0000 (15:53 +0100)]
virBitmapExpand: Remove return value

There's nothing that can fail in the function. Remove the return value
and adjust callers.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoutil: bitmap: Unexport 'virBitmapParseSeparator'
Peter Krempa [Mon, 6 Dec 2021 14:47:00 +0000 (15:47 +0100)]
util: bitmap: Unexport 'virBitmapParseSeparator'

The function isn't used besides tests. Since the separator parsing
capability is trivial we can keep it in place and just unexport it for
now.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agotest_virCapabilitiesGetCpusForNodemask: Refactor cleanup
Peter Krempa [Tue, 7 Dec 2021 16:22:26 +0000 (17:22 +0100)]
test_virCapabilitiesGetCpusForNodemask: Refactor cleanup

Use automatic memory freeing for the temporary bitmap and remove the
pointless 'cleanup' section.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agovirnumamock: Use automatic memory freeing for virBitmap
Peter Krempa [Mon, 6 Dec 2021 13:10:40 +0000 (14:10 +0100)]
virnumamock: Use automatic memory freeing for virBitmap

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agovirshParseCPUList: Refactor cleanup
Peter Krempa [Tue, 7 Dec 2021 16:22:26 +0000 (17:22 +0100)]
virshParseCPUList: Refactor cleanup

Use automatic memory freeing for the temporary bitmap and remove the
pointless 'cleanup' section.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agovirCgroupGetPercpuStats: Refactor cleanup
Peter Krempa [Tue, 7 Dec 2021 16:22:26 +0000 (17:22 +0100)]
virCgroupGetPercpuStats: Refactor cleanup

Use automatic memory freeing for the temporary bitmap and remove the
pointless 'cleanup' section.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agovirHostCPUParseNode: Use automatic memory freeing for virBitmap
Peter Krempa [Mon, 6 Dec 2021 12:21:37 +0000 (13:21 +0100)]
virHostCPUParseNode: Use automatic memory freeing for virBitmap

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agovirHostCPUHasValidSubcoreConfiguration: Refactor cleanup
Peter Krempa [Tue, 7 Dec 2021 16:22:26 +0000 (17:22 +0100)]
virHostCPUHasValidSubcoreConfiguration: Refactor cleanup

Use automatic memory freeing for the temporary bitmap and remove the
pointless 'cleanup' section.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agovirHostCPUCountThreadSiblings: Refactor cleanup
Peter Krempa [Tue, 7 Dec 2021 16:22:26 +0000 (17:22 +0100)]
virHostCPUCountThreadSiblings: Refactor cleanup

Use automatic memory freeing for the temporary bitmap and remove the
pointless 'cleanup' section.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuSnapshotCreateInactiveExternal: Automatically free temporary variables
Peter Krempa [Tue, 7 Dec 2021 16:24:48 +0000 (17:24 +0100)]
qemuSnapshotCreateInactiveExternal: Automatically free temporary variables

Automatically free 'cmd' and 'created' by moving them to the appropriate
scopes.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuProcessValidateHotpluggableVcpus: Refactor cleanup
Peter Krempa [Tue, 7 Dec 2021 16:22:26 +0000 (17:22 +0100)]
qemuProcessValidateHotpluggableVcpus: Refactor cleanup

Use automatic memory freeing for the temporary bitmap and remove the
pointless 'cleanup' section.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuDomainSetVcpuInternal: Refactor cleanup
Peter Krempa [Tue, 7 Dec 2021 16:22:26 +0000 (17:22 +0100)]
qemuDomainSetVcpuInternal: Refactor cleanup

Use automatic memory freeing for the temporary bitmap and remove the
pointless 'cleanup' section.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuDomainSetVcpusInternal: Refactor cleanup
Peter Krempa [Tue, 7 Dec 2021 16:22:26 +0000 (17:22 +0100)]
qemuDomainSetVcpusInternal: Refactor cleanup

Use automatic memory freeing for the temporary bitmap and remove the
pointless 'cleanup' section.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuDomainSelectHotplugVcpuEntities: Refactor cleanup
Peter Krempa [Tue, 7 Dec 2021 16:22:26 +0000 (17:22 +0100)]
qemuDomainSelectHotplugVcpuEntities: Refactor cleanup

Use automatic memory freeing for the 'ret' bitmap and remove the
pointless 'cleanup' section.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu: driver: Automatically free temporary virBitmap-s
Peter Krempa [Tue, 7 Dec 2021 16:21:17 +0000 (17:21 +0100)]
qemu: driver: Automatically free temporary virBitmap-s

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuDomainAssignMemorySlots: Refactor cleanup
Peter Krempa [Tue, 7 Dec 2021 16:20:46 +0000 (17:20 +0100)]
qemuDomainAssignMemorySlots: Refactor cleanup

Automatically free the 'slotmap' bitmap and get rid of the cleanup
section.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agovirDomainDriverGetIOThreadsConfig: Automatically free virBitmap
Peter Krempa [Tue, 7 Dec 2021 16:18:46 +0000 (17:18 +0100)]
virDomainDriverGetIOThreadsConfig: Automatically free virBitmap

Use g_autoptr for the temp bitmap. To achieve this the variable must be
moved down to the appropriate scope.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agovirDomainNumatuneParseXML: Refactor cleanup
Peter Krempa [Tue, 7 Dec 2021 16:17:13 +0000 (17:17 +0100)]
virDomainNumatuneParseXML: Refactor cleanup

Use automatic memory clearing for the temporary strings and bitmap and
remove the cleanup section. There are multiple temporary strings added
so that we don't reuse one.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agovirDomainSchedulerParse: Refactor cleanup
Peter Krempa [Tue, 7 Dec 2021 16:16:14 +0000 (17:16 +0100)]
virDomainSchedulerParse: Refactor cleanup

Automatically free the 'ret' temporary bitmap and get rid of the cleanup
section.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoconf: capabilities: Clean up freeing of virBitmap
Peter Krempa [Tue, 7 Dec 2021 16:15:18 +0000 (17:15 +0100)]
conf: capabilities: Clean up freeing of virBitmap

Use automatic freeing where possible and use g_clear_pointer instead of
manual NULL-ing.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agovirCapabilitiesInitCaches: Refactor freeing of temporary variables
Peter Krempa [Tue, 7 Dec 2021 16:13:50 +0000 (17:13 +0100)]
virCapabilitiesInitCaches: Refactor freeing of temporary variables

Move the 'path' and 'type' variables down to the appropriate block and
use automatic freeing for them as well as the temporary virBitmap.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoRevert "lxc: controller: Fix container launch on cgroup v1"
Michal Privoznik [Fri, 10 Dec 2021 12:46:54 +0000 (13:46 +0100)]
Revert "lxc: controller: Fix container launch on cgroup v1"

Unfortunately, this fix breakes machinectl in a very nasty way,
for instance 'machinectl shell' drops into the host shell. It's
worse than being unable to start a container with CGroupsV1.

Revert until a proper fix is figured out.

This reverts commit 1b9ce05ce241a581d4e80228c92ceb0266f21f94.

References: https://gitlab.com/libvirt/libvirt/-/issues/182
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
3 years agoremote: Avoid crash in remoteSplitURIScheme()
Andrea Bolognani [Fri, 10 Dec 2021 09:54:54 +0000 (10:54 +0100)]
remote: Avoid crash in remoteSplitURIScheme()

We need to make sure the URI scheme is present before passing
it to strchr(), otherwise we're going to get

  $ virt-ssh-helper foo
  Segmentation fault (core dumped)

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
3 years agoRevert "qemu: Avoid crash in qemuStateShutdownPrepare() and qemuStateShutdownWait()"
Michal Privoznik [Thu, 9 Dec 2021 14:29:27 +0000 (15:29 +0100)]
Revert "qemu: Avoid crash in qemuStateShutdownPrepare() and qemuStateShutdownWait()"

This reverts commit 69977ff10560a80bcf5bf93f1a3f819a2d1623ca.

After previous commit it's no longer possible that QEMU driver is
not initialized in qemuStateShutdownPrepare() nor
qemuStateShutdownWait().

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
3 years agoremote_daemon: Set shutdown callbacks only after init is done
Michal Privoznik [Thu, 9 Dec 2021 14:29:43 +0000 (15:29 +0100)]
remote_daemon: Set shutdown callbacks only after init is done

The initialization of drivers happens in a separate thread.
However, the main thread continues initialization and sets
shutdown callbacks (virStateShutdownPrepare() and
virStateShutdownWait()) even though the driver init thread is
still running. This is dangerous because if the daemon decides to
quit early (e.g. because SIGINT was delivered) the
shutdownPrepare and shutdownWait callback are called over
partially init drivers.

Set callbacks only after all drivers were initialized.

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/218
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2027400

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
3 years agoqemu_monitor_json.h: Unify header formatting
Peter Krempa [Thu, 9 Dec 2021 16:34:46 +0000 (17:34 +0100)]
qemu_monitor_json.h: Unify header formatting

Use the modern style and fix all offenders since new functions were
already using the contemporary style.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuValidateDomainDeviceDefDiskFrontend: Aggregate disk iomode validation
Peter Krempa [Tue, 7 Dec 2021 12:51:00 +0000 (13:51 +0100)]
qemuValidateDomainDeviceDefDiskFrontend: Aggregate disk iomode validation

Move the two checks under a common block.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuValidateDomainDeviceDefDiskFrontend: Fix error message if io='native' is unsupported
Peter Krempa [Tue, 7 Dec 2021 12:53:30 +0000 (13:53 +0100)]
qemuValidateDomainDeviceDefDiskFrontend: Fix error message if io='native' is unsupported

The error is a hard error, so the part about fallback doesn't make
sense. Spell the attribute the same way as it's in XML.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agodocs: Update more links to point to the new Go modules
Andrea Bolognani [Thu, 9 Dec 2021 11:15:49 +0000 (12:15 +0100)]
docs: Update more links to point to the new Go modules

A couple of links were still pointing to the obsolete Go
packages instead of the current module-aware ones.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
3 years agoNEWS: Fix spacing between releases
Andrea Bolognani [Wed, 8 Dec 2021 16:42:47 +0000 (17:42 +0100)]
NEWS: Fix spacing between releases

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
3 years agoqemu: do not compare missing cpu data
Ján Tomko [Wed, 8 Dec 2021 12:13:35 +0000 (13:13 +0100)]
qemu: do not compare missing cpu data

For x86, we invalidate qemu caps cache if the host CPUID changed.
However other cpu drivers do not have the 'getHostData' function
implemented.

Skip the comparison if we do not have host CPUData available,
since virCPUDataIsIdentical always returns an error in that case.

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

Fixes: 3bc6f46d305ed82f7314ffc4c2a66847b831a6bd
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
3 years agoNEWS: Mention synchronous copy job additions
Peter Krempa [Thu, 2 Dec 2021 16:35:05 +0000 (17:35 +0100)]
NEWS: Mention synchronous copy job additions

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agodocs: migration: Add a paragraph about non-shared storage migration
Peter Krempa [Thu, 2 Dec 2021 15:36:01 +0000 (16:36 +0100)]
docs: migration: Add a paragraph about non-shared storage migration

Outline some of the basics and the caveats of the non-shared migration
code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agodocs: Convert 'migration' doc to RST
Peter Krempa [Wed, 1 Dec 2021 15:30:34 +0000 (16:30 +0100)]
docs: Convert 'migration' doc to RST

After conversion the table doesn't have to custom colors, but otherwise
seems to hold well.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu: migration: Implement VIR_MIGRATE_NON_SHARED_SYNCHRONOUS_WRITES
Peter Krempa [Thu, 2 Dec 2021 15:54:57 +0000 (16:54 +0100)]
qemu: migration: Implement VIR_MIGRATE_NON_SHARED_SYNCHRONOUS_WRITES

Use it to enable the 'write-blocking' mode of 'blockdev-mirror'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agovirDomainMigrate: Introduce VIR_MIGRATE_NON_SHARED_SYNCHRONOUS_WRITES flag
Peter Krempa [Wed, 1 Dec 2021 15:21:29 +0000 (16:21 +0100)]
virDomainMigrate: Introduce VIR_MIGRATE_NON_SHARED_SYNCHRONOUS_WRITES flag

Non-shared storage migration of guests which are disk I/O intensive and
have fast local storage may actually never converge if the guest happens
to dirty the disk faster than it can be copied.

This patch introduces a new flag
'VIR_MIGRATE_NON_SHARED_SYNCHRONOUS_WRITES' which will instruct
hypervisors to synchronize local I/O writes with the writes to remote
storage used for migration so that the guest can't overwhelm the
migration. This comes at a cost of decreased local I/O performance for
guests which behave well on average.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoVIR_REQUIRE_FLAG_(GOTO|RET): Add parens around arguments in expansion
Peter Krempa [Thu, 2 Dec 2021 09:48:54 +0000 (10:48 +0100)]
VIR_REQUIRE_FLAG_(GOTO|RET): Add parens around arguments in expansion

Make the macro useful also for cases when one of multiple flags is
required.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoman: virsh: Separate paragraphs describing distinct flags
Peter Krempa [Thu, 2 Dec 2021 12:33:55 +0000 (13:33 +0100)]
man: virsh: Separate paragraphs describing distinct flags

Separate the paragraphs where the topic changes to simplify further
additions.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoinclude: virDomainMigrateFlags: Remove "block alignment" whitespace
Peter Krempa [Wed, 1 Dec 2021 14:39:07 +0000 (15:39 +0100)]
include: virDomainMigrateFlags: Remove "block alignment" whitespace

Using whitespace to align the '=' and values doesn't make sense for the
virDomainMigrateFlags enum as the visual block is interrupted by
comments.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuDomainBlockCopy: Implement VIR_DOMAIN_BLOCK_COPY_SYNCHRONOUS_WRITES
Peter Krempa [Wed, 1 Dec 2021 14:15:34 +0000 (15:15 +0100)]
qemuDomainBlockCopy: Implement VIR_DOMAIN_BLOCK_COPY_SYNCHRONOUS_WRITES

Wire up the flag to enable the 'write-blocking' 'copy-mode' of
'blockdev-mirror'.

It's not supported by all qemu versions but it is with those which we
use -blockdev with so we can use that instead of adding another custom
capability as we use blockdev for some time now.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agovirDomainBlockCopy: Introduce VIR_DOMAIN_BLOCK_COPY_SYNCHRONOUS_WRITES flag
Peter Krempa [Wed, 1 Dec 2021 14:09:45 +0000 (15:09 +0100)]
virDomainBlockCopy: Introduce VIR_DOMAIN_BLOCK_COPY_SYNCHRONOUS_WRITES flag

In cases when the destination storage is slower than the normal VM
storage and the VM does intensive I/O to the disk a block copy job may
never converge.

Switching it to synchronous mode will ensure that all writes done by the
guest are propagated to the destination at the cost of slowing down I/O
of the guest to the synchronous speed.

This patch adds the new API flag and implements virsh support.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoinclude: virDomainBlockCopyFlags: Convert to prefix comments
Peter Krempa [Wed, 1 Dec 2021 13:54:30 +0000 (14:54 +0100)]
include: virDomainBlockCopyFlags: Convert to prefix comments

Switch to the comment style allowing more text.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu: monitor: Add support for 'write-blocking' copy mode for blockdev-mirror
Peter Krempa [Tue, 30 Nov 2021 19:22:46 +0000 (20:22 +0100)]
qemu: monitor: Add support for 'write-blocking' copy mode for blockdev-mirror

Forces the data to be written synchronously to both the original and the
mirrored images which ensures that the job will reach synchronized
phase.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuMonitorJSONGraphicsRelocate: Clean up command argument construction
Peter Krempa [Tue, 30 Nov 2021 15:20:50 +0000 (16:20 +0100)]
qemuMonitorJSONGraphicsRelocate: Clean up command argument construction

Move the construction of the command from the variable declaration so
that it doesn't exceed the line length and we can also move the logic of
determining the protocol outside of the command construction.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuMonitorJSONMigrate: Extract flags prior to constructing command
Peter Krempa [Tue, 30 Nov 2021 15:12:00 +0000 (16:12 +0100)]
qemuMonitorJSONMigrate: Extract flags prior to constructing command

The migration API takes specific flags which are then converted to
boolean parameters for the command. Extract the flag into helper
variables rather than using ternary operators while constructing the
command itself.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuMonitorJSONEjectMedia: Use a bool directly for constructing JSON with 'b' modifier
Peter Krempa [Tue, 30 Nov 2021 15:08:29 +0000 (16:08 +0100)]
qemuMonitorJSONEjectMedia: Use a bool directly for constructing JSON with 'b' modifier

It actually already expects a bool.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuMonitorJSONHandleShutdown: Use virTristateBoolFromBool
Peter Krempa [Tue, 30 Nov 2021 15:07:53 +0000 (16:07 +0100)]
qemuMonitorJSONHandleShutdown: Use virTristateBoolFromBool

Instead of a ternary operator we can use the existing helper.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu: monitor: Avoid ternary operators in helpers for drive/blockdev-mirror
Peter Krempa [Tue, 30 Nov 2021 14:50:53 +0000 (15:50 +0100)]
qemu: monitor: Avoid ternary operators in helpers for drive/blockdev-mirror

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu: agent: Remove unneeded cleanup sections
Peter Krempa [Wed, 1 Dec 2021 09:44:50 +0000 (10:44 +0100)]
qemu: agent: Remove unneeded cleanup sections

Remove the cleanup sections where not needed after we've converted to
automatic freeing of virJSONValue.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu: agent: Automatically free virJSONValue-s
Peter Krempa [Wed, 1 Dec 2021 09:38:47 +0000 (10:38 +0100)]
qemu: agent: Automatically free virJSONValue-s

Convert the code to use g_autoptr for the few cases sill using explicit
cleanup.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuAgentIOProcessLine: refactor cleanup
Peter Krempa [Wed, 1 Dec 2021 09:08:03 +0000 (10:08 +0100)]
qemuAgentIOProcessLine: refactor cleanup

Refactor the control flow so we can remove the cleanup label.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuMonitorAddObject: Use g_clear_pointer for a free and reset operation
Peter Krempa [Wed, 1 Dec 2021 08:31:30 +0000 (09:31 +0100)]
qemuMonitorAddObject: Use g_clear_pointer for a free and reset operation

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuMonitorJSONGetCPUModelExpansion: Don't use goto for looping
Peter Krempa [Fri, 3 Dec 2021 10:38:27 +0000 (11:38 +0100)]
qemuMonitorJSONGetCPUModelExpansion: Don't use goto for looping

Don't use 'goto' for looping. Extract the monitor interaction code into
a new function and restructure the logic to avoid jumping back in the
code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuAgentGuestSync: Don't use goto for looping
Peter Krempa [Fri, 3 Dec 2021 10:38:27 +0000 (11:38 +0100)]
qemuAgentGuestSync: Don't use goto for looping

Don't use 'goto' for looping. Extract the sync sending code into a new
function and restructure the logic to avoid jumping back in the code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agotests/virnetdaemontest.c: testExecRestart: Automatically free virJSONValue-s
Peter Krempa [Wed, 1 Dec 2021 08:28:08 +0000 (09:28 +0100)]
tests/virnetdaemontest.c: testExecRestart: Automatically free virJSONValue-s

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agovirCHProcessUpdateInfo: Automatically free virJSONValue
Peter Krempa [Wed, 1 Dec 2021 08:26:27 +0000 (09:26 +0100)]
virCHProcessUpdateInfo: Automatically free virJSONValue

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agovirLogDaemonPostExecRestart: Refactor cleanup
Peter Krempa [Fri, 3 Dec 2021 08:35:55 +0000 (09:35 +0100)]
virLogDaemonPostExecRestart: Refactor cleanup

Move the unlinking of the state file right after reading it so that we
can get rid of the cleanup section.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agovirLogDaemonPostExecRestart: Use automatic freeing for variables
Peter Krempa [Fri, 3 Dec 2021 08:34:03 +0000 (09:34 +0100)]
virLogDaemonPostExecRestart: Use automatic freeing for variables

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agovirLockDaemonPostExecRestart: Refactor cleanup
Peter Krempa [Wed, 1 Dec 2021 08:25:25 +0000 (09:25 +0100)]
virLockDaemonPostExecRestart: Refactor cleanup

Move the unlinking of the state file earlier and get rid of the cleanup
label.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agovirLockDaemonPostExecRestart: Automatically free temporary variables
Peter Krempa [Wed, 1 Dec 2021 08:23:19 +0000 (09:23 +0100)]
virLockDaemonPostExecRestart: Automatically free temporary variables

Convert two temp strings and one virJSONValue to g_auto(free|ptr).

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agovirLockDaemonClientPreExecRestart: Modernize JSON object construction
Peter Krempa [Wed, 1 Dec 2021 08:21:33 +0000 (09:21 +0100)]
virLockDaemonClientPreExecRestart: Modernize JSON object construction

Use virJSONValueObjectAdd instead of step-by-step construction of the
object. This also removes a handful impossible to reach errors with
translatable messages.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuMonitorBlockdevCreate: Use double pointer instead of always consuming '@props'
Peter Krempa [Wed, 1 Dec 2021 08:10:40 +0000 (09:10 +0100)]
qemuMonitorBlockdevCreate: Use double pointer instead of always consuming '@props'

We use this approach for other APIs which take a virJSONValue as
argument and the logic is also simpler.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuDomainHotplugAddIOThread: Automatically free virJSONValue
Peter Krempa [Wed, 1 Dec 2021 08:05:35 +0000 (09:05 +0100)]
qemuDomainHotplugAddIOThread: Automatically free virJSONValue

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu: hotplug: Use automatic freeing for virJSONValue
Peter Krempa [Wed, 1 Dec 2021 08:04:56 +0000 (09:04 +0100)]
qemu: hotplug: Use automatic freeing for virJSONValue

There are a few uses which still explicitly free JSON objects, fix them.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoutil: call virNetDevGetPhysPortID() in less places
Laine Stump [Thu, 2 Dec 2021 18:52:48 +0000 (13:52 -0500)]
util: call virNetDevGetPhysPortID() in less places

Whenever virPCIGetNetName() is called, it is either called with
physPortID = NULL, or with it set by the caller calling
virNetDevGetPhysPortID() soon before virPCIGetNetName(). The
physPortID is then used *only* in virPCIGetNetName().

Rather than replicating that same call to virNetDevGetPhysPortID() in
all the callers of virPCIGetNetName(), lets just have all those
callers send the NetDevName whose physPortID they want down to
virPCIGetNetName(), and let virPCIGetNetName() call
virNetDevGetPhysPortID().

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agoutil: fix erroneous requirement for phys_port_id to get ifname of a VF
Laine Stump [Thu, 2 Dec 2021 19:13:18 +0000 (14:13 -0500)]
util: fix erroneous requirement for phys_port_id to get ifname of a VF

Commit 795e9e05c3 (libvirt-7.7.0) refactored the code in virpci.c and
virnetdev.c that gathered lists of the Virtual Functions (VF) of an
SRIOV Physical Function (PF) to simplify the code.

Unfortunately the simplification made the assumption, in the new
function virPCIGetVirtualFunctionsFull(), that a VF's netdev
interface name should only be retrieved if the PF had a valid
phys_port_id. That is an incorrect assumption - only a small handful
of (now previous-generation) Mellanox SRIOV cards actually use
phys_port_id (this is for an odd design where there are multiple
physical network ports on a single PCI address); all other SRIOV cards
(including new Mellanox cards) have a file in sysfs called
phys_port_id, but it can't be read, and so the pfPhysPortID string is
NULL.

The result of this logic error is that virtual networks that are a
pool of VFs to be used for macvtap connections will be unable to
start, giving an errror like this:

 VF 0 of SRIOV PF enp130s0f0 couldn't be added to the interface pool because it isn't bound to a network driver - possibly in use elsewhere

This error message is misinformed - the caller of
virNetDevGetVirtualFunctionsFull() only *thinks* that the VF isn't
bound to a network driver because it doesn't see a netdev name for the
VF in the list. But that's only because
virNetDevGetVirtualFunctionsFull() didn't even try to get the names!

We do need a way for virPCIGetVirtualFunctionsFull() to sometimes
retrieve the netdev names and sometimes not. One way of doing that
would be to send down the netdev name of the PF whenever we also want
to know the netdev names of the VFs, but send a NULL when we
don't. This can conveniently be done by just *replacing* pfPhysPortID
in the arglist with pfNetDevName - pfPhysPortID is determined by
simply calling virNetDevGetPhysPortID(pfNetDevName) so we can just
make that call down in virPCIGetVirtualFunctionsFull() (when needed).

This solves the regression introduced by commit 795e9e05c3, and also
nicely sets us up to (in a subsequent commit) move the call to
virNetDevGetPhysPortID() down one layer further to virPCIGetNetName(),
where it really belongs!

Resolves: https://bugzilla.redhat.com/2025432
Fixes: 795e9e05c3b6b9ef3abe6f6078a6373a136ec23b
Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agomeson: Improve network driver enablement logic
Andrea Bolognani [Fri, 3 Dec 2021 13:06:54 +0000 (14:06 +0100)]
meson: Improve network driver enablement logic

The Homebrew package explicitly enables this driver despite us
disabling it by default on macOS, so it must be functional to
at least some extent and certainly can't be causing any build
failures.

Additionally, if the user has explicitly asked for the network
driver to be enabled but libvirtd is disabled for whatever
reason, we should error out instead of silently disabling the
network driver.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agolib: Drop some needless labels
Michal Privoznik [Tue, 2 Nov 2021 11:29:02 +0000 (12:29 +0100)]
lib: Drop some needless labels

After previous cleanups some labels became needless because they
contain just a return statement. There's no point in having such
labels.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agolib: Use g_autoptr() for virDomainDef
Michal Privoznik [Mon, 29 Nov 2021 08:07:44 +0000 (09:07 +0100)]
lib: Use g_autoptr() for virDomainDef

Instead of calling virDomainDefFree() explicitly, we can annotate
variables with g_autoptr().

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agovirdomainobjlist: Use g_autofree
Michal Privoznik [Fri, 26 Nov 2021 13:11:25 +0000 (14:11 +0100)]
virdomainobjlist: Use g_autofree

Instead of calling VIR_FREE() explicitly, we can annotate
variables with g_autofree.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agolibxl: libxlLoggerFileFree: remove redundant NULL assignment
Ján Tomko [Fri, 3 Dec 2021 15:23:49 +0000 (16:23 +0100)]
libxl: libxlLoggerFileFree: remove redundant NULL assignment

The 'file' pointer is already zeroed in virFileFclose
and never read again.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu_snapshot: revert: move inactive snapshot to separate function
Pavel Hrdina [Wed, 1 Dec 2021 14:55:45 +0000 (15:55 +0100)]
qemu_snapshot: revert: move inactive snapshot to separate function

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu_snapshot: revert: rename qemuSnapshotRevertInactive
Pavel Hrdina [Wed, 1 Dec 2021 14:46:27 +0000 (15:46 +0100)]
qemu_snapshot: revert: rename qemuSnapshotRevertInactive

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu_snapshot: revert: move active snapshot revert to separate function
Pavel Hrdina [Wed, 1 Dec 2021 14:26:12 +0000 (15:26 +0100)]
qemu_snapshot: revert: move active snapshot revert to separate function

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu_snapshot: revert: save metadata within qemu process job
Pavel Hrdina [Wed, 1 Dec 2021 13:10:56 +0000 (14:10 +0100)]
qemu_snapshot: revert: save metadata within qemu process job

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu_snapshot: revert: move saving metadata to separate function
Pavel Hrdina [Wed, 1 Dec 2021 13:09:10 +0000 (14:09 +0100)]
qemu_snapshot: revert: move saving metadata to separate function

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu_snapshot: revert: refactor cleanup section
Pavel Hrdina [Wed, 1 Dec 2021 12:53:36 +0000 (13:53 +0100)]
qemu_snapshot: revert: refactor cleanup section

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu_snapshot: revert: emit event right after they are created
Pavel Hrdina [Wed, 1 Dec 2021 12:40:34 +0000 (13:40 +0100)]
qemu_snapshot: revert: emit event right after they are created

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu_snapshot: revert: move config prepare code to separate function
Pavel Hrdina [Fri, 26 Nov 2021 10:56:31 +0000 (11:56 +0100)]
qemu_snapshot: revert: move config prepare code to separate function

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu_snapshot: revert: move validation to separate function
Pavel Hrdina [Fri, 26 Nov 2021 10:46:03 +0000 (11:46 +0100)]
qemu_snapshot: revert: move validation to separate function

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu_snapshot: revert: remove cleanup label
Pavel Hrdina [Thu, 25 Nov 2021 16:08:35 +0000 (17:08 +0100)]
qemu_snapshot: revert: remove cleanup label

Now the cleanup label is not necessary so we can drop it.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu_snapshot: revert: jump to endjob instead of calling qemuProcessEndJob
Pavel Hrdina [Thu, 25 Nov 2021 15:46:44 +0000 (16:46 +0100)]
qemu_snapshot: revert: jump to endjob instead of calling qemuProcessEndJob

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>