Skip to content

mgr/volumes/nfs: Add interface for adding user defined configuration - #36351

Merged
batrick merged 3 commits into
ceph:masterfrom
varshar16:wip-nfs-update-user-config
Aug 11, 2020
Merged

batrick merged 3 commits into
ceph:masterfrom
varshar16:wip-nfs-update-user-config

Conversation

@varshar16

@varshar16 varshar16 commented Jul 29, 2020 •

Copy link
Copy Markdown
Contributor

Set config command saves the user defined config in rados object, adds it's url to common config and restarts the ganesha service.

$ ceph nfs cluster config set <cluster_id> -i <config_file> 

Reset config command deletes the user defined config object, removes url from common config and restarts the ganesha service.

$ ceph nfs cluster config reset <cluster_id>

Fixes: https://tracker.ceph.com/issues/45747

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard backend
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

@varshar16

Copy link
Copy Markdown
Contributor Author

Depends on PR #36338

Comment thread doc/cephfs/fs-nfs-exports.rst Resolved
Comment thread doc/cephfs/fs-nfs-exports.rst Resolved
@sebastian-philipp

Copy link
Copy Markdown
Contributor

cc @BlaineEXE

@varshar16
varshar16 force-pushed the wip-nfs-update-user-config branch 2 times, most recently from ec5d652 to dc0cd42 Compare July 31, 2020 10:33
@varshar16
varshar16 requested a review from batrick July 31, 2020 10:34
Comment thread doc/cephfs/fs-nfs-exports.rst Resolved
Comment thread doc/cephfs/fs-nfs-exports.rst Resolved
Comment thread qa/tasks/cephfs/test_nfs.py Resolved
Comment thread qa/tasks/cephfs/test_nfs.py Resolved
@varshar16
varshar16 force-pushed the wip-nfs-update-user-config branch from dc0cd42 to ca18d0f Compare August 4, 2020 10:03
@BlaineEXE

Copy link
Copy Markdown
Collaborator

With Rook (and I think cephadm) I am thinking about the workflow that will be used programmatically by the orchestrator. In my mind, thinking of Rook, it looks something like below.

  1. Rook needs to be able to set up NFS such that it connects to the Ceph cluster with some sort of minimal config
  2. Rook can programmatically apply additional user-defined configs to NFS in such a way that does not overwrite the minimal configs needed to connect NFS to Ceph as done in step 1.
    2.a. Rook will likely wish to use some pre-existing mechanism to accomplish 2 above, and it's very helpful if that mechanism can be used by users manually in the interim period before it is implemented in Rook. It seems like your idea of an override file here would meet this desire, but it needn't be the only way.

The biggest question I am left with after looking at this draft PR is whether the user must re-specify the minimal connection configs from my item 1 in order to apply config changes or whether applying config changes will "merge" with the Rook-applied minimal configs.

Code related to creating and removing rados object has been rearranged abd
modified. This patch introduces interface to set and reset user config.

nfs cluster config set <clusterid> -i <config_file>
nfs cluster config reset <clusterid>

Fixes: https://tracker.ceph.com/issues/45747
Signed-off-by: Varsha Rao <[email protected]>
@varshar16
varshar16 force-pushed the wip-nfs-update-user-config branch from ca18d0f to bba2d66 Compare August 10, 2020 10:56
@varshar16
varshar16 marked this pull request as ready for review August 10, 2020 10:57
@varshar16
varshar16 requested a review from batrick August 10, 2020 10:57
@varshar16

Copy link
Copy Markdown
Contributor Author

With Rook (and I think cephadm) I am thinking about the workflow that will be used programmatically by the orchestrator. In my mind, thinking of Rook, it looks something like below.

1. Rook needs to be able to set up NFS such that it connects to the Ceph cluster with some sort of minimal config

2. Rook can programmatically apply additional user-defined configs to NFS in such a way that does not overwrite the minimal configs needed to connect NFS to Ceph as done in step 1.
   2.a. Rook will likely wish to use some pre-existing mechanism to accomplish 2 above, and it's very helpful if that mechanism can be used by users manually in the interim period before it is implemented in Rook. It seems like your idea of an override file here would meet this desire, but it needn't be the only way.

The biggest question I am left with after looking at this draft PR is whether the user must re-specify the minimal connection configs from my item 1 in order to apply config changes or whether applying config changes will "merge" with the Rook-applied minimal configs.

User will not be required to respecify the default/minimal config again. As Ganesha uses the last loaded config block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants