Skip to content

Add dictionary to configure delegations and async#129

Draft
animesh-javali wants to merge 1 commit intonfs-ganesha:centos-cifrom
animesh-javali:centos-ci
Draft

Add dictionary to configure delegations and async#129
animesh-javali wants to merge 1 commit intonfs-ganesha:centos-cifrom
animesh-javali:centos-ci

Conversation

@animesh-javali
Copy link

By default, GaneshaManager generates a standard configuration with default values:

Delegations = true, delegations = readwrite

When ganesha_opts is provided, any of the following keys can override the defaults:

delegations_v4: overrides the NFSv4 Delegations setting

delegations_export: overrides the delegations setting in the EXPORT block

ceph_async: overrides the async value in the CEPH block

If ganesha_opts is empty or not provided, the existing configuration generation remains unchanged.

This allows tests and setups to programmatically customize NFS-Ganesha configuration without manually editing the config file or creating separate templates.

It keeps backward compatibility while supporting
flexible overrides.

@Manimaran-MM Manimaran-MM self-requested a review January 23, 2026 08:15

if self.test_type == "pynfs":
delegations_v4 = " Delegations = true;"
delegations_export = " delegations = readwrite;"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are changing the export readwrite to None, the gatecheck may fail..

Can you update the "tests/test_pynfs_cthon.py" file "Test 2" with additional param of ganesha_opts, so that gatecheck will continue to be green

cephfs_name=ceph_setup.cephfs_name
cephfs_name=ceph_setup.cephfs_name,
#ganesha_opts={
#"delegations_v4": "true",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove this commented line?

ceph_async = "true"

# ---- override only if ganesha_opts are passed ----
if self.ganesha_opts and self.test_type == "pynfs":

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are updating ganesha_opts, we can remove self.test_type == "pynfs" this check

By default, GaneshaManager generates a standard configuration
with default values:

Delegations = true, delegations = readwrite

When ganesha_opts is provided, any of the following keys can
override the defaults:

delegations_v4: overrides the NFSv4 Delegations setting

delegations_export: overrides the delegations setting in the
EXPORT block

ceph_async: overrides the async value in the CEPH block

If ganesha_opts is empty or not provided, the existing
configuration generation remains unchanged.

This allows tests and setups to programmatically customize
NFS-Ganesha configuration without manually editing the config
file or creating separate templates.

It keeps backward compatibility while supporting
flexible overrides.

Signed-off-by: Animesh Javali <Animesh.Javali@ibm.com>
Copy link

@Manimaran-MM Manimaran-MM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise LGTM


assert rc == 0, f"Cthon CephFS tests failed"

'''

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason why this is commented?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes since full setup(installation of ceph) is already done, it fails to install it again.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants