Bug 1405537 - fix non-active block commit with automatic disk locking (virtlockd)
Summary: fix non-active block commit with automatic disk locking (virtlockd)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libvirt
Version: 8.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.1
Assignee: Peter Krempa
QA Contact: Han Han
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-16 16:19 UTC by Peter Krempa
Modified: 2020-05-05 09:45 UTC (History)
4 users (show)

Fixed In Version: libvirt-5.10.0-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-05 09:43:16 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1302168 0 unspecified CLOSED blockjob --pivot failed with virtlockd on after blockcopy for os images 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHBA-2020:2017 0 None None None 2020-05-05 09:45:46 UTC

Internal Links: 1302168

Description Peter Krempa 2016-12-16 16:19:54 UTC
Description of problem:
Images used in regular block copy are not handled properly with the lock manager.
When automatic disk locking is enabled this will cause problems.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. enable automatic locking
2. do few block commits of the same base image
3.

Actual results:
locking errors


Expected results:


Additional info:

Comment 4 Jaroslav Suchanek 2019-04-24 12:26:55 UTC
This bug is going to be addressed in next major release.

Comment 5 Peter Krempa 2019-11-27 08:43:17 UTC
As of the following commit

commit 3f93884a4d047a012b968c62b94ea07dadd1759b
Author: Peter Krempa <pkrempa>
Date:   Mon Jul 22 13:39:24 2019 +0200

    qemu: Add -blockdev support for block commit job
    
    Introduce the handler for finalizing a block commit and active bloc
    commit job which will allow to use it with blockdev.
    
if -blockdev is enabled we can properly remove locks from the backing chain members thus no locks should be leaked when virtlockd is used.

The blockdev feature was enabled since:

commit c6a9e54ce3252196f1fc6aa9e57537a659646d18
Author: Peter Krempa <pkrempa>
Date:   Mon Jan 7 11:45:19 2019 +0100

    qemu: enable blockdev support

    Now that all pieces are in place (hopefully) let's enable -blockdev.

    We base the capability on presence of the fix for 'auto-read-only' on
    files so that blockdev works properly, mandate that qemu supports
    explicit SCSI id strings to avoid ABI regression and that the fix for
    'savevm' is present so that internal snapshots work.

v5.9.0-390-gc6a9e54ce3

and requires upstream qemu-4.2 or appropriate downstream.

Comment 7 Han Han 2020-01-19 10:35:00 UTC
Verified on libvirt-6.0.0-1.module+el8.2.0+5453+31b2b136.x86_64 qemu-kvm-4.2.0-6.module+el8.2.0+5453+31b2b136.x86_64 selinux-policy-3.14.3-30.el8.noarch

Prepare: Set selinux to permissive to bypass BZ1792713

1. Set qemu.conf:
lock_manager = "lockd"

2. Restart libvirtd and virtlockd
# systemctl restart libvirtd.socket virtlockd.socket libvirtd virtlockd

3. Start an VM the do external snapshot and blockcommit:
➜  ~ virsh snapshot-create-as pc s1 --no-metadata --disk-only                                                                                                                                                     
Domain snapshot s1 created
➜  ~ virsh blockcommit pc vda --active --wait --verbose --pivot
Block commit: [100 %]

Comment 9 errata-xmlrpc 2020-05-05 09:43:16 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:2017


Note You need to log in before you can comment on or make changes to this bug.