Unable to rescue using volume snapshot based images

Bug #1879500 reported by Lee Yarwood
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Lee Yarwood
Ussuri
Fix Released
Undecided
Unassigned

Bug Description

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

While working on bug #1876330 it was observed that attempts to rescue an instance with a volume snapshot image were permitted but would ultimately fail to boot the instance with file based imagebackends *or* fail out right with the rbd imagebackend. This is due to these images being metadata containers and containing no image data, thus resulting in Nova attempting to rescue with zero length images.

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

* Launch a volume backed instance
* Snapshot the instance using the imageCreate API.
* Attempt to rescue the image using the created image.

Expected result
===============

The request is rejected as there is no support for rescuing using a volume snapshot based image.

Actual result
=============

The request is acceptable and either fails to boot the instance or fails earlier due to the zero length image.

Environment
===========
1. Exact version of OpenStack you are running. See the following
  list for all releases: http://docs.openstack.org/releases/

   master

2. Which hypervisor did you use?
   (For example: Libvirt + KVM, Libvirt + XEN, Hyper-V, PowerKVM, ...)
   What's the version of that?

   Libvirt + KVM

2. Which storage type did you use?
   (For example: Ceph, LVM, GPFS, ...)
   What's the version of that?

   N/A

3. Which networking type did you use?
   (For example: nova-network, Neutron with OpenVSwitch, ...)

   N/A

Logs & Configs
==============

See bug #1876330.

Tags: rescue volumes
Lee Yarwood (lyarwood)
Changed in nova:
assignee: nobody → Lee Yarwood (lyarwood)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.opendev.org/729261

Changed in nova:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit b9ff0ca94e670a080f82358c2003a0bf4b963bc8
Author: Lee Yarwood <email address hidden>
Date: Tue May 19 13:40:16 2020 +0100

    compute: Do not allow rescue attempts using volume snapshot images

    As seen in I7356b54bef0c614d9bfd1ed0d7b42574b58966f9 Nova is currently
    unable to rescue instances using volume snapshot based images. This
    currently results in zero length files being created on the compute as
    the images are actually metadata stores and contain no image data.

    This change adds a simple check within the compute API to reject
    requests that provided an image reference that itself provides an
    img_block_device_mapping before we cast out to the computes.

    Depends-On: https://review.opendev.org/#/c/725812/
    Closes-Bug: #1879500
    Change-Id: I87253c518bd60a3e7cd08af68da9ade96f4a40db

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/ussuri)

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/742706

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/ussuri)

Reviewed: https://review.opendev.org/742706
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=42bfd50626995b5f99d50a6670546a7c7b4ae515
Submitter: Zuul
Branch: stable/ussuri

commit 42bfd50626995b5f99d50a6670546a7c7b4ae515
Author: Lee Yarwood <email address hidden>
Date: Tue May 19 13:40:16 2020 +0100

    compute: Do not allow rescue attempts using volume snapshot images

    As seen in I7356b54bef0c614d9bfd1ed0d7b42574b58966f9 Nova is currently
    unable to rescue instances using volume snapshot based images. This
    currently results in zero length files being created on the compute as
    the images are actually metadata stores and contain no image data.

    This change adds a simple check within the compute API to reject
    requests that provided an image reference that itself provides an
    img_block_device_mapping before we cast out to the computes.

    Depends-On: https://review.opendev.org/#/c/725812/
    Closes-Bug: #1879500
    Change-Id: I87253c518bd60a3e7cd08af68da9ade96f4a40db
    (cherry picked from commit b9ff0ca94e670a080f82358c2003a0bf4b963bc8)

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.