Project

General

Profile

Bug #57710

Exports cannot be removed with ceph_argparse

Added by Victoria Martinez de la Cruz 2 months ago. Updated 2 months ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

When issuing the command nfs export rm through the ceph_argparse.py library a rados error exception is raised as follows:

ERROR oslo_messaging.rpc.server [None req-fceaa9a3-81d8-48ed-8411-00f167a6d088 demo None] Exception during message handling: manila.exception.ShareBackendException: json_command failed - prefix=nfs export rm, argdict={'nfs_cluster_id': 'cephfs', 'pseudo_path': '/volumes/_nogroup/eb514387-21f2-4a73-adee-cdec4f505056/504dabcd-1e52-4fa4-b40a-e0b24a73720b', 'format': 'json'} - exception message: [errno -2] Cluster does not exist.
ERROR oslo_messaging.rpc.server Traceback (most recent call last):
ERROR oslo_messaging.rpc.server File "/opt/stack/manila/manila/share/drivers/cephfs/driver.py", line 203, in rados_command
ERROR oslo_messaging.rpc.server raise rados.Error(outs, ret)
ERROR oslo_messaging.rpc.server rados.Error: [errno -2] Cluster does not exist
ERROR oslo_messaging.rpc.server
ERROR oslo_messaging.rpc.server During handling of the above exception, another exception occurred:
ERROR oslo_messaging.rpc.server
ERROR oslo_messaging.rpc.server Traceback (most recent call last):
ERROR oslo_messaging.rpc.server File "/usr/local/lib/python3.8/dist-packages/oslo_messaging/rpc/server.py", line 165, in _process_incoming
ERROR oslo_messaging.rpc.server res = self.dispatcher.dispatch(message)
ERROR oslo_messaging.rpc.server File "/usr/local/lib/python3.8/dist-packages/oslo_messaging/rpc/dispatcher.py", line 309, in dispatch
ERROR oslo_messaging.rpc.server return self._do_dispatch(endpoint, method, ctxt, args)
ERROR oslo_messaging.rpc.server File "/usr/local/lib/python3.8/dist-packages/oslo_messaging/rpc/dispatcher.py", line 229, in _do_dispatch
ERROR oslo_messaging.rpc.server result = func(ctxt, **new_args)
ERROR oslo_messaging.rpc.server File "/opt/stack/manila/manila/share/manager.py", line 220, in wrapped
ERROR oslo_messaging.rpc.server return f(self, *args, **kwargs)
ERROR oslo_messaging.rpc.server File "/opt/stack/manila/manila/utils.py", line 579, in wrapper
ERROR oslo_messaging.rpc.server return func(self, *args, **kwargs)
ERROR oslo_messaging.rpc.server File "/opt/stack/manila/manila/share/manager.py", line 4004, in update_access
ERROR oslo_messaging.rpc.server self.update_access_for_instances(context, [share_instance_id],
ERROR oslo_messaging.rpc.server File "/opt/stack/manila/manila/share/manager.py", line 4018, in update_access_for_instances
ERROR oslo_messaging.rpc.server self.access_helper.update_access_rules(
ERROR oslo_messaging.rpc.server File "/opt/stack/manila/manila/share/access.py", line 299, in update_access_rules
ERROR oslo_messaging.rpc.server self._update_access_rules(context, share_instance_id,
ERROR oslo_messaging.rpc.server File "/opt/stack/manila/manila/share/access.py", line 336, in _update_access_rules
ERROR oslo_messaging.rpc.server driver_rule_updates = self._update_rules_through_share_driver(
ERROR oslo_messaging.rpc.server File "/opt/stack/manila/manila/share/access.py", line 401, in _update_rules_through_share_driver
ERROR oslo_messaging.rpc.server driver_rule_updates = self.driver.update_access(
ERROR oslo_messaging.rpc.server File "/opt/stack/manila/manila/share/drivers/cephfs/driver.py", line 538, in update_access
ERROR oslo_messaging.rpc.server return self.protocol_helper.update_access(
ERROR oslo_messaging.rpc.server File "/opt/stack/manila/manila/share/drivers/cephfs/driver.py", line 1296, in update_access
ERROR oslo_messaging.rpc.server self._deny_access(share)
ERROR oslo_messaging.rpc.server File "/opt/stack/manila/manila/share/drivers/cephfs/driver.py", line 1248, in _deny_access
ERROR oslo_messaging.rpc.server rados_command(self.rados_client, "nfs export rm", argdict)
ERROR oslo_messaging.rpc.server File "/opt/stack/manila/manila/share/drivers/cephfs/driver.py", line 215, in rados_command
ERROR oslo_messaging.rpc.server raise exception.ShareBackendException(msg)
ERROR oslo_messaging.rpc.server manila.exception.ShareBackendException: json_command failed - prefix=nfs export rm, argdict={'nfs_cluster_id': 'cephfs', 'pseudo_path': '/volumes/_nogroup/eb514387-21f2-4a73-adee-cdec4f505056/504dabcd-1e52-4fa4-b40a-e0b24a73720b', 'format': 'json'} - exception message: [errno -2] Cluster does not exist.
ERROR oslo_messaging.rpc.server

Context
-------

Using ceph_argparse from within the CephFS driver in OpenStack manila. This command requires passing an argdict specifying the nfs_cluster_id and the export pseudo path. Both the nfs cluster and the export are available and the delete operation can be performed successfully from the CLI

stack@quincy:~/devstack$ sudo ceph --id=manila nfs export rm cephfs /volumes/_nogroup/eb514387-21f2-4a73-adee-cdec4f505056/504dabcd-1e52-4fa4-b40a-e0b24a73720b
Successfully deleted export

Expected result
---------------

We should be able to use ceph_argparse to delete exports of subvolumes

Actual result
-------------

The "ceph nfs export rm <nfs_cluster_id> <pseudo_path>" command issued through ceph_argparse fails with an exception

History

#1 Updated by Ramana Raja 2 months ago

  • Status changed from New to Need More Info

The argument 'nfs_cluster_id' in argdict doesn't look correct. Try replacing it with 'cluster_id' as
mentioned in https://docs.ceph.com/en/quincy/mgr/nfs/#delete-export

#2 Updated by Victoria Martinez de la Cruz 2 months ago

Thanks Ramana, that was the issue, fixed it on the driver. We can close this tracker.

#3 Updated by Ramana Raja 2 months ago

  • Status changed from Need More Info to Rejected

Also available in: Atom PDF