diff --git a/ovn-tester/cms/ovn_kubernetes/tests/base_cluster_bringup.py b/ovn-tester/cms/ovn_kubernetes/tests/base_cluster_bringup.py index 310fbe59..4f794497 100644 --- a/ovn-tester/cms/ovn_kubernetes/tests/base_cluster_bringup.py +++ b/ovn-tester/cms/ovn_kubernetes/tests/base_cluster_bringup.py @@ -1,7 +1,7 @@ from collections import namedtuple from randmac import RandMac -from ovn_utils import LSwitch +from ovn_utils import LSwitch, OvnIcNbctl from ovn_context import Context from ovn_ext_cmd import ExtCmd @@ -18,8 +18,14 @@ def __init__(self, config, clusters, global_cfg): self.ic_cluster = clusters[0] if len(clusters) > 1 else None def create_transit_switch(self): - if self.ic_cluster: - self.ic_cluster.icnbctl.ts_add() + if self.ic_cluster is None: + return + + inactivity_probe = ( + self.ic_cluster.cluster_cfg.db_inactivity_probe // 1000 + ) + ic_remote = f'tcp:{self.ic_cluster.cluster_cfg.node_net.ip + 2}:6645' + OvnIcNbctl(None, ic_remote, inactivity_probe).ts_add() def connect_transit_switch(self, cluster): if self.ic_cluster is None: diff --git a/ovn-tester/ovn_workload.py b/ovn-tester/ovn_workload.py index 352e4002..d7c55215 100644 --- a/ovn-tester/ovn_workload.py +++ b/ovn-tester/ovn_workload.py @@ -303,7 +303,6 @@ def __init__( self.brex_cfg = brex_cfg self.nbctl: Optional[ovn_utils.OvnNbctl] = None self.sbctl: Optional[ovn_utils.OvnSbctl] = None - self.icnbctl: Optional[ovn_utils.OvnIcNbctl] = None self.az = az protocol = "ssl" if cluster_cfg.enable_ssl else "tcp" @@ -364,12 +363,9 @@ def start(self): self.central_nodes[0], sb_conn, inactivity_probe ) - # ovn-ic configuration - self.icnbctl = ovn_utils.OvnIcNbctl( - None, - f'tcp:{self.cluster_cfg.node_net.ip + 2}:6645', - inactivity_probe, - ) + # ovn-ic configuration: enable route learning/advertising to allow + # automatic pinging between cluster_net subnets in different AZs. + # This is allows IC connectivity checks. self.nbctl.set_global('ic-route-learn', 'true') self.nbctl.set_global('ic-route-adv', 'true')