Message ID | 20231030080907.1568802-1-xsimonar@redhat.com |
---|---|
State | Accepted |
Delegated to: | Dumitru Ceara |
Headers | show |
Series | [ovs-dev,v2] controller: have I+P assigning ct_zones for l3gateway ports | expand |
Context | Check | Description |
---|---|---|
ovsrobot/apply-robot | success | apply and check: success |
ovsrobot/github-robot-_Build_and_Test | success | github build: passed |
ovsrobot/github-robot-_ovn-kubernetes | success | github build: passed |
On 10/30/23 09:09, Xavier Simonart wrote: > 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> > > --- > v2: - updated comment as suggested by Dumitru > - rebased on origin/main > --- Applied to main and backported to all branches down to 22.03. Thanks, Dumitru
diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c index da7d145ed..d19e6ac05 100644 --- a/controller/ovn-controller.c +++ b/controller/ovn-controller.c @@ -2642,9 +2642,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; } diff --git a/tests/ovn.at b/tests/ovn.at index 637d92bed..91ed8f73b 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -36813,14 +36813,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
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> --- v2: - updated comment as suggested by Dumitru - rebased on origin/main --- controller/ovn-controller.c | 5 +++-- tests/ovn.at | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-)