Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1872882

Summary: [RFE] Introduce a force detach volume API
Product: Red Hat OpenStack Reporter: Lee Yarwood <lyarwood>
Component: openstack-novaAssignee: OSP DFG:Compute <osp-dfg-compute>
Status: CLOSED DEFERRED QA Contact: OSP DFG:Compute <osp-dfg-compute>
Severity: medium Docs Contact:
Priority: low    
Version: 17.0 (Wallaby)CC: alifshit, dasmith, egallen, eglynn, jhakimra, kchamart, mircea.vutcovici, sbauza, sgordon, stephenfin, vromanso
Target Milestone: ---Keywords: FutureFeature, Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-10-05 15:23:23 UTC 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-08-26 19:55:15 UTC
Description of problem:

The current detach volume API unconditionally casts to computes to attempt a detach of a volume from a given instance:

https://docs.openstack.org/api-ref/compute/#detach-a-volume-from-an-instance

Bug 1847958 will look to reject such requests when the compute is DOWN.

Additionally a new API should be introduced to allow an admin to forcibly detach a volume from an instance when the underlying host is down and has been fenced.

This could take the form of a 
/servers/{server_id}/os-volume_attachments/{volume_id}/action admin only API.


Version-Release number of selected component (if applicable):
N/A

How reproducible:
Always

Steps to Reproduce:
1. Attempt to detach a volume from an instance hosted on a downed compute

Actual results:
n-api currently accepts (202) the request and attempts to cast to the compute. Bug 1847958 may change this so n-api rejects the request (500) in the future.

Either way the volume remains attached to the instance until the instance is deleted.

Expected results:
While the instance is hosted on a down compute an admin should be able to detach the volume from the instance.

Additional info:

Comment 11 Artom Lifshitz 2022-10-05 15:23:23 UTC
Starting with the Antelope upstream release, DFG:Compute is tracking its feature backlog in Jira. This feature request has been migrated to DFG:Compute’s new Jira backlog. The Jira tracker for this feature request can be found below. At the time of this writing, only Red Hat associates have access to the Jira tracker, but we are actively working on changing that as more and more of the OSP organization uses Jira for more things.

https://issues.redhat.com/browse/OSP-2933