]> git-server-git.apps.pok.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)
committerMichael Fritch <mfritch@suse.com>
Thu, 13 May 2021 00:00:42 +0000 (18:00 -0600)
Signed-off-by: Michael Fritch <mfritch@suse.com>
src/cephadm/cephadm

index a9f3d9a6c32a2a2a19e1f4aa20abb6b3194ab217..a0101b9b495b4ac1e67577ae25d024eaf04d4600 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',
+        ]
+
 ##################################
 
 
@@ -2969,6 +2976,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()