]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: ingress: fix typo in spec.virtual_interface_networks reference 42389/head
authorAsbjørn Sannes <asbjorn.sannes@interhost.no>
Sun, 18 Jul 2021 09:35:44 +0000 (11:35 +0200)
committerAsbjørn Sannes <asbjorn.sannes@interhost.no>
Sun, 18 Jul 2021 15:40:26 +0000 (17:40 +0200)
When using virtual_inteface_networks to identify the interface to have the
virtual ip on, it referenced spec.networks instead of
spec.virtual_interface_networks.

Fixes: https://tracker.ceph.com/issues/51721
Signed-off-by: Asbjørn Sannes <asbjorn.sannes@interhost.no>
src/pybind/mgr/cephadm/services/ingress.py

index f78f558a2d8f8a309375456c9bce09a7147b0a20..472a3c29d2e16b9c0ff1d5a3d428d50b43bb586f 100644 (file)
@@ -198,10 +198,10 @@ class IngressService(CephService):
                     f'{bare_ip} is in {subnet} on {host} interface {interface}'
                 )
                 break
-        if not interface and spec.networks:
-            # hmm, try spec.networks
+        # try to find interface by matching spec.virtual_interface_networks
+        if not interface and spec.virtual_interface_networks:
             for subnet, ifaces in self.mgr.cache.networks.get(host, {}).items():
-                if subnet in spec.networks:
+                if subnet in spec.virtual_interface_networks:
                     interface = list(ifaces.keys())[0]
                     logger.info(
                         f'{spec.virtual_ip} will be configured on {host} interface '