Project

General

Profile

Actions

Bug #59463

closed

mgr/nfs: Setting NFS export config using -i option is not working

Added by Dhairya Parmar about 1 year ago. Updated 11 months ago.

Status:
Closed
Priority:
Normal
Category:
Correctness/Safety
Target version:
% Done:

0%

Source:
Q/A
Tags:
Backport:
reef,quincy,pacific
Regression:
No
Severity:
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
mgr/nfs
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Unable to set NFS export configuration using config.conf

Steps followed

1. created nfs cluster
$ ceph nfs cluster create nfs-cephfs "hostname" 
NFS Cluster Created Successfully

2. created config file with below contents
$ 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 = "SomeKeyValue";
  }
}

3. Created user nfstest01
$ 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 = SomeKeyValue

4. created nfs export
$ 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
$ ceph nfs cluster config set nfs-cephfs -i config.conf 
NFS-Ganesha User Config already exists

$ 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": []
  }
]

$ 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 = "SomeKeyValue";
  }
}

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


Related issues 2 (0 open2 closed)

Related to CephFS - Bug #61183: mgr/nfs: Applying for first time, NFS-Ganesha Config Added Successfully but doesn't actually reflect the changesClosedDhairya Parmar

Actions
Related to CephFS - Bug #61184: mgr/nfs: setting config using external file gets overiddenClosedDhairya Parmar

Actions
Actions

Also available in: Atom PDF