Skip to content

Commit

Permalink
controller: have I+P assigning ct_zones for l3gateway ports
Browse files Browse the repository at this point in the history
When l3gateway ports get added, ct_zones were assigned during
(ct_zones) recomputes, but not by I+P.
Before this patch, test "Migration of CT zone from UUID to name"
was randomly failing, as ct_zone was not assigned by I+P but
a ct_zone recompute happened most of the time (and hence test succeeded).
Test case has been adapted so that ct_zone recompute usually happens
before adding the sw0-lr0 port.

Signed-off-by: Xavier Simonart <xsimonar@redhat.com>
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
  • Loading branch information
simonartxavier authored and dceara committed Nov 17, 2023
1 parent abe1d31 commit 971256e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions controller/ovn-controller.c
Original file line number Diff line number Diff line change
Expand Up @@ -2625,9 +2625,10 @@ ct_zones_runtime_data_handler(struct engine_node *node, void *data)
struct tracked_lport *t_lport = shash_node->data;
if (strcmp(t_lport->pb->type, "")
&& strcmp(t_lport->pb->type, "localport")
&& strcmp(t_lport->pb->type, "l3gateway")
&& strcmp(t_lport->pb->type, "localnet")) {
/* We allocate zone-id's only to VIF, localport, and localnet
* lports. */
/* We allocate zone-id's only to VIF, localport, l3gateway,
* and localnet lports. */
continue;
}

Expand Down
6 changes: 3 additions & 3 deletions tests/ovn.at
Original file line number Diff line number Diff line change
Expand Up @@ -36679,14 +36679,14 @@ check ovn-nbctl ls-add sw0
check ovn-nbctl lsp-add sw0 sw0-port1
check ovn-nbctl lsp-set-addresses sw0-port1 "50:54:00:00:00:01 192.168.0.2"

ovs-vsctl add-port br-int p1 -- \
set Interface p1 external_ids:iface-id=sw0-port1

check ovn-nbctl lsp-add sw0 sw0-lr0
check ovn-nbctl lsp-set-type sw0-lr0 router
check ovn-nbctl lsp-set-addresses sw0-lr0 00:00:00:00:ff:01
check ovn-nbctl lsp-set-options sw0-lr0 router-port=lr0-sw0

ovs-vsctl add-port br-int p1 -- \
set Interface p1 external_ids:iface-id=sw0-port1

check ovn-appctl -t ovn-controller vlog/set dbg:main

wait_for_ports_up
Expand Down

0 comments on commit 971256e

Please sign in to comment.