Bug 1020495 - Disable live-storage-migration in virsh (migrate -b/-i in qemu)
Disable live-storage-migration in virsh (migrate -b/-i in qemu)
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.5
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Michal Privoznik
Virtualization Bugs
: TestOnly
Depends On: 1020493 1022392
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-17 14:55 EDT by Ademar Reis
Modified: 2014-06-26 09:41 EDT (History)
11 users (show)

See Also:
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 09:41:23 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ademar Reis 2013-10-17 14:55:31 EDT
+++ 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 06:18:07 EDT
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 06:19:51 EDT
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 08:18:15 EDT
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 Berrange 2013-10-18 08:22:04 EDT
(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 08:49:58 EDT
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 14:04:13 EDT
(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.

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