Bug 1907391

Summary: cinder reset-state should print a warning to callers when moving a volume from attached to available
Product: Red Hat OpenStack Reporter: Lee Yarwood <lyarwood>
Component: python-cinderclientAssignee: Eric Harney <eharney>
Status: NEW --- QA Contact: Evelina Shames <eshames>
Severity: medium Docs Contact: Andy Stillman <astillma>
Priority: unspecified    
Version: 13.0 (Queens)CC: apevec, eharney, ltoscano
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lee Yarwood 2020-12-14 12:32:25 UTC
Description of problem:

$subject, we've seen a number of examples recently where users have called reset-state [1][2][3] without updating the Nova DB and leaving the volume still attached there. This is an admin only command/API that really should only be used in conjunction with Nova DB updates (I am thinking about introducing force detach API FWIW) when users understand the issue and the required steps to fix it.

A clear warning being printed should help avoid users getting stuck in weird and wonderful corners going forward.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1906941
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1887383
[3] https://bugzilla.redhat.com/show_bug.cgi?id=1883583


Version-Release number of selected component (if applicable):
OSP 16.1

How reproducible:
Always

Steps to Reproduce:
1. Attempt to call `cinder reset-state`

Actual results:
Called without printing a clear warning etc.

Expected results:
Print a clear warning etc.

Additional info:

Comment 1 Eric Harney 2020-12-14 13:16:10 UTC
This upstream spec is aiming to resolve issues like this:
https://review.opendev.org/c/openstack/cinder-specs/+/682456

Comment 2 Luigi Toscano 2020-12-16 14:47:48 UTC
Should we consider this a bugfix or a feature? The spec above is not approved for Wallaby right now, and depending on the fix it may be complicated to backport the changes.

Comment 3 Luigi Toscano 2020-12-17 16:13:54 UTC
The WIP upstream spec is now https://review.opendev.org/c/openstack/cinder-specs/+/766716 - this is going to be a feature.