Skip to content

Commit

Permalink
feat: use NFSv4.2 by default.
Browse files Browse the repository at this point in the history
This is a better default overall, because even if a server uses an older version of NFS, the mount client will automatically fallback to v4.1, v3 or v2 to accommodate the server's supported versions.
  • Loading branch information
jedel1043 committed Feb 6, 2025
1 parent f1d6d33 commit 266b480
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion charms/filesystem-client/src/utils/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,15 @@ def _get_endpoint_and_opts(info: FilesystemInfo) -> tuple[str, list[str]]:
pass

endpoint = f"{hostname}:{path}"
options = [f"port={port}"] if port else []
options = [
"fstype=nfs",
# NFS mount client should automatically fallback to v4.1, v3 or v2 to accommodate the server's
# supported version.
"nfsvers=4",
"minorversion=2",
]
if port:
options.append(f"port={port}")
case CephfsInfo(
fsid=fsid, name=name, path=path, monitor_hosts=mons, user=user, key=secret
):
Expand Down

0 comments on commit 266b480

Please sign in to comment.