Bug 1985452
| Summary: | Remove downstream-only commit allowing x-blockdev-reopen for libvirt when rebasing to qemu-6.1+ | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Peter Krempa <pkrempa> |
| Component: | qemu-kvm | Assignee: | Miroslav Rezanina <mrezanin> |
| qemu-kvm sub component: | Incremental Live Backup | QA Contact: | aihua liang <aliang> |
| Status: | CLOSED ERRATA | Docs Contact: | |
| Severity: | unspecified | ||
| Priority: | unspecified | CC: | aliang, coli, jdenemar, jinzhao, juzhang, mrezanin, ngu, virt-maint, yfu |
| Version: | 9.0 | Keywords: | RFE, Triaged |
| Target Milestone: | rc | Flags: | pm-rhel:
mirror+
|
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | qem-kvm-6.1.0-1.el9 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-05-17 12:23:26 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 1997408 | ||
| Bug Blocks: | 1986066 | ||
After reconsidering, the RHEL8 downstream shouldn't block this change which could be made for 9-Beta to avoid anyone "finding" the feature before 6.1 is rebased. Feel free to adjust ITR if addressed in 9-Beta, but by 9.0.0 this will need to be addressed. Should this be assigned to the package maintainer who will forward port downstream patches (Mirek?) because it's about just not forward porting a patch rather than doing some additional work on top of it? (In reply to Kevin Wolf from comment #2) > Should this be assigned to the package maintainer who will forward port > downstream patches (Mirek?) because it's about just not forward porting a > patch rather than doing some additional work on top of it? Yes, I remove our downstream patch during rebase so no need for you to handle. See bug 1867087 for more details about specific commit. Add Verified: Tested, SanityOnly as gating test pass Test with qemu-kvm-6.1.0-2.el9, the problem has been resolved.
Test Env:
kernel version:5.14.0-2.el9.x86_64
qemu-kvm version:qemu-kvm-6.1.0-2.el9
Test Steps:
1.Start guest with qemu cmd:
/usr/libexec/qemu-kvm \
-name 'avocado-vt-vm1' \
-sandbox on \
-machine q35,memory-backend=mem-machine_mem \
-device pcie-root-port,id=pcie-root-port-0,multifunction=on,bus=pcie.0,addr=0x1,chassis=1 \
-device pcie-pci-bridge,id=pcie-pci-bridge-0,addr=0x0,bus=pcie-root-port-0 \
-nodefaults \
-device VGA,bus=pcie.0,addr=0x2 \
-m 30720 \
-object memory-backend-ram,size=30720M,id=mem-machine_mem \
-smp 10,maxcpus=10,cores=5,threads=1,dies=1,sockets=2 \
-cpu 'Cascadelake-Server-noTSX',+kvm_pv_unhalt \
-chardev socket,path=/tmp/monitor-qmpmonitor1-20210921-225514-idUcfZd2,wait=off,id=qmp_id_qmpmonitor1,server=on \
-mon chardev=qmp_id_qmpmonitor1,mode=control \
-chardev socket,path=/tmp/monitor-catch_monitor-20210921-225514-idUcfZd2,wait=off,id=qmp_id_catch_monitor,server=on \
-mon chardev=qmp_id_catch_monitor,mode=control \
-device pvpanic,ioport=0x505,id=idDPASex \
-chardev socket,path=/tmp/serial-serial0-20210921-225514-idUcfZd2,wait=off,id=chardev_serial0,server=on \
-device isa-serial,id=serial0,chardev=chardev_serial0 \
-chardev socket,id=seabioslog_id_20210921-225514-idUcfZd2,path=/tmp/seabios-20210921-225514-idUcfZd2,server=on,wait=off \
-device isa-debugcon,chardev=seabioslog_id_20210921-225514-idUcfZd2,iobase=0x402 \
-device pcie-root-port,id=pcie-root-port-1,port=0x1,addr=0x1.0x1,bus=pcie.0,chassis=2 \
-device qemu-xhci,id=usb1,bus=pcie-root-port-1,addr=0x0 \
-device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \
-device pcie-root-port,id=pcie-root-port-2,port=0x2,addr=0x1.0x2,bus=pcie.0,chassis=3 \
--object iothread,id=iothread0 \
-device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pcie-root-port-2,addr=0x0,iothread=iothread0 \
-blockdev node-name=file_image1,driver=file,auto-read-only=on,discard=unmap,filename=/home/kvm_autotest_root/images/rhel900-64-virtio-scsi.qcow2,cache.direct=on,cache.no-flush=off \
-blockdev node-name=drive_image1,driver=qcow2,read-only=off,cache.direct=on,cache.no-flush=off,file=file_image1 \
-device scsi-hd,id=image1,drive=drive_image1,write-cache=on \
-device pcie-root-port,id=pcie-root-port-3,port=0x3,addr=0x1.0x3,bus=pcie.0,chassis=4 \
-device virtio-net-pci,mac=9a:7e:9e:9a:64:ac,id=idrdIdAW,netdev=idAmVV7i,bus=pcie-root-port-3,addr=0x0 \
-netdev tap,id=idAmVV7i,vhost=on \
-vnc :0 \
-rtc base=utc,clock=host,driftfix=slew \
-boot menu=off,order=cdn,once=c,strict=off \
-enable-kvm \
-device pcie-root-port,id=pcie_extra_root_port_0,multifunction=on,bus=pcie.0,addr=0x3,chassis=5 \
-monitor stdio \
-qmp tcp:0:3000,server=on,wait=off \
2.Add persistent bitmap to drive_image1
{ "execute": "block-dirty-bitmap-add", "arguments": {"node": "drive_image1", "name": "bitmap0","persistent":true}}
3.Create snapshot target: sn1 and do snapshot from drive_image1 to sn1
{'execute':'blockdev-create','arguments':{'options': {'driver':'file','filename':'/root/sn1','size':21474836480},'job-id':'job1'}}
{'execute':'blockdev-add','arguments':{'driver':'file','node-name':'drive_sn1','filename':'/root/sn1'}}
{'execute':'blockdev-create','arguments':{'options': {'driver': 'qcow2','file':'drive_sn1','size':21474836480},'job-id':'job2'}}
{'execute':'blockdev-add','arguments':{'driver':'qcow2','node-name':'sn1','file':'drive_sn1'}}
{'execute':'job-dismiss','arguments':{'id':'job1'}}
{'execute':'job-dismiss','arguments':{'id':'job2'}}
{"execute":"blockdev-snapshot","arguments":{"node":"drive_image1","overlay":"sn1"}}
4.Add persistent bitmap to sn1
{ "execute": "block-dirty-bitmap-add", "arguments": {"node": "sn1", "name": "bitmap0","persistent":true}}
5.Reopen backing image with x-blockdev-reopen
{'execute':'x-blockdev-reopen','arguments':{'driver':'qcow2','node-name':'drive_image1', "read-only":false,'file':'file_image1'}}
{"error": {"class": "CommandNotFound", "desc": "The command x-blockdev-reopen has not been found"}}
6.Reopen backing image with blockdev-reopen
{'execute':'blockdev-reopen','arguments':{'options':[{'driver':'qcow2','node-name':'drive_image1', "read-only":false,'file':'file_image1'}]}}
{"return": {}}
7.Remove all bitmaps
{ "execute": "transaction", "arguments": { "actions": [ {"type": "block-dirty-bitmap-remove","data":{"node":"drive_image1","name":"bitmap0"}},{"type": "block-dirty-bitmap-remove","data":{"node":"sn1","name":"bitmap0"}}]}}
{"return": {}}
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 (new packages: qemu-kvm), 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-2022:2307 |
Description of problem: The downstream-only commit adding the versioned flag which is used by libvirt to enable x-blockdev-reopen downstream must be removed when rebasing to qemu-6.1 which now has full support for blockdev-reopen from upstream. commit 989cfded8fdd5df3b6b1f1a304ca16c128d7561b Author: Kevin Wolf <kwolf> Date: Fri Mar 13 12:34:32 2020 +0000 block: Versioned x-blockdev-reopen API with feature flag RH-Author: Kevin Wolf <kwolf> Message-id: <20200313123439.10548-7-kwolf> Patchwork-id: 94283 O-Subject: [RHEL-AV-8.2.0 qemu-kvm PATCH v2 06/13] block: Versioned x-blockdev-reopen API with feature flag Bugzilla: 1790482 1805143 RH-Acked-by: Eric Blake <eblake> RH-Acked-by: John Snow <jsnow> RH-Acked-by: Daniel P. Berrange <berrange> RH-Acked-by: Peter Krempa <pkrempa> x-blockdev-reopen is still considered unstable upstream. libvirt needs (a small subset of) it for incremental backups, though. Add a downstream-only feature flag that effectively makes this a versioned interface. As long as the feature is present, we promise that we won't change the interface incompatibly. Incompatible changes to the command will require us to drop the feature flag (and possibly introduce a new one if the new version is still not stable upstream). Signed-off-by: Kevin Wolf <kwolf> Signed-off-by: Danilo C. L. de Paula <ddepaula>