From cdfed317442995dda9c8b272553257435593db09 Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Tue, 21 Mar 2023 11:42:25 -0400 Subject: [PATCH] mgr/cephadm: add optional HAProxy_Hosts field to ganesha conf template When NFS-Ganesha is used behind a HAProxy with proxy protocol support enabled ganesha requires that HAProxy_Hosts is set to a list of hosts that are permitted to use the proxy protocol. This change adds support for specifying HAProxy_Hosts in the ganesha configuration file template. Signed-off-by: John Mulligan (cherry picked from commit 7c7b7b672118c9ec3803f46998a3174cccb6dfb6) --- src/pybind/mgr/cephadm/templates/services/nfs/ganesha.conf.j2 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pybind/mgr/cephadm/templates/services/nfs/ganesha.conf.j2 b/src/pybind/mgr/cephadm/templates/services/nfs/ganesha.conf.j2 index 9d6e15f1c4f..ab8df71923b 100644 --- a/src/pybind/mgr/cephadm/templates/services/nfs/ganesha.conf.j2 +++ b/src/pybind/mgr/cephadm/templates/services/nfs/ganesha.conf.j2 @@ -7,6 +7,9 @@ NFS_CORE_PARAM { {% if bind_addr %} Bind_addr = {{ bind_addr }}; {% endif %} +{% if haproxy_hosts %} + HAProxy_Hosts = {{ haproxy_hosts|join(", ") }}; +{% endif %} } NFSv4 { -- 2.47.3