live migration failed when target host have different image_type than instance disk

Bug #1773318 reported by Alexandre arents
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Confirmed
Low
Unassigned

Bug Description

Description
===========

When a target host is preparing live-migration, it creates disk
according nova.conf setting CONF.libvirt.images_type
and do not preserve image type disk of instance, making fail live-migration

Use case:
===========
We have to convert a set of existing instance from qcow2 to raw.
In order to proceed we changed images_type of compute hosts to raw,
So that newly spawn instances are in raw.
It mean that during some time(until migration is done)
we may have both qcow2 and raw instances sharing same host(now configured as raw).
We still need to have live-migration working on our legacy instance in qcow2 to other
host now configured as raw (we want to keep qcow2 format on destination)

Steps to reproduce
==================

1) spawn one qcow2 instance on hostA
2) change settings images_type to raw on hostA and hostB
2) try to live migrate instance qcow2 from hostA to hostB
4) the issue occur:
   hostb prepare target disk in raw and qemu on hostb start with original xml settings expecting a qcow2 disk
/var/log/libvirt/qemu/instance-000170c9.log:2018-05-23T07:23:49.936829Z qemu-system-x86_64: -drive file=/home/instances/bdf1cea0-4d90-4061-bd1e-e20296a97f0e/disk,format=qcow2,...: Image is not in qcow2 format

Expected result
===============
instance keep its original format on target host even if target host have different image type.

Proposed solution:
keep original disk type of instance (patch to follow)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/570528

Changed in nova:
assignee: nobody → Alexandre arents (aarents)
status: New → In Progress
tags: added: queens-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Matt Riedemann (<email address hidden>) on branch: master
Review: https://review.opendev.org/570528
Reason: This is nearly a year old with no updates and might be fixed now in Train with blueprint request-filter-image-types so I'm going to abandon it.

Revision history for this message
Matt Riedemann (mriedem) wrote :

The blueprint request-filter-image-types might not solve the problem here, since that blueprint just makes sure the scheduler picks a host with a virt driver that supports the given image type on the server but that doesn't mean we can live migrate from a libvirt driver host using raw to one using qcow2. Anyway, the patch was super old and needed to be updated anyway.

Changed in nova:
assignee: Alexandre arents (aarents) → nobody
status: In Progress → New
Revision history for this message
Balazs Gibizer (balazs-gibizer) wrote :

Confirmed the bug based on the original (now abandoned) review https://review.opendev.org/570528

Changed in nova:
status: New → Confirmed
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.