Unable to swap between RBD volumes using virDomainBlockRebase
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
High
|
Lee Yarwood |
Bug Description
Description
===========
$subject, the use of libvirt's virDomainBlockR
This is additionally blocked by the following conditional in Nova's libvirt driver:
This is however possible with the virDomainBlockCopy API [2] when the domain is using the new -blockdev framework for detailing how disks are attached to the guest.
[1] https:/
[2] https:/
Steps to reproduce
==================
* Launch an instance with a RBD volume attached.
* Try to swap to another volume.
Expected result
===============
Success using virDomainBlockCopy.
Actual result
=============
Failure using virDomainBlockR
Environment
===========
1. Exact version of OpenStack you are running. See the following
list for all releases: http://
master
2. Which hypervisor did you use?
(For example: Libvirt + KVM, Libvirt + XEN, Hyper-V, PowerKVM, ...)
What's the version of that?
libvirt + QEMU/KVM
2. Which storage type did you use?
(For example: Ceph, LVM, GPFS, ...)
What's the version of that?
Ceph
3. Which networking type did you use?
(For example: nova-network, Neutron with OpenVSwitch, ...)
N/A
Changed in nova: | |
importance: | Undecided → High |
tags: | added: ceph libvirt volumes |
Changed in nova: | |
assignee: | nobody → Lee Yarwood (lyarwood) |
status: | New → In Progress |
Reviewed: https:/ /review. opendev. org/696834 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=fafbc182f91 79c16b89c45d025 44d4582e0a1194
Committed: https:/
Submitter: Zuul
Branch: master
commit fafbc182f9179c1 6b89c45d02544d4 582e0a1194
Author: Lee Yarwood <email address hidden>
Date: Sun Dec 1 16:32:47 2019 +0000
libvirt: Use virDomainBlockCopy to swap volumes when using -blockdev
Previously virDomainBlockR ebase [1] was used by swap_volume to switch
between volumes presented to the compute host as block devices or files.
As outlined in the virDomainBlockCopy [2] documentation this command is ebase in our case:
actually a superset of virDomainBlockR
> This command is a superset of the older virDomainBlockR ebase() when used BLOCK_REBASE_ COPY flag, and offers better control
> with the VIR_DOMAIN_
> over the destination format, the ability to copy to a destination that
> is not a local file, and the possibility of additional tuning
> parameters.
As such we can switch to virDomainBlockCopy and expand support for
swap_volume outside of just host block devices and files.
To allow swap_volume to support RBD volumes we also need the domain to BLOCKDEV and MIN_QEMU_BLOCKDEV
use the recently introduced -blockdev support within libvirt >= 6.0.0
and QEMU >= 4.2.0. New MIN_LIBVIRT_
version constants are introduced and used to determine when to switch to
the virDomainBlockCopy method of moving between volumes.
[1] https:/ /libvirt. org/html/ libvirt- libvirt- domain. html#virDomainB lockRebase /libvirt. org/html/ libvirt- libvirt- domain. html#virDomainB lockCopy
[2] https:/
Closes-Bug: #1868996 215bba9b7575c5c 6abfe41da31
Change-Id: I8e8035dcf508f5