diff mbox series

[ovs-dev,2/2] expr.c: Remove backwards compatibility lookup in parse_port_group().

Message ID 168725279565.85238.11815861730765741839.stgit@dceara.remote.csb
State Accepted
Headers show
Series Update stale TODO items. | expand

Checks

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 fail github build: failed

Commit Message

Dumitru Ceara June 20, 2023, 9:19 a.m. UTC
It's been more than 2.5 years since the first release in which northd
started storing SB.Port_Group.name as
<Logical_Datapath.tunnel_key_NB-Port_Group.name> after bff01d49d6f2 ("Split
SB Port_Group per datapath.").

There's a safe upgrade path via the LTS release for deployments that
still run older ovn-controller versions.

Signed-off-by: Dumitru Ceara <dceara@redhat.com>
---
 TODO.rst   |    8 --------
 lib/expr.c |   12 ------------
 2 files changed, 20 deletions(-)
diff mbox series

Patch

diff --git a/TODO.rst b/TODO.rst
index 9e4db12e12..dff163e70b 100644
--- a/TODO.rst
+++ b/TODO.rst
@@ -86,14 +86,6 @@  OVN To-do List
 
   * Packaging for Debian.
 
-* ovn-controller: Remove backwards compatibility for Southbound DB Port_Group
-  names in expr.c a few releases after the 20.09 version. Right now
-  ovn-controller maintains backwards compatibility when connecting to a
-  SB database that doesn't store Port_Group.name as
-  <Logical_Datapath.tunnel_key_NB-Port_Group.name>. This causes an additional
-  hashtable lookup in parse_port_group() which can be avoided when we are sure
-  that the Southbound DB uses the new format.
-
 * ovn-northd-ddlog: Calls to warn() and err() from DDlog code would be
   better refactored to use the Warning[] relation (and introduce an
   Error[] relation once we want to issue some errors that way).  This
diff --git a/lib/expr.c b/lib/expr.c
index 9659b9b63d..f5d2032334 100644
--- a/lib/expr.c
+++ b/lib/expr.c
@@ -845,18 +845,6 @@  parse_port_group(struct expr_context *ctx, struct expr_constant_set *cs,
 
     if (ctx->port_groups) {
         port_group = shash_find_data(ctx->port_groups, ds_cstr(&sb_name));
-        if (!port_group) {
-            /* For backwards compatibility (e.g., ovn-controller was
-             * upgraded but ovn-northd not yet), perform an additional
-             * lookup because the NB Port_Group.name might have been
-             * stored as is in the SB Port_Group.name field.
-             */
-            port_group = shash_find_data(ctx->port_groups,
-                                         ctx->lexer->token.s);
-            if (ctx->port_groups_ref) {
-                sset_add(ctx->port_groups_ref, ctx->lexer->token.s);
-            }
-        }
     }
     ds_destroy(&sb_name);