]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: add HAProxy sysctl settings
authorMichael Fritch <mfritch@suse.com>
Wed, 12 May 2021 23:27:50 +0000 (17:27 -0600)
committerSage Weil <sage@newdream.net>
Thu, 20 May 2021 23:11:50 +0000 (18:11 -0500)
Signed-off-by: Michael Fritch <mfritch@suse.com>
(cherry picked from commit 465e7ef243f85db27642b2cd626841e9e4be848e)

src/cephadm/cephadm

index c705f96b769871807a398f59a72295da89e7dca0..0d67a3d3609711a0df5c96a8ed71398426380faa 100755 (executable)
@@ -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()