]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: fix HAProxy/RGW IPv6 failure (ip_nonlocal_bind) 67493/head
authorkginon <kobi.ginon.ext@nokia.com>
Tue, 24 Feb 2026 18:28:56 +0000 (20:28 +0200)
committerKobi Ginon <kginon@redhat.com>
Wed, 15 Apr 2026 08:07:13 +0000 (11:07 +0300)
Fixes: https://tracker.ceph.com/issues/56660
Signed-off-by: Kobi Ginon <kginon@redhat.com>
src/cephadm/cephadmlib/daemons/ingress.py
src/cephadm/tests/test_ingress.py

index 645654b59c83afb1362f5841e9c4f4e40b9ce81a..612f37298799669208039ab0c352e0fe511d4ff4 100644 (file)
@@ -127,6 +127,7 @@ class HAproxy(ContainerDaemonForm):
             '# IP forwarding and non-local bind',
             'net.ipv4.ip_forward = 1',
             'net.ipv4.ip_nonlocal_bind = 1',
+            'net.ipv6.ip_nonlocal_bind = 1',
         ]
 
     def container(self, ctx: CephadmContext) -> CephContainer:
@@ -247,6 +248,7 @@ class Keepalived(ContainerDaemonForm):
             '# IP forwarding and non-local bind',
             'net.ipv4.ip_forward = 1',
             'net.ipv4.ip_nonlocal_bind = 1',
+            'net.ipv6.ip_nonlocal_bind = 1',
         ]
 
     def uid_gid(self, ctx: CephadmContext) -> Tuple[int, int]:
index 7f23f64f51fc9253b5ac3294282f53d0ba07d34f..9c71bd4761f2869986998ca6250b600a8881c2fe 100644 (file)
@@ -184,7 +184,12 @@ def test_haproxy_get_sysctl_settings():
             SAMPLE_HAPROXY_IMAGE,
         )
         ss = hap.get_sysctl_settings()
-        assert len(ss) == 3
+        assert ss == [
+            '# IP forwarding and non-local bind',
+            'net.ipv4.ip_forward = 1',
+            'net.ipv4.ip_nonlocal_bind = 1',
+            'net.ipv6.ip_nonlocal_bind = 1',
+        ]
 
 
 @pytest.mark.parametrize(
@@ -347,4 +352,9 @@ def test_keepalived_get_sysctl_settings():
             SAMPLE_KEEPALIVED_IMAGE,
         )
         ss = kad.get_sysctl_settings()
-        assert len(ss) == 3
+        assert ss == [
+            '# IP forwarding and non-local bind',
+            'net.ipv4.ip_forward = 1',
+            'net.ipv4.ip_nonlocal_bind = 1',
+            'net.ipv6.ip_nonlocal_bind = 1',
+        ]