When error_extending, size shouldn't be updated

Bug #1201814 reported by Avishay Traeger on 2013-07-16
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Undecided
Avishay Traeger

Bug Description

If an error occurs while extending a volume, the DB should have the old size.

John Griffith (john-griffith) wrote :

The size update if the very last call in the cinder/volume/api for that very reason, how did you reproduce this one, interested in the case that I missed.

Haomai Wang (haomai) wrote :

Hi John Griffith, I'm concerned about whether user can narrow the size of volume?

John Griffith (john-griffith) wrote :

Haomai, you mean reduce the size? I only implemented extend, and personally don't like the idea of doing reduce at all but I believe there are others who'd like to do this for some odd reason.

Avishay Traeger (avishay-il) wrote :

John - I had the driver raise an exception. I will look into it tomorrow.

Changed in cinder:
assignee: nobody → Avishay Traeger (avishay-il)
Haomai Wang (haomai) wrote :

John, but I don't find any code to avoid that user pass the size less than old volume size. Should we do the limitation or I missed any?

Avishay Traeger (avishay-il) wrote :

The problem is that the rpcapi call is a cast, and so if the driver barfs while extending, the manager changes the volume's status to 'error_extending', but the API still adjusts the size in the DB, updates the quota, and changes the status to 'available'.

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

Changed in cinder:
status: New → In Progress

Reviewed: https://review.openstack.org/37450
Committed: http://github.com/openstack/cinder/commit/74960fb8de3a84d0f3a5a56f15143647b4182f01
Submitter: Jenkins
Branch: master

commit 74960fb8de3a84d0f3a5a56f15143647b4182f01
Author: Avishay Traeger <email address hidden>
Date: Wed Jul 17 08:17:14 2013 +0300

    Fix extend_volume error handling.

    If the async call to the manager/driver failed, the API still updated
    the quota and volume size in the DB. Solution is to move these tasks
    down to the manager, where we know if the extend succeeded.

    Change-Id: I668fd659830bd6d410be64a1f5116377b08a9e96
    Fixes: bug 1201814

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2013-09-05
Changed in cinder:
milestone: none → havana-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2013-10-17
Changed in cinder:
milestone: havana-3 → 2013.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers