]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: ingress: fix typo in spec.virtual_interface_networks reference
authorAsbjørn Sannes <asbjorn.sannes@interhost.no>
Sun, 18 Jul 2021 09:35:44 +0000 (11:35 +0200)
committerSebastian Wagner <sewagner@redhat.com>
Tue, 10 Aug 2021 14:32:14 +0000 (16:32 +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>
(cherry picked from commit 024c6aba01362e18ff02d88004b501663dbfdeed)

src/pybind/mgr/cephadm/services/ingress.py

index 9c49cc6932d9ce4f48a7fd6d9c5998e6cbe57e20..3825ca862ab2230c48d636e563f24b47fc96e221 100644 (file)
@@ -204,10 +204,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 '