fail to boot an instance because of "rbd import" qcow2 disk

Bug #1816686 reported by Boxiang Zhu
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Boxiang Zhu

Bug Description

Environment
===========
OpenStack: master branch
Ceph: luminous

Steps to reproduce
==================
1. Upload a qcow2 format image to glance such as a test qcow2 image `cirros`.
2. Use command to create a new instance: `openstack server create <server-name> --image <image-name> --flavor <flavor-name> --security-group <security-group-name> --availability-zone nova --network <network-name>`
3. After instance has been spawn successfully, we run command to get the console url: `openstack console url show <server-name>`
4. Open the browser and enter the console url, I see that the instance fails to boot.

Expected result
===============
The instance succeeds to boot.

Actual result
=============
The instance fails to boot.

When importing rbd volume from _base image file, the format of image file is qcow2. When using a qcow2 as root disk, the instance is spawned but fails to boot because data is accessed as raw.
So try to convent the image format when import it into rbd as raw.

Tags: ceph libvirt
Revision history for this message
Boxiang Zhu (bxzhu-5355) wrote :
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/638080

Changed in nova:
assignee: nobody → Boxiang Zhu (bxzhu-5355)
status: New → In Progress
Revision history for this message
Boxiang Zhu (bxzhu-5355) wrote :

The force_raw_images in nova.conf was False so the issue can be reproduced.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Boxiang Zhu (zhu.boxiang@99cloud.net) on branch: master
Review: https://review.openstack.org/638080
Reason: I just abandon this patch now. If there is something else to discuss, I will re-open it later. Thanks, @Eric.

Matt Riedemann (mriedem)
tags: added: libvirt rbd
tags: added: ceph
removed: rbd
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.opendev.org/640271
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=6c6ffc0476b56fe0bf822ddcf3c9a2d543912f38
Submitter: Zuul
Branch: master

commit 6c6ffc0476b56fe0bf822ddcf3c9a2d543912f38
Author: zhu.boxiang <zhu.boxiang@99cloud.net>
Date: Fri Mar 1 16:16:31 2019 +0800

    Fix failure to boot instances with qcow2 format images

    Ceph doesn't support QCOW2 for hosting a virtual machine
    disk:

      http://docs.ceph.com/docs/master/rbd/rbd-openstack/

    When we set image_type as rbd and force_raw_images as
    False and we don't launch an instance with boot-from-volume,
    the instance is spawned using qcow2 as root disk but
    fails to boot because data is accessed as raw.

    To fix this, we raise an error and refuse to start
    nova-compute service when force_raw_images and
    image_type are incompatible.
    When we import image into rbd, check the format of cache
    images. If the format is not raw, remove it first and
    fetch it again. It will be raw format now.

    Change-Id: I1aa471e8df69fbb6f5d9aeb35651bd32c7123d78
    Closes-Bug: 1816686

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 20.0.0.0rc1

This issue was fixed in the openstack/nova 20.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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