Bug 2185842

Summary: Setting NFS export config using -i option not working
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Amarnath <amk>
Component: DocumentationAssignee: Ranjini M N <rmandyam>
Documentation sub component: File System Guide QA Contact: Hemanth Kumar <hyelloji>
Status: RELEASE_PENDING --- Docs Contact: Akash Raj <akraj>
Severity: high    
Priority: unspecified CC: akraj, asriram, ceph-eng-bugs, cephqe-warriors, dparmar, gfarnum, hyelloji, rmandyam, saraut, vshankar
Version: 6.1Flags: hyelloji: needinfo-
hyelloji: needinfo-
hyelloji: needinfo-
Target Milestone: ---   
Target Release: 6.1z1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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 Amarnath 2023-04-11 11:24:36 UTC
Description of problem:
Setting NFS export configuration using config.conf

RFE doc: https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/5/html-single/file_system_guide/index?lb_target=preview#exporting-ceph-file-system-namespaces-over-the-nfs-protocol_fs

Steps followed 
1. created nfs cluster
[root@ceph-amk-mon-fail-68elve-node7 ~]# ceph nfs cluster create nfs-cephfs "ceph-amk-mon-fail-68elve-node4 ceph-amk-mon-fail-68elve-node6"
NFS Cluster Created Successfully

2. created config file with below contents
[root@ceph-amk-mon-fail-68elve-node7 ~]# cat config.conf 
EXPORT {
  Export_Id = 110;
  Transports = TCP;
  Path = /;
  Pseudo = /ceph/;
  pseudo_path = /ceph/;
  Protocols = 4;
  Access_Type = RO;
  Attr_Expiration_Time = 0;
  Squash = None;
  FSAL {
    Name = CEPH;
    Filesystem = "cephfs";
    User_Id = "nfstest01";
    Secret_Access_Key = "AQDcPjVkAXnjCBAAzEQBhDg4FEcF+FSzAGsMhg==";
  }
}

3. Created user nfstest01
[root@ceph-amk-mon-fail-68elve-node7 ~]# ceph auth get-or-create client.nfstest01 mon 'allow r' osd 'allow rw pool=nfs-ganesha namespace=nfs-cephfs, allow rw tag cephfs data=cephfs' mds 'allow rw path=/'
[client.nfstest01]
	key = AQDcPjVkAXnjCBAAzEQBhDg4FEcF+FSzAGsMhg==

4. created nfs export
[root@ceph-amk-mon-fail-68elve-node7 ~]# ceph nfs export create cephfs nfs-cephfs /ceph cephfs --path=/ 
{
    "bind": "/ceph",
    "fs": "cephfs",
    "path": "/",
    "cluster": "nfs-cephfs",
    "mode": "RW"
}

5. Tried changing the setting by reapplying
[root@ceph-amk-mon-fail-68elve-node7 ~]# ceph nfs cluster config set nfs-cephfs -i config.conf 
NFS-Ganesha User Config already exists
[root@ceph-amk-mon-fail-68elve-node7 ~]# ceph nfs export ls nfs-cephfs --detailed
[
  {
    "export_id": 1,
    "path": "/",
    "cluster_id": "nfs-cephfs",
    "pseudo": "/ceph",
    "access_type": "RW",
    "squash": "none",
    "security_label": true,
    "protocols": [
      4
    ],
    "transports": [
      "TCP"
    ],
    "fsal": {
      "name": "CEPH",
      "user_id": "nfs.nfs-cephfs.1",
      "fs_name": "cephfs"
    },
    "clients": []
  }
]
[root@ceph-amk-mon-fail-68elve-node7 ~]# cat config.conf 
EXPORT {
  Export_Id = 110;
  Transports = TCP;
  Path = /;
  Pseudo = /ceph/;
  pseudo_path = /ceph/;
  Protocols = 4;
  Access_Type = RO;
  Attr_Expiration_Time = 0;
  Squash = None;
  FSAL {
    Name = CEPH;
    Filesystem = "cephfs";
    User_Id = "nfstest01";
    Secret_Access_Key = "AQDcPjVkAXnjCBAAzEQBhDg4FEcF+FSzAGsMhg==";
  }
}

It is not applying the configs present as part of config.conf

 


Version-Release number of selected component (if applicable):
[root@ceph-amk-mon-fail-68elve-node7 ~]# ceph versions
{
    "mon": {
        "ceph version 17.2.6-10.el9cp (19b8858bfb3d0d1b84ec6f0d3fd7c6148831f7c8) quincy (stable)": 3
    },
    "mgr": {
        "ceph version 17.2.6-10.el9cp (19b8858bfb3d0d1b84ec6f0d3fd7c6148831f7c8) quincy (stable)": 2
    },
    "osd": {
        "ceph version 17.2.6-10.el9cp (19b8858bfb3d0d1b84ec6f0d3fd7c6148831f7c8) quincy (stable)": 12
    },
    "mds": {
        "ceph version 17.2.6-10.el9cp (19b8858bfb3d0d1b84ec6f0d3fd7c6148831f7c8) quincy (stable)": 7
    },
    "overall": {
        "ceph version 17.2.6-10.el9cp (19b8858bfb3d0d1b84ec6f0d3fd7c6148831f7c8) quincy (stable)": 24
    }
}
[root@ceph-amk-mon-fail-68elve-node7 ~]# 


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info: