Bug 1550022 - Migration can't be performed again after tunnelled migration with copy storage fails.
Summary: Migration can't be performed again after tunnelled migration with copy storag...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.5
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: alpha
: 7.6
Assignee: Dr. David Alan Gilbert
QA Contact: Gu Nini
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-28 10:33 UTC by Fangge Jin
Modified: 2018-11-01 11:06 UTC (History)
16 users (show)

Fixed In Version: qemu-kvm-rhev-2.12.0-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-01 11:06:51 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Fangge Jin 2018-02-28 10:33:54 UTC
Description of problem:
Migration can't be performed again after tunnelled migration with copy storage fails.

Version-Release number of selected component:
libvirt-3.9.0-13.el7.x86_64
qemu-kvm-rhev-2.10.0-21.el7.x86_64


How reproducible:
100%

Steps to Reproduce:
1. Start a guest with local storage

2. Migrate it with --tunnelled --copy-storage-all, fails
# virsh migrate foo qemu+ssh://intel-i72600-03.qe.lab.eng.nay.redhat.com/system  --live --verbose  --copy-storage-all --p2p --tunnelled
error: internal error: unable to execute QEMU command 'migrate': QEMU compiled without old-style (blk/-b, inc/-i) block migration

3. Migrate it with --copy-storage-all, still fails
# virsh migrate foo qemu+ssh://intel-i72600-03.qe.lab.eng.nay.redhat.com/system  --live --verbose  --copy-storage-all 
Migration: [100 %]error: internal error: unable to execute QEMU command 'migrate-set-capabilities': QEMU compiled without old-style (blk/-b, inc/-i) block migration

4. Migrate it without --copy-storage-all, still fails
# virsh migrate foo qemu+ssh://intel-i72600-03.qe.lab.eng.nay.redhat.com/system  --live --verbose 
error: internal error: unable to execute QEMU command 'migrate-set-capabilities': QEMU compiled without old-style (blk/-b, inc/-i) block migration

5. Save guest, the command hangs .
# virsh managedsave foo

# virsh list
 Id    Name                           State
----------------------------------------------------
 19    foo                            paused

# virsh qemu-monitor-command foo --cmd '{"execute":"query-status"}'
{"return":{"status":"finish-migrate","singlestep":false,"running":false},"id":"libvirt-59"}

# virsh domjobinfo foo
Job type:         Unbounded   
Operation:        Save        
Time elapsed:     0            ms


6. Destroy and start guest again
# virsh destroy foo
# virsh start foo

7.Do migration with --copy-storage-all, succeed:
virsh migrate foo qemu+ssh://intel-i72600-03.qe.lab.eng.nay.redhat.com/system  --live --verbose  --copy-storage-all
Migration: [100 %]


Actual results:
As steps

Expected results:
1. Step2: Tunnelled migration with copy storage should succeed
2. Step3~5: after one migration fails, the following migrations should not be affected

Comment 2 Jiri Denemark 2018-02-28 11:35:33 UTC
Could you please provide libvirtd's debug logs and QEMU logs from both sides of migration (see https://wiki.libvirt.org/page/DebugLogs)?

Comment 3 Dr. David Alan Gilbert 2018-02-28 11:40:33 UTC
yep, can repeat it here:

[root@virtlab402 qemu]# virsh migrate blockmigtest qemu+ssh://ibpair/system --live --verbose --copy-storage-all --p2p --tunnelled
error: internal error: unable to execute QEMU command 'migrate-set-capabilities': QEMU compiled without old-style (blk/-b, inc/-i) block migration

[root@virtlab402 qemu]# virsh migrate blockmigtest qemu+ssh://ibpair/system --live --verbose --copy-storage-all 
Migration: [ 99 %]error: internal error: unable to execute QEMU command 'migrate-set-capabilities': QEMU compiled without old-style (blk/-b, inc/-i) block migration

Comment 4 Dr. David Alan Gilbert 2018-02-28 13:30:59 UTC
Yes, I can confirm this on upstrem as well:

(qemu) migrate -d -b  "exec:cat > /dev/null"
QEMU compiled without old-style (blk/-b, inc/-i) block migration
Use drive_mirror+NBD instead.
(qemu) migrate_set_capability xbzrle off
QEMU compiled without old-style (blk/-b, inc/-i) block migration
Use drive_mirror+NBD instead.
(qemu) migrate -d  "exec:cat > /dev/null"
(qemu) migrate_set_capability xbzrle off
QEMU compiled without old-style (blk/-b, inc/-i) block migration
Use drive_mirror+NBD instead.
(qemu) 


I think we're missing/screwed-up the call to block_cleanup_parameters

Comment 5 Dr. David Alan Gilbert 2018-02-28 16:50:11 UTC
Posted upstream:

  [PATCH] migration: Fix block failure cases

Comment 7 Dr. David Alan Gilbert 2018-03-07 16:53:58 UTC
Instead of my patch, Peter Xu's 'migration: fix applying wrong capabilities' is a better fix here.

Comment 12 Gu Nini 2018-05-08 05:19:16 UTC
With the same steps in the bug description, reproduced the bug on qemu-kvm-rhev-2.10.0-21.el7.x86_64, and verified the bug on qemu-kvm-rhev-2.12.0-1.el7.x86_64.

Comment 13 errata-xmlrpc 2018-11-01 11:06:51 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-2018:3443


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