From f2a95728f723fa98e1ecf5fef712065ca7b3f881 Mon Sep 17 00:00:00 2001 From: Dimitri Savineau Date: Thu, 15 Jul 2021 16:24:28 -0400 Subject: [PATCH] ceph-nfs: allow overriding NFS_CORE_PARAM We already have config override variables for existing block (like ganesha_ceph_export_overrides, ganesha_log_overrides, etc...) or a global one (ganesha_conf_overrides) but redefining the NFS_CORE_PARAM block in that variable will erase all previous values (currently only Bind_Addr). ganesha_core_param_overrides: | Enable_UDP = false; NFS_Port = 2050; Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1941775 Signed-off-by: Dimitri Savineau (cherry picked from commit 9817d29543099ca640ce8b23da2ab9f26179cba5) --- group_vars/nfss.yml.sample | 1 + roles/ceph-nfs/defaults/main.yml | 1 + roles/ceph-nfs/templates/ganesha.conf.j2 | 1 + 3 files changed, 3 insertions(+) diff --git a/group_vars/nfss.yml.sample b/group_vars/nfss.yml.sample index f156c7518..21ed92e18 100644 --- a/group_vars/nfss.yml.sample +++ b/group_vars/nfss.yml.sample @@ -110,6 +110,7 @@ dummy: # #Entries_HWMark = 100000; #} # +#ganesha_core_param_overrides: #ganesha_ceph_export_overrides: #ganesha_rgw_export_overrides: #ganesha_rgw_section_overrides: diff --git a/roles/ceph-nfs/defaults/main.yml b/roles/ceph-nfs/defaults/main.yml index 361cd3698..38248fbee 100644 --- a/roles/ceph-nfs/defaults/main.yml +++ b/roles/ceph-nfs/defaults/main.yml @@ -102,6 +102,7 @@ rgw_client_name: client.rgw.{{ ansible_facts['hostname'] }} #Entries_HWMark = 100000; #} # +#ganesha_core_param_overrides: #ganesha_ceph_export_overrides: #ganesha_rgw_export_overrides: #ganesha_rgw_section_overrides: diff --git a/roles/ceph-nfs/templates/ganesha.conf.j2 b/roles/ceph-nfs/templates/ganesha.conf.j2 index 10cd990dd..7e6fab6c5 100644 --- a/roles/ceph-nfs/templates/ganesha.conf.j2 +++ b/roles/ceph-nfs/templates/ganesha.conf.j2 @@ -10,6 +10,7 @@ NFS_Core_Param {% if ceph_nfs_bind_addr is defined %} Bind_Addr={{ ceph_nfs_bind_addr }}; {% endif %} +{{ ganesha_core_param_overrides | default(None) }} } {% if ceph_nfs_disable_caching | bool or nfs_file_gw | bool %}