From 024c6aba01362e18ff02d88004b501663dbfdeed Mon Sep 17 00:00:00 2001 From: =?utf8?q?Asbj=C3=B8rn=20Sannes?= Date: Sun, 18 Jul 2021 11:35:44 +0200 Subject: [PATCH] mgr/cephadm: ingress: fix typo in spec.virtual_interface_networks reference MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/pybind/mgr/cephadm/services/ingress.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pybind/mgr/cephadm/services/ingress.py b/src/pybind/mgr/cephadm/services/ingress.py index f78f558a2d8f8..472a3c29d2e16 100644 --- a/src/pybind/mgr/cephadm/services/ingress.py +++ b/src/pybind/mgr/cephadm/services/ingress.py @@ -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 ' -- 2.39.5