Skip to content

Commit 2be9630

Browse files
authored
Merge pull request ceph#62718 from adk3798/nfs-export-parse-systype
mgr/nfs: make sure sectype is a list when parsed Reviewed-by: John Mulligan <[email protected]>
2 parents cb0d9c4 + f931921 commit 2be9630

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/pybind/mgr/nfs/ganesha_conf.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,11 @@ def from_export_block(cls, export_block: RawBlock, cluster_id: str) -> 'Export':
413413
# accept "sectype" too.
414414
sectype = (export_block.values.get("SecType")
415415
or export_block.values.get("sectype") or None)
416+
# If sectype was only a single value (e.g. "sys") we end
417+
# up with a string instead of a list of strings here
418+
# https://github.com/ceph/go-ceph/issues/1097
419+
if sectype is not None and not isinstance(sectype, list):
420+
sectype = [sectype]
416421
return cls(export_block.values['export_id'],
417422
export_block.values['path'],
418423
cluster_id,

0 commit comments

Comments
 (0)