]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/nfs: make sure sectype is a list when parsed 63114/head
authorAdam King <adking@redhat.com>
Mon, 7 Apr 2025 20:04:49 +0000 (16:04 -0400)
committerAdam King <adking@redhat.com>
Mon, 5 May 2025 14:53:31 +0000 (10:53 -0400)
Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit f931921f2f95181550a775496d14b279beb15f3c)

src/pybind/mgr/nfs/ganesha_conf.py

index 5108222eef311bbc8bc87c0e2680192f9dc532bd..e4cff653d250e895d4f6dc52253e50fdc9b3c57f 100644 (file)
@@ -413,6 +413,11 @@ class Export:
         # accept "sectype" too.
         sectype = (export_block.values.get("SecType")
                    or export_block.values.get("sectype") or None)
+        # If sectype was only a single value (e.g. "sys") we end
+        # up with a string instead of a list of strings here
+        # https://github.com/ceph/go-ceph/issues/1097
+        if sectype is not None and not isinstance(sectype, list):
+            sectype = [sectype]
         return cls(export_block.values['export_id'],
                    export_block.values['path'],
                    cluster_id,