Bug 1717168 - Add facility to use block jobs with backing images without write permission
Summary: Add facility to use block jobs with backing images without write permission
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: qemu-kvm
Version: ---
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.1
Assignee: Kevin Wolf
QA Contact: aihua liang
URL:
Whiteboard:
: 1671798 (view as bug list)
Depends On: 1685989
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-06-04 20:05 UTC by Ademar Reis
Modified: 2019-11-06 07:17 UTC (History)
13 users (show)

Fixed In Version: qemu-kvm-4.1.0-1.module+el8.1.0+3966+4a23dca1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1685989
Environment:
Last Closed: 2019-11-06 07:16:08 UTC
Type: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:3723 0 None None None 2019-11-06 07:17:06 UTC

Comment 1 CongLi 2019-06-05 00:55:13 UTC
*** Bug 1671798 has been marked as a duplicate of this bug. ***

Comment 4 aihua liang 2019-08-29 07:47:40 UTC
Have run regression test on 8.1 with qemu-kvm-4.1.0-5.module+el8.1.0+4076+b5e41ebc.x86_64, all works well except one bug: https://bugzilla.redhat.com/show_bug.cgi?id=1746631.

Set this bug's status to "Verified" and track the new issue by the new reported bug.

Comment 5 Han Han 2019-08-30 02:08:34 UTC
yisun, could you please check it in libvirt?

Comment 6 yisun 2019-09-16 09:18:36 UTC
test with libvirt-5.6.0-4.module+el8.1.0+4160+b50057dc.x86_64
blockcommit "from top to middle" and "from top to base", nothing wrong
$ ps -ef | grep avocado-vt-vm1 | grep blockdev
qemu      8377     1 90 04:56 ?        00:00:05 /usr/libexec/qemu-kvm -name guest=avocado-vt-vm1,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-11-avocado-vt-vm1/master-key.aes -machine pc-q35-rhel8.1.0,accel=kvm,usb=off,dump-guest-core=off -cpu IvyBridge-IBRS,ss=on,vmx=off,pcid=on,hypervisor=on,arat=on,tsc-adjust=on,umip=on,md-clear=on,stibp=on,arch-capabilities=on,ssbd=on,xsaveopt=on,skip-l1dfl-vmentry=on -m 1024 -overcommit mem-lock=off -smp 2,sockets=2,cores=1,threads=1 -uuid 49cbb62f-893a-47c4-86bd-fe67e1b26d17 -no-user-config -nodefaults -chardev socket,id=charmonitor,fd=37,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc,driftfix=slew -global kvm-pit.lost_tick_policy=delay -no-hpet -no-shutdown -global ICH9-LPC.disable_s3=1 -global ICH9-LPC.disable_s4=1 -boot strict=on -device pcie-root-port,port=0x10,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x2 -device pcie-root-port,port=0x11,chassis=2,id=pci.2,bus=pcie.0,addr=0x2.0x1 -device pcie-root-port,port=0x12,chassis=3,id=pci.3,bus=pcie.0,addr=0x2.0x2 -device pcie-root-port,port=0x13,chassis=4,id=pci.4,bus=pcie.0,addr=0x2.0x3 -device pcie-root-port,port=0x14,chassis=5,id=pci.5,bus=pcie.0,addr=0x2.0x4 -device pcie-root-port,port=0x15,chassis=6,id=pci.6,bus=pcie.0,addr=0x2.0x5 -device pcie-root-port,port=0x16,chassis=7,id=pci.7,bus=pcie.0,addr=0x2.0x6 -device qemu-xhci,p2=15,p3=15,id=usb,bus=pci.2,addr=0x0 -device virtio-serial-pci,id=virtio-serial0,bus=pci.3,addr=0x0 -blockdev {"driver":"file","filename":"/var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.qcow2","node-name":"libvirt-5-storage","auto-read-only":true,"discard":"unmap"} -blockdev {"node-name":"libvirt-5-format","read-only":true,"driver":"qcow2","file":"libvirt-5-storage","backing":null} -blockdev {"driver":"file","filename":"/var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.s1","node-name":"libvirt-4-storage","auto-read-only":true,"discard":"unmap"} -blockdev {"node-name":"libvirt-4-format","read-only":true,"driver":"qcow2","file":"libvirt-4-storage","backing":"libvirt-5-format"} -blockdev {"driver":"file","filename":"/var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.s2","node-name":"libvirt-3-storage","auto-read-only":true,"discard":"unmap"} -blockdev {"node-name":"libvirt-3-format","read-only":true,"driver":"qcow2","file":"libvirt-3-storage","backing":"libvirt-4-format"} -blockdev {"driver":"file","filename":"/var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.s3","node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"} -blockdev {"node-name":"libvirt-2-format","read-only":true,"driver":"qcow2","file":"libvirt-2-storage","backing":"libvirt-3-format"} -blockdev {"driver":"file","filename":"/var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.s4","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"} -blockdev {"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2","file":"libvirt-1-storage","backing":"libvirt-2-format"} -device virtio-blk-pci,scsi=off,bus=pci.4,addr=0x0,drive=libvirt-1-format,id=virtio-disk0,bootindex=1 -netdev tap,fd=39,id=hostnet0,vhost=on,vhostfd=40 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:63:1a:31,bus=pci.1,addr=0x0 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev socket,id=charchannel0,fd=41,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 -device usb-tablet,id=input0,bus=usb.0,port=1 -vnc 127.0.0.1:0 -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vram64_size_mb=0,vgamem_mb=16,max_outputs=1,bus=pcie.0,addr=0x1 -device virtio-balloon-pci,id=balloon0,bus=pci.5,addr=0x0 -object rng-random,id=objrng0,filename=/dev/urandom -device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.6,addr=0x0 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny -msg timestamp=on


$ virsh blockcommit avocado-vt-vm1 vda --top /var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.s4 --base /var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.s3 --active
Active Block Commit started

$ ll -Z /var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.*
-rw-r--r--. 1 qemu qemu system_u:object_r:svirt_image_t:s0           799735808 Sep 16 04:51 /var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.qcow2
-rw-------. 1 qemu qemu system_u:object_r:virt_content_t:s0             196768 Sep 16 04:52 /var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.s1
-rw-------. 1 qemu qemu system_u:object_r:virt_content_t:s0             196768 Sep 16 04:52 /var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.s2
-rw-------. 1 qemu qemu system_u:object_r:svirt_image_t:s0:c116,c607  35258368 Sep 16 05:11 /var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.s3
-rw-------. 1 qemu qemu system_u:object_r:svirt_image_t:s0:c116,c607  35258368 Sep 16 05:08 /var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.s4

$ virsh blockjob avocado-vt-vm1 vda --pivot
$ ll -Z /var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.*
-rw-r--r--. 1 qemu qemu system_u:object_r:svirt_image_t:s0           799735808 Sep 16 04:51 /var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.qcow2
-rw-------. 1 qemu qemu system_u:object_r:virt_content_t:s0             196768 Sep 16 04:52 /var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.s1
-rw-------. 1 qemu qemu system_u:object_r:virt_content_t:s0             196768 Sep 16 04:52 /var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.s2
-rw-------. 1 qemu qemu system_u:object_r:svirt_image_t:s0:c116,c607  35258368 Sep 16 05:11 /var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.s3
-rw-------. 1 root root system_u:object_r:var_lib_t:s0                35258368 Sep 16 05:08 /var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.s4

$ virsh blockcommit avocado-vt-vm1 vda --pivot
Successfully pivoted

$ ll -Z /var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.*
-rw-r--r--. 1 qemu qemu system_u:object_r:svirt_image_t:s0           799735808 Sep 16 05:12 /var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.qcow2
-rw-------. 1 qemu qemu system_u:object_r:virt_content_t:s0             196768 Sep 16 04:52 /var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.s1
-rw-------. 1 qemu qemu system_u:object_r:virt_content_t:s0             196768 Sep 16 04:52 /var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.s2
-rw-------. 1 qemu qemu system_u:object_r:svirt_image_t:s0:c116,c607  35258368 Sep 16 05:12 /var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.s3
-rw-------. 1 root root system_u:object_r:var_lib_t:s0

Comment 8 errata-xmlrpc 2019-11-06 07:16:08 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-2019:3723


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