Skip to content

Commit

Permalink
Merge pull request #199 from dceara/fix-ic
Browse files Browse the repository at this point in the history
Various fixes for IC deployments.
  • Loading branch information
dceara authored Apr 2, 2024
2 parents 5262c02 + 5787e81 commit f70fc1a
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 17 deletions.
2 changes: 1 addition & 1 deletion ovn-fake-multinode-utils/playbooks/bringup-cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
- name: Start tester container
ansible.builtin.shell: |
podman run -dt --name=ovn-tester --hostname=ovn-tester \
--privileged ovn/ovn-tester
--pids-limit -1 --privileged ovn/ovn-tester
- name: Add tester container interfaces to OVS bridges
environment:
Expand Down
12 changes: 6 additions & 6 deletions ovn-fake-multinode-utils/translate_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@ class ClusterConfig:
node_timeout_s: int = 20
internal_net: str = "16.0.0.0/16"
internal_net6: str = "16::/64"
external_net: str = "3.0.0.0/16"
external_net6: str = "3::/64"
gw_net: str = "2.0.0.0/16"
gw_net6: str = "2::/64"
ts_net: str = "30.0.0.0/16"
ts_net6: str = "30::/64"
external_net: str = "20.0.0.0/16"
external_net6: str = "20::/64"
gw_net: str = "30.0.0.0/16"
gw_net6: str = "30::/64"
ts_net: str = "40.0.0.0/16"
ts_net6: str = "40::/64"
cluster_net: str = "16.0.0.0/4"
cluster_net6: str = "16::/32"
n_workers: int = 2
Expand Down
12 changes: 9 additions & 3 deletions ovn-tester/cms/ovn_kubernetes/tests/base_cluster_bringup.py
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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:
Expand Down
10 changes: 3 additions & 7 deletions ovn-tester/ovn_workload.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 required for IC connectivity checks.
self.nbctl.set_global('ic-route-learn', 'true')
self.nbctl.set_global('ic-route-adv', 'true')

Expand Down

0 comments on commit f70fc1a

Please sign in to comment.