Bug 2032858 - [CephFS-NFS]Creation of NFS Export is failing with Cluster not found
Summary: [CephFS-NFS]Creation of NFS Export is failing with Cluster not found
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: CephFS
Version: 5.1
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
: 5.1
Assignee: Venky Shankar
QA Contact: Hemanth Kumar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-12-15 11:42 UTC by Amarnath
Modified: 2021-12-25 10:30 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-12-25 10:30:25 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHCEPH-2799 0 None None None 2021-12-15 11:44:24 UTC

Description Amarnath 2021-12-15 11:42:27 UTC
Description of problem:
Creation of NFS Export is failing with Cluster not found

Version-Release number of selected component (if applicable):
[root@ceph-amk5-1-de1w3h-node7 ~]# ceph version
ceph version 16.2.7-6.el8cp (5a5143a7ab533ea00cfd5a5f47cf531223dd5b43) pacific (stable)

How reproducible:
[root@ceph-amk5-1-de1w3h-node7 ~]# ceph nfs cluster ls
cephfs-nfs
[root@ceph-amk5-1-de1w3h-node7 ~]# ceph nfs export create cephfs cephfs cephfs-nfs /export1 path=/
Error ENOENT: Cluster does not exists
[root@ceph-amk5-1-de1w3h-node7 ~]# ceph nfs cluster info cephfs-nfs
{
    "cephfs-nfs": {
        "virtual_ip": null,
        "backend": [
            {
                "hostname": "ceph-amk5-1-de1w3h-node4",
                "ip": "10.0.208.15",
                "port": 2049
            }
        ]
    }
}
[root@ceph-amk5-1-de1w3h-node7 ~]#


Same was working in older builds

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Veera Raghava Reddy 2021-12-15 17:26:12 UTC
Hi Patrick,
Can you look into this bug, this is block 5.1 CI runs.

Comment 4 Venky Shankar 2021-12-16 07:43:05 UTC
Could you check if this works::

$ ceph nfs export create cephfs cephfs-nfs /export1 cephfs path=/

Comment 5 Venky Shankar 2021-12-16 09:47:38 UTC
16.2.7 changed the order of the command - the file system name is to be given *atfer* pseudo_path (/export in your case)::

$ git show 721c0eb42a47e0ad6378c35f1b2d475d11ef1104
commit 721c0eb42a47e0ad6378c35f1b2d475d11ef1104
Author: Sage Weil <sage>
Date:   Wed Oct 20 15:39:03 2021 -0400

    mgr/nfs: reorder 'nfs export create cephfs' arguments
    
    Put fsname after cluster_id + pseudo_path so that it aligns with the change
    to the rgw command.
    
    Signed-off-by: Sage Weil <sage>
    (cherry picked from commit a07ca2444d7e5a800944fc8f75ebd88e26505c7e)

diff --git a/src/pybind/mgr/nfs/module.py b/src/pybind/mgr/nfs/module.py
index 0bc3ab63e22..8eef68f2369 100644
--- a/src/pybind/mgr/nfs/module.py
+++ b/src/pybind/mgr/nfs/module.py
@@ -27,9 +27,9 @@ class Module(orchestrator.OrchestratorClientMixin, MgrModule):
     @CLICommand('nfs export create cephfs', perm='rw')
     def _cmd_nfs_export_create_cephfs(
             self,
-            fsname: str,
             cluster_id: str,
             pseudo_path: str,
+            fsname: str,
             path: Optional[str] = '/',
             readonly: Optional[bool] = False,
             client_addr: Optional[List[str]] = None,

Commit 721c0eb42a47e0ad6378c35f1b2d475d11ef1104 is introduce in 16.2.7 which is the build you are using::

$ git log v16.2.7..721c0eb42a47e0ad6378c35f1b2d475d11ef1104 -1

Hemanth confirmed that the command::

$ ceph nfs export create cephfs cephfs-nfs /export1 cephfs path=/

works in 16.2.7 (able to create nfs export).

Guess this change needs to be documented?

Comment 7 Amarnath 2021-12-25 10:30:25 UTC
Closing this BZ As we have raised Doc BZ : https://bugzilla.redhat.com/show_bug.cgi?id=2035603


Note You need to log in before you can comment on or make changes to this bug.