Unable to delete CephFS manila share if nfs-ganesha export rule doesn't exist
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Shared File Systems Service (Manila) |
Triaged
|
Medium
|
Goutham Pacha Ravi |
Bug Description
User report:
We have some manila shares which are stuck in 'error_deleting' state and cannot be removed unless their status is reset to 'available'. One thing in common with these shares is that the instances associated with all these shares (share_instance_id) do not exist in the environment. Even so, the 'access_
After the status is reset to active, the 'access_
For example, share ID: 67d12f8b-
$ manila show 67d12f8b-
+------
| Property | Value |
+------
| id | 67d12f8b-
| size | 5 |
| availability_zone | nova |
| created_at | 2022-12-
| status | error_deleting |
| name | pvc-ce7985c3-
| description | provisioned-
| project_id | 7b4c0133359d44a
| snapshot_id | None |
| share_network_id | None |
| share_proto | NFS |
| metadata | {'manila.
| share_type | f6b11e95-
| is_public | False |
| snapshot_support | True |
| task_state | None |
| share_type_name | ceph |
| access_rules_status | active |
| replication_type | None |
| has_replicas | False |
| user_id | 0a3daf14f6aecb8
| create_
| revert_
| share_group_id | None |
| source_
| mount_snapshot_
| share_server_id | None |
| host | hostgroup@
| export_locations | |
| | id = a6b373a8-
| | path = 172.16.
| | preferred = False |
| | share_instance_id = a257d35b-
| | is_admin_only = False |
+------
$ manila reset-state --state available 67d12f8b-
$ manila show 67d12f8b-
+------
| Property | Value |
+------
| id | 67d12f8b-
| size | 5 |
| availability_zone | nova |
| created_at | 2022-12-
| status | available |
| name | pvc-ce7985c3-
| description | provisioned-
| project_id | 7b4c0133359d44a
| snapshot_id | None |
| share_network_id | None |
| share_proto | NFS |
| metadata | {'manila.
| share_type | f6b11e95-
| is_public | False |
| snapshot_support | True |
| task_state | None |
| share_type_name | ceph |
| access_rules_status | error |
| replication_type | None |
| has_replicas | False |
| user_id | 0a3daf14f6aecb8
| create_
| revert_
| share_group_id | None |
| source_
| mount_snapshot_
| share_server_id | None |
| host | hostgroup@
| export_locations | |
| | id = a6b373a8-
| | path = 172.16.
| | preferred = False |
| | share_instance_id = a257d35b-
| | is_admin_only = False |
+------
Some of the logs indicate that manila is not able to update the rules of the shares which we are trying to delete where the share_instance_id for that share does not exist in the environment.
For example:
Share ID: 5b5d2a38-
Request ID: req-d7e38b71-
~~~
manila-
manila-
manila-
manila-
manila-
manila-
manila-
~~~
Changed in manila: | |
assignee: | nobody → Goutham Pacha Ravi (gouthamr) |
tags: | added: ganesha |
tags: | added: cephfs |
Changed in manila: | |
status: | New → Triaged |
status: | Triaged → New |
Changed in manila: | |
status: | New → Triaged |
importance: | Undecided → Medium |
milestone: | none → caracal-2 |
Some steps to reproduce this bug by causing a "NotFound" error.. (although the error doesn't appear to be the same in the log in the description) :
Set manila's debug logging
$ manila create nfs 1 --name testshare
$ manila access-allow testshare ip 10.10.10.10
check manila logs for the export ID of the rule that was just created; for example if it is 1001; run:
sudo dbus-send --print-reply \ org.ganesha. nfsd /org/ganesha/ nfsd/ExportMgr \ ganesha. nfsd.exportmgr. RemoveExport uint16:1001
--system --dest=
org.
on the node where ganesha is running; then try to delete the share:
$ manila delete testshare
list the shares, the share must be "error_deleting"
+------ ------- ------- ------- ------- ----+-- ------- --+---- --+---- ------- --+---- ------- -----+- ------- ---+--- ------- ------- +------ ------- ------- ------- ------- -----+- ------- ------- ----+ ------- ------- ------- ------- ----+-- ------- --+---- --+---- ------- --+---- ------- -----+- ------- ---+--- ------- ------- +------ ------- ------- ------- ------- -----+- ------- ------- ----+ 7785-415e- 9c10-86218ad727 a0 | testshare | 1 | NFS | error_deleting | False | cephfsnfstype | zorilla- cephnfs- rpm@cephfsnfs1# cephfs | manila-zone-0 | ------- ------- ------- ------- ----+-- ------- --+---- --+---- ------- --+---- ------- -----+- ------- ---+--- ------- ------- +------ ------- ------- ------- ------- -----+- ------- ------- ----+
| ID | Name | Size | Share Proto | Status | Is Public | Share Type Name | Host | Availability Zone |
+------
| b0b24d51-
+------
manila-share log shows the following: y.lockutils [None req-cc0acbf6- 22af-4810- 9159-64b7fc6eda 98 demo None] Lock "locked_ access_ rules_operation _by_share_ instance_ 97bf7384- a6ad-43ea- a2da-1b19803bab f7" "released" by "manila. share.access. locked_ access_ rules_operation .<locals> .wrapped. <locals> .locked_ operation" :: held 0.020s {{(pid=593653) inner /usr/local/ lib/python3. 9/site- packages/ oslo_concurrenc y/lockutils. py:423} } 22af-4810- 9159-64b7fc6eda 98 demo None] Creating message record for request_id = req-cc0acbf6- 22af-4810- 9159-64b7fc6eda 98 rpc.server [None req-cc0acbf6- 22af-4810- 9159-64b7fc6eda 98 demo None] Exception during message handling: manila. exception. GaneshaCommandF ailure: Ganesha management command failed. rootwrap. conf dbus-send --print-reply --system --dest= org.ganesha. nfsd /org/ganesha/ nfsd/ExportMgr org.ganesha. nfsd.exportmgr. RemoveExport uint16:1002 .DBus.Error. InvalidArgs: lookup_export failed with Export id not found\n' rpc.server Traceback (most recent call last): rpc.server File "/opt/stack/ manila/ manila/ share/drivers/ ganesha/ manager. py", line 233, in _execute rpc.server return execute(*args, **kwargs) rpc.server File "/opt/stack/ manila/ manila/ share/drivers/ ganesha/ utils.py" , line 59, in __call__ rpc.server return self.execute(*args, **exkwargs) rpc.server File "...
DEBUG oslo_concurrenc
INFO manila.message.api [None req-cc0acbf6-
ERROR oslo_messaging.
Command: sudo manila-rootwrap /etc/manila/
Exit code: 1
Stdout: ''
Stderr: 'Error org.freedesktop
ERROR oslo_messaging.
ERROR oslo_messaging.
ERROR oslo_messaging.
ERROR oslo_messaging.
ERROR oslo_messaging.
ERROR oslo_messaging.