Project

General

Profile

Actions

Documentation #61185

closed

mgr/nfs: ceph nfs cluster config reset CLUSTER_NAME -i PATH_TO_CONFIG_FILE should not be allowed

Added by Dhairya Parmar 11 months ago. Updated 11 months ago.

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

0%

Tags:
Backport:
Reviewed:
Affected Versions:
Labels (FS):
NFS-cluster
Pull request ID:

Description

While going through Red Hat doc https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/5/html/file_system_guide/ceph-file-system-administration#exporting-ceph-file-system-namespaces-over-the-nfs-protocol_fs

It says we can delete the custom configuration(made using conf file) with:

ceph nfs cluster config reset CLUSTER_NAME -i PATH_TO_CONFIG_FILE

It cannot work with the external file, as it isn't supported by it's code in src/pybind/mgr/nfs/module.py:

    @CLICommand('nfs cluster config reset', perm='rw')
    @object_format.EmptyResponder()
    def _cmd_nfs_cluster_config_reset(self, cluster_id: str) -> None:
        """Reset NFS-Ganesha Config to default""" 
        return self.nfs.reset_nfs_cluster_config(cluster_id=cluster_id)

and as expected it fails:

sh-4.4$ ceph nfs cluster config reset nfs-cephfs -i config.conf 
Error EINVAL: Traceback (most recent call last):
  File "/usr/share/ceph/mgr/mgr_module.py", line 1758, in _handle_command
    return CLICommand.COMMANDS[cmd['prefix']].call(self, cmd, inbuf)
  File "/usr/share/ceph/mgr/mgr_module.py", line 462, in call
    return self.func(mgr, **kwargs)
TypeError: _cmd_nfs_cluster_config_reset() got an unexpected keyword argument 'inbuf'

Therefore this need to be corrected

Actions #1

Updated by Dhairya Parmar 11 months ago

  • Status changed from New to Closed

Exists only in redhat docs, ceph docs look good https://docs.ceph.com/en/latest/mgr/nfs/

Actions

Also available in: Atom PDF