Bug 1020495

Summary: Disable live-storage-migration in virsh (migrate -b/-i in qemu)
Product: Red Hat Enterprise Linux 6 Reporter: Ademar Reis <areis>
Component: libvirtAssignee: Michal Privoznik <mprivozn>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.5CC: acathrow, areis, berrange, bsarathy, dyuan, eblake, jdenemar, mkenneth, virt-maint, ydu, zpeng
Target Milestone: rcKeywords: TestOnly
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1020493
: 1022393 (view as bug list) Environment:
Last Closed: 2014-06-26 13:41:23 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: 1020493, 1022392    
Bug Blocks:    

Description Ademar Reis 2013-10-17 18:55:31 UTC
+++ This bug was initially created as a clone of Bug #1020493 +++

Via QMP, migrate -b (and -i) is available in our RHEL-6.x packages, but this option is not supported and was introduced by accident. The proper way to migrate a VM without shared storage is using drive_mirror and NBD, as supported in the -rhev flavor of QEMU.

virsh migrate --live --copy-storage-{all,inc} currently calls migrate -b in RHEL6.x and apparently it automatically calls block_stream if it's available (for example, in RHEV). This BZ will be cloned against libvirt to make sure these options are properly handled after the removal of migrate -b.

Comment 2 Jiri Denemark 2013-10-18 10:18:07 UTC
I don't think there anything we could or should do in libvirt. If a user specifies any of the options, libvirtd will run migrate with blk or inc arguments set to true and it's up to QEMU to fail if it doesn't support them. We don't have any way to check support for these arguments upfront. More over, you can't just remove them completely as libvirtd will always set them (to either true or false). Or did I get it wrong and this bug only affects HMP? If that's the case, libvirt does not use HMP for migration in RHEL 6.

Comment 3 Jiri Denemark 2013-10-18 10:19:51 UTC
I'm switching this bug to TestOnly. But if it turns out to be a HMP-only issue, I'll just close this as NOTABUG.

Comment 4 Ademar Reis 2013-10-18 12:18:15 UTC
I mentioned migrate -b out of habit. In fact this bug is about the removal of block copy and incremental copy in the migration command (in QMP: blk and inc parameters to migrate).

Users get to live storage migration via commands such as "virsh --live --copy-storage-{inc,all}". Ideally, they should not be present in RHEL, as they're not supported.

For more context, please check bug 1015979 (as I write this, turns out it's way more complicated than we originally though).

Comment 5 Daniel Berrangé 2013-10-18 12:22:04 UTC
(In reply to Ademar de Souza Reis Jr. from comment #4)
> Users get to live storage migration via commands such as "virsh --live
> --copy-storage-{inc,all}". Ideally, they should not be present in RHEL, as
> they're not supported.

virsh is a libvirt client application and can connect to a libvirtd host on any platform, even those which *do* support storage migration. As such, it would be inappropriate to remove these flags from virsh.

Comment 6 Eric Blake 2013-10-18 12:49:58 UTC
The best we can do in virsh is that if both 'migrate -b' and NBD are missing, we give a sane error message telling the user it is unsupported.  About the only thing this BZ can do is make sure that the failure is handled gracefully, if it is not already.

Comment 7 Ademar Reis 2013-10-18 18:04:13 UTC
(In reply to Daniel Berrange from comment #5)
> (In reply to Ademar de Souza Reis Jr. from comment #4)
> > Users get to live storage migration via commands such as "virsh --live
> > --copy-storage-{inc,all}". Ideally, they should not be present in RHEL, as
> > they're not supported.
> 
> virsh is a libvirt client application and can connect to a libvirtd host on
> any platform, even those which *do* support storage migration. As such, it
> would be inappropriate to remove these flags from virsh.

Good point. Which makes everything even more complicated: we should make it clear in the documentation (e.g.: Virt Admin Guides) that some features are not supported in RHEL, but the options are there in case the user connects to a remote libvirtd instance that supports it... Is it worth it? Is it the original intention?

(In reply to Eric Blake from comment #6)
> The best we can do in virsh is that if both 'migrate -b' and NBD are
> missing, we give a sane error message telling the user it is unsupported. 
> About the only thing this BZ can do is make sure that the failure is handled
> gracefully, if it is not already.

That's the idea (whenever we touch QMP in QEMU, we'll clone the bug to libvirt to stay on the safe side). So I'm moving this bug back to NEW. Feel free to move it back to ON_QA if you think no changes are needed.