cinder reimage failure leaves the volume in downloading state

Bug #2036994 reported by Rajat Dhasmana
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Rajat Dhasmana

Bug Description

When we try to reimage a volume and the image metadata doesn't pass the following checks, we end up with a volume in downloading state:

1. Image is not in 'active' state
2. Size of image is larger than size of volume
3. Volume size is smaller than the image 'minDisk' size
4. Image virtual size is greater than Volume size

In these cases, we don't roll back the volume state to the previous state.

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

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/cinder/+/896149

Changed in cinder:
status: New → In Progress
Changed in cinder:
assignee: nobody → Rajat Dhasmana (whoami-rajat)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.opendev.org/c/openstack/cinder/+/896149
Committed: https://opendev.org/openstack/cinder/commit/a752012c92bb15cf264c617bb2071958a32a8ad1
Submitter: "Zuul (22348)"
Branch: master

commit a752012c92bb15cf264c617bb2071958a32a8ad1
Author: whoami-rajat <email address hidden>
Date: Thu Sep 21 17:41:16 2023 +0000

    Fix: Roll back volume status during reimage failure

    When we try to reimage a volume, we update the status of
    volume to 'downloading'.
    We later validate the image metadata (like image is 'active',
    image size is less than volume size, etc), and in case the
    validation fails, we currently don't revert the volume status
    back to original ('available', 'in-use' etc) and volume stays
    in 'downloading' state.

    This patch fixes this by catching the failure exception and
    doing a DB update to restore the volume status back to it's
    previous state.

    Closes-Bug: #2036994
    Change-Id: I05bf29e2a089b06398414b542b655a8083c9a21f

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

This issue was fixed in the openstack/cinder 24.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

Remote bug watches

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