From: Venky Shankar Date: Wed, 15 Oct 2025 05:24:56 +0000 (+0000) Subject: qa/cephfs: log section in ganesha export X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=d7300bb1816a19942182d5121d737fa52e66e766;p=ceph-ci.git qa/cephfs: log section in ganesha export Signed-off-by: Venky Shankar --- diff --git a/qa/suites/fs/nfs-ganesha/tasks/0-create-export.yaml b/qa/suites/fs/nfs-ganesha/tasks/0-create-export.yaml index 43b9fbf32da..0a059d60037 100644 --- a/qa/suites/fs/nfs-ganesha/tasks/0-create-export.yaml +++ b/qa/suites/fs/nfs-ganesha/tasks/0-create-export.yaml @@ -19,26 +19,40 @@ tasks: - cmd: ceph nfs export apply nfs-ganesha-test -i /dev/stdin stdin: | { - "export_id": 1, - "path": "/", - "cluster_id": "nfs-ganesha-test", - "pseudo": "/nfsganesha", - "access_type": "RW", - "squash": "none", - "security_label": true, - "protocols": [ - 4 - ], - "transports": [ - "TCP" - ], - "fsal": { - "name": "CEPH", - "user_id": "nfs.nfs-ganesha-test.cephfs.a4cd9f65", - "fs_name": "cephfs", - "cmount_path": "/" + "export": { + "export_id": 1, + "path": "/", + "cluster_id": "nfs-ganesha-test", + "pseudo": "/nfsganesha", + "access_type": "RW", + "squash": "none", + "security_label": true, + "protocols": [ + 4 + ], + "transports": [ + "TCP" + ], + "fsal": { + "name": "CEPH", + "user_id": "nfs.nfs-ganesha-test.cephfs.a4cd9f65", + "fs_name": "cephfs", + "cmount_path": "/" + }, + "clients": [] }, - "clients": [] + "log": { + "default_log_level": "WARN", + "components": { + "fsal": "debug", + "nfs4": "debug" + }, + "facility": { + "name": "file", + "destination": "/var/log/ceph/ganesha.log", + "enable": "active" + } + } } # for debug - cmd: ceph nfs export info nfs-ganesha-test --pseudo_path=/nfsganesha diff --git a/src/pybind/mgr/nfs/ganesha_conf.py b/src/pybind/mgr/nfs/ganesha_conf.py index bd2cef02b3d..21f5846924d 100644 --- a/src/pybind/mgr/nfs/ganesha_conf.py +++ b/src/pybind/mgr/nfs/ganesha_conf.py @@ -400,10 +400,10 @@ class CephBlock: return self.to_dict() == other.to_dict() class Facility: - def __init(self, - name: str, - destination: str, - enable: str): + def __init__(self, + name: str, + destination: str, + enable: str): self.name = name self.destination = destination self.enable = enable @@ -437,28 +437,28 @@ class Facility: return self.to_dict() == other.to_dict() class Components: - def __init(self, - fsal: str, - nfsv4: str): + def __init__(self, + fsal: str, + nfs4: str): self.fsal = fsal - self.nfsv4 = nfsv4 + self.nfs4 = nfs4 @classmethod def from_components_block(cls, components: RawBlock) -> 'Components': - return cls(components.values['fsal'], components.values['nfsv4']) + return cls(components.values['fsal'], components.values['nfs4']) def to_components_block(self) -> RawBlock: - result = RawBlock("COMPONENTS", values={'fsal': self.fsal, 'nfsv4': self.nfsv4}) + result = RawBlock("COMPONENTS", values={'fsal': self.fsal, 'nfs4': self.nfs4}) return result @classmethod def from_dict(cls, ex_dict: Dict[str, Any]) -> 'Components': - return cls(ex_dict['fsal'], ex_dict['nfsv4']) + return cls(ex_dict['fsal'], ex_dict['nfs4']) def to_dict(self) -> Dict[str, Any]: values = { 'fsal': self.fsal, - 'nfsv4': self.nfsv4 + 'nfs4': self.nfs4 } return values