From: Asbjørn Sannes Date: Sun, 18 Jul 2021 09:35:44 +0000 (+0200) Subject: mgr/cephadm: ingress: fix typo in spec.virtual_interface_networks reference X-Git-Tag: v17.1.0~1276^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=024c6aba01362e18ff02d88004b501663dbfdeed;p=ceph.git mgr/cephadm: ingress: fix typo in spec.virtual_interface_networks reference 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 --- diff --git a/src/pybind/mgr/cephadm/services/ingress.py b/src/pybind/mgr/cephadm/services/ingress.py index f78f558a2d8f..472a3c29d2e1 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 '