volume delete failure message could be better

Bug #1826220 reported by Eric Harney
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cinder
In Progress
Low
ye

Bug Description

"Invalid volume: Volume status must be available or error or error_restoring or error_extending or error_managing and must not be migrating, attached, belong to a group, have snapshots or be disassociated from snapshots after volume transfer."

This is a lot of assorted, mostly irrelevant, pieces of information to throw back to a user in an error message.

We should dynamically construct this message -- if the volume isn't in "error_managing", don't mention that state, if it's not in a group, don't say anything about groups, etc.

Eric Harney (eharney)
tags: added: low-hanging-fruit
Revision history for this message
Eric Harney (eharney) wrote :

Note: implementing this is a lot harder than it sounds at first.

A message like this results from a single database conditional_update which checks all of the listed conditions. This conditional_update does not currently provide back enough info to see which of the conditions failed, hence the message listing all possible conditions.

I considered trying to poll the status field etc., after the conditional_update failed to find the reason, but this only works if the object hasn't been updated in the db, which I don't think we can guarantee in general. (Maybe we can if we check that the object's updated_at time hasn't changed.)

tags: removed: low-hanging-fruit
Revision history for this message
Brin Zhang (zhangbailin) wrote :

If you check it use updated_at,what is the reference to update_at? Less than the current time?

Revision history for this message
ye (dakele) wrote :

I think we can add some status-check before conditional_update.

ye (dakele)
Changed in cinder:
assignee: nobody → ye (dakele)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.opendev.org/671416

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (stable/rocky)

Change abandoned by ye (<email address hidden>) on branch: stable/rocky
Review: https://review.opendev.org/671416
Reason: thanks a lot, abandon this change.

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/671996

Changed in cinder:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (master)

Change abandoned by "Eric Harney <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/cinder/+/671996

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.