CephFS driver fails to delete non-existent shares

Bug #2065705 reported by Goutham Pacha Ravi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Triaged
Low
Ashley Rodriguez

Bug Description

Description
===========

If a share fails to be created on a cephfs backend; but the record exists in manila, the next course of action would be to delete the share. However, the share deletion fails because the driver doesn't ignore non-existent shares as expected. This sets the share's status to "error_deleting". Getting out of this state will need administrator intervention; and even administrators cannot use a regular "reset-state and delete" approach; they'd need to use "--force" to cleanup the share.

Steps to reproduce
==================

A chronological list of steps which will help reproduce the issue you hit:
* Created a share that failed some backend check and caused the share to be set to "error"
* Tried to delete the failed share

- A list of manila/openstack client commands (with correct argument value)
$ openstack share network create --name share-net --description "Manila test network" --neutron-net-id ${NETWORKID} --neutron-subnet-id ${SUBNETID}
$ openstack share create NFS 1 \
    --name share-test-1 \
    --description "Share test" \
    --share-network share-net \
    --share-type default

$ openstack share list
+--------------------------------------+--------------+------+-------------+----------------+-----------+-----------------+------+-------------------+
| ID | Name | Size | Share Proto | Status | Is Public | Share Type Name | Host | Availability Zone |
+--------------------------------------+--------------+------+-------------+----------------+-----------+-----------------+------+-------------------+
| 61ebff81-5c48-43a5-a104-9438239a7e18 | share-test-1 | 1 | NFS | error | False | default | | nova |
| 6fde80a0-fa9f-46e2-8e74-d2219b20c654 | share-test-2 | 1 | NFS | available | False | default | | nova |
+--------------------------------------+--------------+------+-------------+----------------+-----------+-----------------+------+-------------------+

$ openstack share set --status error share-test-1
$ openstack share delete share-test-1

$ openstack share list
+--------------------------------------+--------------+------+-------------+----------------+-----------+-----------------+------+-------------------+
| ID | Name | Size | Share Proto | Status | Is Public | Share Type Name | Host | Availability Zone |
+--------------------------------------+--------------+------+-------------+----------------+-----------+-----------------+------+-------------------+
| 61ebff81-5c48-43a5-a104-9438239a7e18 | share-test-1 | 1 | NFS | error_deleting | False | default | | nova |
| 6fde80a0-fa9f-46e2-8e74-d2219b20c654 | share-test-2 | 1 | NFS | available | False | default | | nova |
+--------------------------------------+--------------+------+-------------+----------------+-----------+-----------------+------+-------------------+

Expected result
===============
Share that failed to create gets deleted.

Actual result
=============
Share goes to "error_deleting" with this error in the manila share log: https://paste.opendev.org/show/b4rKQRM8AniBg3td3Efg/

(Share creation error: https://paste.opendev.org/show/bbTHRpy46ZGKHtYU5mjr/)

Environment
===========
1. OpenStack Wallaby
2. CephFS via NFS

Vida Haririan (vhariria)
tags: added: cephfs
Vida Haririan (vhariria)
tags: added: low-hanging-fruit
Changed in manila:
status: New → Triaged
Vida Haririan (vhariria)
Changed in manila:
assignee: nobody → Ashley Rodriguez (ashrod98)
importance: Undecided → Low
Revision history for this message
Vida Haririan (vhariria) wrote :

Triage notes: the workaround needs an admin to use force delete, which is, undesirable in cases where the ceph share never existed - for example, when the share got scheduled to ceph, but failed.

See additional triage information at https://meetings.opendev.org/meetings/manila/2024/manila.2024-05-16-15.01.log.html

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.