Acked-by: Mark Michelson <[email protected]>

On 1/27/22 15:12, Dumitru Ceara wrote:
I-P OVSDB nodes rely on change tracking to update their own states.
Such nodes are primary inputs to the northd incremental processing
engine and without proper update processing for Southbound tables,
northd might fail to timely reconcile the contents of the Southbound
database.

Fixes: 4597317f16d1 ("northd: Introduce incremental processing for northd")
Signed-off-by: Dumitru Ceara <[email protected]>
---
  northd/ovn-northd.c | 258 +-------------------------------------------
  1 file changed, 2 insertions(+), 256 deletions(-)

diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
index 793135ede..80303503a 100644
--- a/northd/ovn-northd.c
+++ b/northd/ovn-northd.c
@@ -513,14 +513,6 @@ update_sequence_numbers(int64_t loop_start_time,
  }
  
  static void
-add_column_noalert(struct ovsdb_idl *idl,
-                   const struct ovsdb_idl_column *column)
-{
-    ovsdb_idl_add_column(idl, column);
-    ovsdb_idl_omit_alert(idl, column);
-}
-
-static void
  usage(void)
  {
      printf("\
@@ -730,256 +722,10 @@ main(int argc, char *argv[])
      unixctl_command_register("nb-connection-status", "", 0, 0,
                               ovn_conn_show, ovnnb_idl_loop.idl);
- /* We want to detect only selected changes to the ovn-sb db. */
+    /* We want to detect all changes to the ovn-sb db. */
      struct ovsdb_idl_loop ovnsb_idl_loop = OVSDB_IDL_LOOP_INITIALIZER(
          ovsdb_idl_create(ovnsb_db, &sbrec_idl_class, true, true));
-    ovsdb_idl_add_table(ovnsb_idl_loop.idl, &sbrec_table_sb_global);
-    add_column_noalert(ovnsb_idl_loop.idl, &sbrec_sb_global_col_nb_cfg);
-    add_column_noalert(ovnsb_idl_loop.idl, &sbrec_sb_global_col_options);
-    add_column_noalert(ovnsb_idl_loop.idl, &sbrec_sb_global_col_ipsec);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl,
-                               &sbrec_sb_global_col_connections);
-
-    ovsdb_idl_add_table(ovnsb_idl_loop.idl, &sbrec_table_logical_flow);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_logical_flow_col_logical_datapath);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_logical_flow_col_logical_dp_group);
-    add_column_noalert(ovnsb_idl_loop.idl, &sbrec_logical_flow_col_pipeline);
-    add_column_noalert(ovnsb_idl_loop.idl, &sbrec_logical_flow_col_table_id);
-    add_column_noalert(ovnsb_idl_loop.idl, &sbrec_logical_flow_col_priority);
-    add_column_noalert(ovnsb_idl_loop.idl, &sbrec_logical_flow_col_match);
-    add_column_noalert(ovnsb_idl_loop.idl, &sbrec_logical_flow_col_actions);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_logical_flow_col_controller_meter);
-    ovsdb_idl_add_column(ovnsb_idl_loop.idl,
-                         &sbrec_logical_flow_col_external_ids);
-
-    ovsdb_idl_add_table(ovnsb_idl_loop.idl,
-                        &sbrec_table_logical_dp_group);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_logical_dp_group_col_datapaths);
-
-    ovsdb_idl_add_table(ovnsb_idl_loop.idl, &sbrec_table_multicast_group);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_multicast_group_col_datapath);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_multicast_group_col_tunnel_key);
-    add_column_noalert(ovnsb_idl_loop.idl, &sbrec_multicast_group_col_name);
-    add_column_noalert(ovnsb_idl_loop.idl, &sbrec_multicast_group_col_ports);
-
-    ovsdb_idl_add_table(ovnsb_idl_loop.idl, &sbrec_table_datapath_binding);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_datapath_binding_col_tunnel_key);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_datapath_binding_col_load_balancers);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl,
-                               &sbrec_datapath_binding_col_external_ids);
-
-    ovsdb_idl_add_table(ovnsb_idl_loop.idl, &sbrec_table_port_binding);
-    add_column_noalert(ovnsb_idl_loop.idl, &sbrec_port_binding_col_datapath);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_port_binding_col_logical_port);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_port_binding_col_tunnel_key);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_port_binding_col_parent_port);
-    add_column_noalert(ovnsb_idl_loop.idl, &sbrec_port_binding_col_tag);
-    add_column_noalert(ovnsb_idl_loop.idl, &sbrec_port_binding_col_type);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl,
-                               &sbrec_port_binding_col_options);
-    add_column_noalert(ovnsb_idl_loop.idl, &sbrec_port_binding_col_mac);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_port_binding_col_nat_addresses);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl,
-                       &sbrec_port_binding_col_requested_chassis);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl,
-                               &sbrec_port_binding_col_chassis);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl,
-                               &sbrec_port_binding_col_gateway_chassis);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl,
-                               &sbrec_port_binding_col_ha_chassis_group);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl,
-                               &sbrec_port_binding_col_virtual_parent);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl,
-                               &sbrec_port_binding_col_up);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl,
-                               &sbrec_gateway_chassis_col_chassis);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl,
-                               &sbrec_gateway_chassis_col_name);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl,
-                               &sbrec_gateway_chassis_col_priority);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl,
-                               &sbrec_gateway_chassis_col_external_ids);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl,
-                               &sbrec_gateway_chassis_col_options);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_port_binding_col_external_ids);
-    ovsdb_idl_add_table(ovnsb_idl_loop.idl, &sbrec_table_mac_binding);
-    add_column_noalert(ovnsb_idl_loop.idl, &sbrec_mac_binding_col_datapath);
-    add_column_noalert(ovnsb_idl_loop.idl, &sbrec_mac_binding_col_ip);
-    add_column_noalert(ovnsb_idl_loop.idl, &sbrec_mac_binding_col_mac);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_mac_binding_col_logical_port);
-    ovsdb_idl_add_table(ovnsb_idl_loop.idl, &sbrec_table_dhcp_options);
-    add_column_noalert(ovnsb_idl_loop.idl, &sbrec_dhcp_options_col_code);
-    add_column_noalert(ovnsb_idl_loop.idl, &sbrec_dhcp_options_col_type);
-    add_column_noalert(ovnsb_idl_loop.idl, &sbrec_dhcp_options_col_name);
-    ovsdb_idl_add_table(ovnsb_idl_loop.idl, &sbrec_table_dhcpv6_options);
-    add_column_noalert(ovnsb_idl_loop.idl, &sbrec_dhcpv6_options_col_code);
-    add_column_noalert(ovnsb_idl_loop.idl, &sbrec_dhcpv6_options_col_type);
-    add_column_noalert(ovnsb_idl_loop.idl, &sbrec_dhcpv6_options_col_name);
-    ovsdb_idl_add_table(ovnsb_idl_loop.idl, &sbrec_table_address_set);
-    add_column_noalert(ovnsb_idl_loop.idl, &sbrec_address_set_col_name);
-    add_column_noalert(ovnsb_idl_loop.idl, &sbrec_address_set_col_addresses);
-    ovsdb_idl_add_table(ovnsb_idl_loop.idl, &sbrec_table_port_group);
-    add_column_noalert(ovnsb_idl_loop.idl, &sbrec_port_group_col_name);
-    add_column_noalert(ovnsb_idl_loop.idl, &sbrec_port_group_col_ports);
-
-    ovsdb_idl_add_table(ovnsb_idl_loop.idl, &sbrec_table_dns);
-    add_column_noalert(ovnsb_idl_loop.idl, &sbrec_dns_col_datapaths);
-    add_column_noalert(ovnsb_idl_loop.idl, &sbrec_dns_col_records);
-    add_column_noalert(ovnsb_idl_loop.idl, &sbrec_dns_col_external_ids);
-
-    ovsdb_idl_add_table(ovnsb_idl_loop.idl, &sbrec_table_rbac_role);
-    add_column_noalert(ovnsb_idl_loop.idl, &sbrec_rbac_role_col_name);
-    add_column_noalert(ovnsb_idl_loop.idl, &sbrec_rbac_role_col_permissions);
-
-    ovsdb_idl_add_table(ovnsb_idl_loop.idl, &sbrec_table_rbac_permission);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_rbac_permission_col_table);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_rbac_permission_col_authorization);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_rbac_permission_col_insert_delete);
-    add_column_noalert(ovnsb_idl_loop.idl, &sbrec_rbac_permission_col_update);
-
-    ovsdb_idl_add_table(ovnsb_idl_loop.idl, &sbrec_table_meter);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl, &sbrec_meter_col_name);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl, &sbrec_meter_col_unit);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl, &sbrec_meter_col_bands);
-
-    ovsdb_idl_add_table(ovnsb_idl_loop.idl, &sbrec_table_meter_band);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl,
-                               &sbrec_meter_band_col_action);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl, &sbrec_meter_band_col_rate);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl,
-                               &sbrec_meter_band_col_burst_size);
-
-    ovsdb_idl_add_table(ovnsb_idl_loop.idl, &sbrec_table_chassis);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl, &sbrec_chassis_col_name);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl,
-                               &sbrec_chassis_col_hostname);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl,
-                               &sbrec_chassis_col_other_config);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl, &sbrec_chassis_col_encaps);
-
-    ovsdb_idl_add_table(ovnsb_idl_loop.idl, &sbrec_table_encap);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl, &sbrec_encap_col_type);
-
-    ovsdb_idl_add_table(ovnsb_idl_loop.idl, &sbrec_table_chassis_private);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl,
-                               &sbrec_chassis_private_col_name);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl,
-                               &sbrec_chassis_private_col_chassis);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl,
-                               &sbrec_chassis_private_col_nb_cfg);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl,
-                               &sbrec_chassis_private_col_nb_cfg_timestamp);
-
-    ovsdb_idl_add_table(ovnsb_idl_loop.idl, &sbrec_table_ha_chassis);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_ha_chassis_col_chassis);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_ha_chassis_col_priority);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_ha_chassis_col_external_ids);
-
-    ovsdb_idl_add_table(ovnsb_idl_loop.idl, &sbrec_table_ha_chassis_group);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_ha_chassis_group_col_name);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_ha_chassis_group_col_ha_chassis);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_ha_chassis_group_col_external_ids);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_ha_chassis_group_col_ref_chassis);
-
-    ovsdb_idl_add_table(ovnsb_idl_loop.idl, &sbrec_table_igmp_group);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl,
-                               &sbrec_igmp_group_col_address);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl,
-                               &sbrec_igmp_group_col_datapath);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl,
-                               &sbrec_igmp_group_col_chassis);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl,
-                               &sbrec_igmp_group_col_ports);
-
-    ovsdb_idl_add_table(ovnsb_idl_loop.idl, &sbrec_table_ip_multicast);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_ip_multicast_col_datapath);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_ip_multicast_col_enabled);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_ip_multicast_col_querier);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_ip_multicast_col_eth_src);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_ip_multicast_col_ip4_src);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_ip_multicast_col_ip6_src);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_ip_multicast_col_table_size);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_ip_multicast_col_idle_timeout);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_ip_multicast_col_query_interval);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_ip_multicast_col_query_max_resp);
-    ovsdb_idl_add_table(ovnsb_idl_loop.idl, &sbrec_table_service_monitor);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_service_monitor_col_ip);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_service_monitor_col_logical_port);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_service_monitor_col_port);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_service_monitor_col_options);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl,
-                               &sbrec_service_monitor_col_status);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_service_monitor_col_protocol);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_service_monitor_col_src_mac);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_service_monitor_col_src_ip);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_service_monitor_col_external_ids);
-
-    ovsdb_idl_add_table(ovnsb_idl_loop.idl, &sbrec_table_load_balancer);
-    add_column_noalert(ovnsb_idl_loop.idl, &sbrec_load_balancer_col_datapaths);
-    add_column_noalert(ovnsb_idl_loop.idl, &sbrec_load_balancer_col_name);
-    add_column_noalert(ovnsb_idl_loop.idl, &sbrec_load_balancer_col_vips);
-    add_column_noalert(ovnsb_idl_loop.idl, &sbrec_load_balancer_col_protocol);
-    add_column_noalert(ovnsb_idl_loop.idl, &sbrec_load_balancer_col_options);
-    add_column_noalert(ovnsb_idl_loop.idl,
-                       &sbrec_load_balancer_col_external_ids);
-
-    ovsdb_idl_add_table(ovnsb_idl_loop.idl, &sbrec_table_bfd);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl,
-                               &sbrec_bfd_col_logical_port);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl, &sbrec_bfd_col_dst_ip);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl, &sbrec_bfd_col_status);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl, &sbrec_bfd_col_min_tx);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl, &sbrec_bfd_col_min_rx);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl, &sbrec_bfd_col_detect_mult);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl, &sbrec_bfd_col_disc);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl, &sbrec_bfd_col_src_port);
-
-    ovsdb_idl_add_table(ovnsb_idl_loop.idl, &sbrec_table_fdb);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl, &sbrec_fdb_col_mac);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl, &sbrec_fdb_col_dp_key);
-    ovsdb_idl_track_add_column(ovnsb_idl_loop.idl, &sbrec_fdb_col_port_key);
+    ovsdb_idl_track_add_all(ovnsb_idl_loop.idl);
unixctl_command_register("sb-connection-status", "", 0, 0,
                               ovn_conn_show, ovnsb_idl_loop.idl);


_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to