Bug 1086598
Summary: | migrate_cancel wont take effect on previouly wrong migrate -d cmd | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Xiaoqing Wei <xwei> |
Component: | qemu-kvm | Assignee: | Amit Shah <amit.shah> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.0 | CC: | amit.shah, huding, juzhang, knoel, lcapitulino, michen, qzhang, rbalakri, shuang, virt-maint |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | qemu-kvm-1.5.3-66.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-03-05 08:05:42 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: |
Description
Xiaoqing Wei
2014-04-11 07:37:41 UTC
We need to backport commit c950114286ea358a93ce632db0421945e1008395 Author: Luiz Capitulino <> Date: Sun Dec 29 22:39:58 2013 -0500 migration: qmp_migrate(): keep working after syntax error If a user or QMP client enter a bad syntax for the migrate command in QMP/HMP, then the migrate command will never succeed from that point on. For example, if you enter: (qemu) migrate tcp;0:4444 migrate: Parameter 'uri' expects a valid migration protocol Then the migrate command will always fail from now on: (qemu) migrate tcp:0:4444 migrate: There's a migration process in progress The problem is that qmp_migrate() sets the migration status to MIG_STATE_SETUP and doesn't reset it on syntax error. This bug was introduced by commit 29ae8a4133082e16970c9d4be09f4b6a15034617. *** Bug 1047943 has been marked as a duplicate of this bug. *** Fix included in qemu-kvm-1.5.3-66.el7 Reproduce this bug using the following version: qemu-kvm-1.5.3-60.el7.x86_64 kernel-3.10.0-140.el7.x86_64 Steps to Reproduce: 1. boot a src vm #/usr/libexec/qemu-kvm -S -monitor stdio QEMU 1.5.3 monitor - type 'help' for more information (qemu) VNC server running on `::1:5900' dst vm in incoming mode # /usr/libexec/qemu-kvm -S -monitor stdio -incoming tcp:0:8100 QEMU 1.5.3 monitor - type 'help' for more information (qemu) VNC server running on `::1:5901' 2. send wrong uri on src SRC: (qemu) migrate -d 0:8100 migrate: Parameter 'uri' expects a valid migration protocol 3. send correct uri on src SRC: (qemu) migrate -d tcp:0:8100 migrate: There's a migration process in progress Results: after step3, if user or QMP client enter a bad syntax for the migrate command in QMP/HMP, then the migrate command will never succeed from that point on. Test this issue using the following version on an amd host: qemu-kvm-1.5.3-66.el7.x86_64 kernel-3.10.0-140.el7.x86_64 Steps to Test: 1. boot a src vm #/usr/libexec/qemu-kvm -S -monitor stdio -qmp tcp:0:4445,server,nowait QEMU 1.5.3 monitor - type 'help' for more information (qemu) VNC server running on `::1:5900' dst vm in incoming mode # /usr/libexec/qemu-kvm -S -monitor stdio -incoming tcp:0:8100 QEMU 1.5.3 monitor - type 'help' for more information (qemu) VNC server running on `::1:5901' 2. send wrong HMP migration cmd on src SRC: (qemu) migrate -d 0:8100 migrate: Parameter 'uri' expects a valid migration protocol 3. send correct HMP migration cmd on src SRC: (qemu) migrate -d tcp:0:8100 4. boot a src vm #/usr/libexec/qemu-kvm -S -monitor stdio -qmp tcp:0:4445,server,nowait QEMU 1.5.3 monitor - type 'help' for more information (qemu) VNC server running on `::1:5900' dst vm in incoming mode # /usr/libexec/qemu-kvm -S -monitor stdio -incoming tcp:0:8100 QEMU 1.5.3 monitor - type 'help' for more information (qemu) VNC server running on `::1:5901' 5. send wrong QMP migration cmd on src {"execute":"qmp_capabilities"} {"return": {}} {"execute": "migrate","arguments":{"uri": "0:8100"}} {"error": {"class": "GenericError", "desc": "Parameter 'uri' expects a valid migration protocol"}} 6. send correct QMP migration cmd on src {"execute": "migrate","arguments":{"uri": "tcp:0:8100"}} {"return": {}} Results: after step3, no error info, and use "info migrate" to check the migration is completed as following (qemu) info migrate capabilities: xbzrle: off x-rdma-pin-all: off auto-converge: off zero-blocks: off Migration status: completed total time: 32 milliseconds downtime: 3 milliseconds setup: 0 milliseconds transferred ram: 565 kbytes throughput: 0.00 mbps remaining ram: 0 kbytes total ram: 148172 kbytes duplicate: 36983 pages skipped: 0 pages normal: 60 pages normal bytes: 240 kbytes after step6, migration is completed through checking: {"execute":"query-migrate"} {"return": {"status": "completed", "setup-time": 0, "downtime": 3, "total-time": 32, "ram": {"total": 151728128, "remaining": 0, "mbps": 0, "transferred": 579220, "duplicate": 36983, "dirty-pages-rate": 0, "skipped": 0, "normal-bytes": 245760, "normal": 60}}} Test this bug using the following version on an amd host: qemu-kvm-rhev-2.1.0-3.el7ev.preview.x86_64 kernel-3.10.0-140.el7.x86_64 The steps are same as comment 6, the results are as following: after step3, no error info, and use "info migrate" to check the migration is completed as following (qemu) info migrate capabilities: xbzrle: off x-rdma-pin-all: off auto-converge: off zero-blocks: off Migration status: completed total time: 32 milliseconds downtime: 3 milliseconds setup: 0 milliseconds transferred ram: 565 kbytes throughput: 0.00 mbps remaining ram: 0 kbytes total ram: 148172 kbytes duplicate: 36983 pages skipped: 0 pages normal: 60 pages normal bytes: 240 kbytes after step6, migration is completed through checking: {"execute":"query-migrate"} {"return": {"status": "completed", "setup-time": 0, "downtime": 3, "total-time": 32, "ram": {"total": 151728128, "remaining": 0, "mbps": 0, "transferred": 579220, "duplicate": 36983, "dirty-pages-rate": 0, "skipped": 0, "normal-bytes": 245760, "normal": 60}}} Test this bug using the following version on an amd host: qemu-kvm-1.5.3-66.el7.x86_64 kernel-3.10.0-140.el7.x86_64 The steps are same as comment 6, the results are as following: after step3, no error info, and use "info migrate" to check the migration is completed as following (qemu) info migrate capabilities: xbzrle: off x-rdma-pin-all: off auto-converge: off zero-blocks: off Migration status: completed total time: 32 milliseconds downtime: 3 milliseconds setup: 0 milliseconds transferred ram: 565 kbytes throughput: 0.00 mbps remaining ram: 0 kbytes total ram: 148172 kbytes duplicate: 36983 pages skipped: 0 pages normal: 60 pages normal bytes: 240 kbytes after step6, migration is completed through checking: {"execute":"query-migrate"} {"return": {"status": "completed", "setup-time": 0, "downtime": 3, "total-time": 32, "ram": {"total": 151728128, "remaining": 0, "mbps": 0, "transferred": 579220, "duplicate": 36983, "dirty-pages-rate": 0, "skipped": 0, "normal-bytes": 245760, "normal": 60}}} (In reply to huiqingding from comment #8) > Test this bug using the following version on an amd host: Correction: this test is on an intel host > qemu-kvm-1.5.3-66.el7.x86_64 > kernel-3.10.0-140.el7.x86_64 > > The steps are same as comment 6, the results are as following: > after step3, no error info, and use "info migrate" to check the migration is > completed as following > (qemu) info migrate > capabilities: xbzrle: off x-rdma-pin-all: off auto-converge: off > zero-blocks: off > Migration status: completed > total time: 32 milliseconds > downtime: 3 milliseconds > setup: 0 milliseconds > transferred ram: 565 kbytes > throughput: 0.00 mbps > remaining ram: 0 kbytes > total ram: 148172 kbytes > duplicate: 36983 pages > skipped: 0 pages > normal: 60 pages > normal bytes: 240 kbytes > > after step6, migration is completed through checking: > {"execute":"query-migrate"} > {"return": {"status": "completed", "setup-time": 0, "downtime": 3, > "total-time": 32, "ram": {"total": 151728128, "remaining": 0, "mbps": 0, > "transferred": 579220, "duplicate": 36983, "dirty-pages-rate": 0, "skipped": > 0, "normal-bytes": 245760, "normal": 60}}} Test this bug using the following version on an intel host: qemu-kvm-rhev-2.1.0-3.el7ev.preview.x86_64 kernel-3.10.0-140.el7.x86_64 The steps are same as comment 6, the results are as following: after step3, no error info, and use "info migrate" to check the migration is completed as following (qemu) info migrate capabilities: xbzrle: off x-rdma-pin-all: off auto-converge: off zero-blocks: off Migration status: completed total time: 32 milliseconds downtime: 3 milliseconds setup: 0 milliseconds transferred ram: 565 kbytes throughput: 0.00 mbps remaining ram: 0 kbytes total ram: 148172 kbytes duplicate: 36983 pages skipped: 0 pages normal: 60 pages normal bytes: 240 kbytes after step6, migration is completed through checking: {"execute":"query-migrate"} {"return": {"status": "completed", "setup-time": 0, "downtime": 3, "total-time": 32, "ram": {"total": 151728128, "remaining": 0, "mbps": 0, "transferred": 579220, "duplicate": 36983, "dirty-pages-rate": 0, "skipped": 0, "normal-bytes": 245760, "normal": 60}}} The CPU vendor makes no difference for this issue, and your test is good. 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://rhn.redhat.com/errata/RHSA-2015-0349.html |