Bug 1829544

Summary: Stop using deprecated "query-migrate-cache-size" QMP command
Product: Red Hat Enterprise Linux Advanced Virtualization Reporter: Peter Krempa <pkrempa>
Component: libvirtAssignee: Jiri Denemark <jdenemar>
Status: CLOSED ERRATA QA Contact: Fangge Jin <fjin>
Severity: medium Docs Contact:
Priority: high    
Version: 8.2CC: chhu, fjin, hhan, jdenemar, jsuchane, lizhu, lmen, virt-maint, xuzhang
Target Milestone: rcKeywords: Triaged
Target Release: 8.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-6.5.0-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1829699 (view as bug list) Environment:
Last Closed: 2020-11-17 17:48:27 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:    
Bug Blocks: 1829699    

Description Peter Krempa 2020-04-29 18:22:18 UTC
Description of problem:
"query-migrate-cache-size" is deprecated since qemu-2.11 and should be replaced by 'query-migrate-parameters'. Libvirt still uses it in qemuDomainMigrateGetCompressionCache.

When fixing this, please also adjust the test case to mark the command as okay to be removed.

Comment 1 Jiri Denemark 2020-06-08 13:20:02 UTC
*** Bug 1845012 has been marked as a duplicate of this bug. ***

Comment 2 Jiri Denemark 2020-06-10 18:26:46 UTC
Patches sent upstream for review: https://www.redhat.com/archives/libvir-list/2020-June/msg00444.html

Comment 3 Jiri Denemark 2020-06-17 08:29:25 UTC
Fixed upstream by

commit 0b45addf199e130d2b956698515aa127b9645244
Refs: v6.4.0-125-g0b45addf19
Author:     Jiri Denemark <jdenemar>
AuthorDate: Wed Jun 10 16:13:15 2020 +0200
Commit:     Jiri Denemark <jdenemar>
CommitDate: Wed Jun 17 10:25:33 2020 +0200

    qemu: Avoid deprecated query-migrate-cache-size QMP command

    The same functionality can be achieved using query-migrate-parameters
    QMP command and checking the xbzrle-cache-size parameter.

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

    Signed-off-by: Jiri Denemark <jdenemar>
    Reviewed-by: Peter Krempa <pkrempa>

Comment 7 Fangge Jin 2020-07-31 09:24:46 UTC
Reproduce with:
libvirt-client-6.4.0-1.module+el8.3.0+6881+88468c00.x86_64
qemu-kvm-4.1.0-14.module+el8.2.0+4670+07fe2774.x86_64

Steps:
set cache size by virsh migrate-compcache, migrate-set-cache-size/query-migrate-cache-size is used:
# virsh migrate-compcache rhel7-min  --size=536870912
Compression cache: 512.000 MiB

2020-07-31 08:09:33.502+0000: 40506: info : qemuMonitorSend:935 : QEMU_MONITOR_SEND_MSG: mon=0x7f6af0036b20 msg={"execute":"migrate-set-cache-size","arguments":{"value":536870912},"id":"libvirt-288"}
2020-07-31 08:09:33.504+0000: 40508: info : qemuMonitorSend:935 : QEMU_MONITOR_SEND_MSG: mon=0x7f6af0036b20 msg={"execute":"query-migrate-cache-size","id":"libvirt-289"}

Comment 8 Fangge Jin 2020-07-31 09:24:59 UTC
Verify with:
qemu-kvm-5.0.0-2.module+el8.3.0+7379+0505d6ca.x86_64
libvirt-client-6.5.0-1.module+el8.3.0+7323+d54bb644.x86_64

Result:
query-migrate-parameters is used.

Steps:
1)
# virsh migrate-compcache rhel7-min  --size=536870912
Compression cache: 512.000 MiB

2)
# virsh migrate-compcache rhel7-min  
Compression cache: 512.000 MiB

Comment 9 Fangge Jin 2020-07-31 09:26:22 UTC
Still need to verify with qemu-kvm that doesn't support query cache size by query-migrate-parameters

Comment 10 Han Han 2020-07-31 09:37:07 UTC
(In reply to Fangge Jin from comment #9)
> Still need to verify with qemu-kvm that doesn't support query cache size by
> query-migrate-parameters

I don't think so. For el8, no qemu-kvm version is less that v2.11.

Comment 11 Fangge Jin 2020-08-27 09:40:19 UTC
(In reply to Fangge Jin from comment #9)
> Still need to verify with qemu-kvm that doesn't support query cache size by
> query-migrate-parameters

To test this scenario, I will have to test upgrade from RHEL7.5 to RHELAV-8.3, which is not supported.
So this bug can be marked as verified.

Comment 14 errata-xmlrpc 2020-11-17 17:48:27 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 (virt:8.3 bug fix and enhancement update), 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:5137