diff mbox series

[ovs-dev,v3,1/8] northd: Assume all chassis support the "port-up-notif" feature.

Message ID 20240712151416.992033-2-dceara@redhat.com
State Accepted
Delegated to: Mark Michelson
Headers show
Series Add ACL Sampling using per-flow IPFIX. | 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 success github build: passed

Commit Message

Dumitru Ceara July 12, 2024, 3:14 p.m. UTC
This feature is supported in the last two LTS releases and the correct
upgrade procedure mandates that we don't jump across LTS releases.  It's
safe to remove the check in northd.

Signed-off-by: Dumitru Ceara <dceara@redhat.com>
---
 northd/northd.c     |  3 +--
 tests/ovn-northd.at | 24 ------------------------
 2 files changed, 1 insertion(+), 26 deletions(-)

Comments

Ales Musil July 15, 2024, 8:57 a.m. UTC | #1
On Fri, Jul 12, 2024 at 5:14 PM Dumitru Ceara <dceara@redhat.com> wrote:

> This feature is supported in the last two LTS releases and the correct
> upgrade procedure mandates that we don't jump across LTS releases.  It's
> safe to remove the check in northd.
>
> Signed-off-by: Dumitru Ceara <dceara@redhat.com>
> ---
>  northd/northd.c     |  3 +--
>  tests/ovn-northd.at | 24 ------------------------
>  2 files changed, 1 insertion(+), 26 deletions(-)
>
> diff --git a/northd/northd.c b/northd/northd.c
> index 6898daa00d..1b5a7480e4 100644
> --- a/northd/northd.c
> +++ b/northd/northd.c
> @@ -17903,8 +17903,7 @@ handle_port_binding_changes(struct ovsdb_idl_txn
> *ovnsb_txn,
>          if (lsp_is_router(op->nbsp)) {
>              up = true;
>          } else if (sb->chassis) {
> -            up = smap_get_bool(&sb->chassis->other_config,
> -                               OVN_FEATURE_PORT_UP_NOTIF, false)
> +            up = !smap_get_bool(&sb->chassis->other_config, "is-remote",
> false)
>                   ? sb->n_up && sb->up[0]
>                   : true;
>          }
> diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at
> index a389d19886..7dc94e1f56 100644
> --- a/tests/ovn-northd.at
> +++ b/tests/ovn-northd.at
> @@ -4168,30 +4168,6 @@ AT_CHECK([grep -qE 'duplicate logical.*port p1'
> northd/ovn-northd.log], [0])
>  AT_CLEANUP
>  ])
>
> -OVN_FOR_EACH_NORTHD_NO_HV([
> -AT_SETUP([Port_Binding.up backwards compatibility])
> -ovn_start
> -
> -ovn-nbctl ls-add ls1
> -ovn-nbctl --wait=sb lsp-add ls1 lsp1
> -
> -# Simulate the fact that lsp1 had been previously bound on hv1 by an
> -# ovn-controller running an older version.
> -ovn-sbctl \
> -    --id=@e create encap chassis_name=hv1 ip="192.168.0.1" type="geneve" \
> -    -- --id=@c create chassis name=hv1 encaps=@e \
> -    -- set Port_Binding lsp1 chassis=@c
> -
> -wait_for_ports_up lsp1
> -
> -# Simulate the fact that hv1 is aware of Port_Binding.up, ovn-northd
> -# should transition the port state to down.
> -check ovn-sbctl set chassis hv1 other_config:port-up-notif=true
> -wait_row_count nb:Logical_Switch_Port 1 up=false name=lsp1
> -
> -AT_CLEANUP
> -])
> -
>  OVN_FOR_EACH_NORTHD_NO_HV_PARALLELIZATION([
>  AT_SETUP([Load Balancers and lb_force_snat_ip for Gateway Routers])
>  ovn_start
> --
> 2.44.0
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
>
Looks good to me, thanks.

Acked-by: Ales Musil <amusil@redhat.com>
diff mbox series

Patch

diff --git a/northd/northd.c b/northd/northd.c
index 6898daa00d..1b5a7480e4 100644
--- a/northd/northd.c
+++ b/northd/northd.c
@@ -17903,8 +17903,7 @@  handle_port_binding_changes(struct ovsdb_idl_txn *ovnsb_txn,
         if (lsp_is_router(op->nbsp)) {
             up = true;
         } else if (sb->chassis) {
-            up = smap_get_bool(&sb->chassis->other_config,
-                               OVN_FEATURE_PORT_UP_NOTIF, false)
+            up = !smap_get_bool(&sb->chassis->other_config, "is-remote", false)
                  ? sb->n_up && sb->up[0]
                  : true;
         }
diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at
index a389d19886..7dc94e1f56 100644
--- a/tests/ovn-northd.at
+++ b/tests/ovn-northd.at
@@ -4168,30 +4168,6 @@  AT_CHECK([grep -qE 'duplicate logical.*port p1' northd/ovn-northd.log], [0])
 AT_CLEANUP
 ])
 
-OVN_FOR_EACH_NORTHD_NO_HV([
-AT_SETUP([Port_Binding.up backwards compatibility])
-ovn_start
-
-ovn-nbctl ls-add ls1
-ovn-nbctl --wait=sb lsp-add ls1 lsp1
-
-# Simulate the fact that lsp1 had been previously bound on hv1 by an
-# ovn-controller running an older version.
-ovn-sbctl \
-    --id=@e create encap chassis_name=hv1 ip="192.168.0.1" type="geneve" \
-    -- --id=@c create chassis name=hv1 encaps=@e \
-    -- set Port_Binding lsp1 chassis=@c
-
-wait_for_ports_up lsp1
-
-# Simulate the fact that hv1 is aware of Port_Binding.up, ovn-northd
-# should transition the port state to down.
-check ovn-sbctl set chassis hv1 other_config:port-up-notif=true
-wait_row_count nb:Logical_Switch_Port 1 up=false name=lsp1
-
-AT_CLEANUP
-])
-
 OVN_FOR_EACH_NORTHD_NO_HV_PARALLELIZATION([
 AT_SETUP([Load Balancers and lb_force_snat_ip for Gateway Routers])
 ovn_start