From 652d5c2fef0014afc499c35ae9d7996c40941d37 Mon Sep 17 00:00:00 2001 From: Michael Fritch Date: Wed, 12 May 2021 17:27:50 -0600 Subject: [PATCH] cephadm: add HAProxy sysctl settings Signed-off-by: Michael Fritch (cherry picked from commit 465e7ef243f85db27642b2cd626841e9e4be848e) --- src/cephadm/cephadm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index c705f96b76987..0d67a3d360971 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -746,6 +746,13 @@ class HAproxy(object): mounts[os.path.join(data_dir, 'haproxy')] = '/var/lib/haproxy' return mounts + @staticmethod + def get_sysctl_settings() -> List[str]: + return [ + '# IP forwarding', + 'net.ipv4.ip_forward = 1', + ] + ################################## @@ -2972,6 +2979,8 @@ def install_sysctl(ctx: CephadmContext, fsid: str, daemon_type: str) -> None: if daemon_type == 'osd': lines = OSD.get_sysctl_settings() + elif daemon_type == 'haproxy': + lines = HAproxy.get_sysctl_settings() elif daemon_type == 'keepalived': lines = Keepalived.get_sysctl_settings() -- 2.39.5