]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa/cephfs: log section in ganesha export wip-fs-suite-ganesha-tests-x9
authorVenky Shankar <vshankar@redhat.com>
Wed, 15 Oct 2025 05:24:56 +0000 (05:24 +0000)
committerVenky Shankar <vshankar@redhat.com>
Wed, 15 Oct 2025 08:08:26 +0000 (08:08 +0000)
Signed-off-by: Venky Shankar <vshankar@redhat.com>
qa/suites/fs/nfs-ganesha/tasks/0-create-export.yaml
src/pybind/mgr/nfs/ganesha_conf.py

index 43b9fbf32daeacc63c286441a54d2fc8a018cebd..0a059d60037f1d065467055525ee1b53a72c1b39 100644 (file)
@@ -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
index bd2cef02b3d4dc27d46ce140d844863d61b91ca8..21f5846924d769def21709b819ee30105aec2efe 100644 (file)
@@ -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