From cd24acdfc8fd24adef32032b98a52719bf2fc067 Mon Sep 17 00:00:00 2001 From: Arne Welzel Date: Thu, 2 Nov 2023 17:37:16 +0100 Subject: [PATCH] time machine: Mark leftovers for removal in v7.1 I suspect we could just drop these directly, but lets follow the deprecation cycle. --- scripts/base/frameworks/cluster/main.zeek | 17 ++++++++++++----- .../frameworks/cluster/setup-connections.zeek | 6 ++++++ scripts/base/init-bare.zeek | 2 +- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/scripts/base/frameworks/cluster/main.zeek b/scripts/base/frameworks/cluster/main.zeek index 171e3f1cb3..8f2a790db8 100644 --- a/scripts/base/frameworks/cluster/main.zeek +++ b/scripts/base/frameworks/cluster/main.zeek @@ -42,14 +42,21 @@ export { ## The topic name used for exchanging messages that are relevant to ## time machine nodes in a cluster. Used with broker-enabled cluster communication. - const time_machine_topic = "zeek/cluster/time_machine" &redef; + const time_machine_topic = "zeek/cluster/time_machine" &redef &deprecated="Remove in v7.1: Unused."; ## A set of topic names to be used for broadcasting messages that are ## relevant to all nodes in a cluster. Currently, there is not a common ## topic to broadcast to, because enabling implicit Broker forwarding would ## cause a routing loop for this topic. - const broadcast_topics = { logger_topic, manager_topic, proxy_topic, - worker_topic, time_machine_topic }; + const broadcast_topics = { + logger_topic, + manager_topic, + proxy_topic, + worker_topic, +@pragma push ignore-deprecations + time_machine_topic, +@pragma pop ignore-deprecations + }; ## The topic prefix used for exchanging messages that are relevant to ## a named node in a cluster. Used with broker-enabled cluster communication. @@ -165,7 +172,7 @@ export { ## A node acting as a traffic recorder using the ## `Time Machine `_ ## software. - TIME_MACHINE, + TIME_MACHINE &deprecated="Remove in v7.1: Unused.", }; ## Record type to indicate a node in a cluster. @@ -185,7 +192,7 @@ export { ## Name of the manager node this node uses. For workers and proxies. manager: string &optional; ## Name of a time machine node with which this node connects. - time_machine: string &optional; + time_machine: string &optional &deprecated="Remove in v7.1: Unused."; ## A unique identifier assigned to the node by the broker framework. ## This field is only set while a node is connected. id: string &optional; diff --git a/scripts/base/frameworks/cluster/setup-connections.zeek b/scripts/base/frameworks/cluster/setup-connections.zeek index 848555419c..5cd3e310fd 100644 --- a/scripts/base/frameworks/cluster/setup-connections.zeek +++ b/scripts/base/frameworks/cluster/setup-connections.zeek @@ -94,9 +94,11 @@ event zeek_init() &priority=-10 case WORKER: Broker::subscribe(Cluster::worker_topic); break; +@pragma push ignore-deprecations case TIME_MACHINE: Broker::subscribe(Cluster::time_machine_topic); break; +@pragma pop ignore-deprecations default: Reporter::error(fmt("Unhandled cluster node type: %s", self$node_type)); return; @@ -119,8 +121,10 @@ event zeek_init() &priority=-10 case MANAGER: connect_peers_with_type(LOGGER); +@pragma push ignore-deprecations if ( self?$time_machine ) connect_peer(TIME_MACHINE, self$time_machine); +@pragma pop ignore-deprecations break; case PROXY: @@ -137,8 +141,10 @@ event zeek_init() &priority=-10 if ( self?$manager ) connect_peer(MANAGER, self$manager); +@pragma push ignore-deprecations if ( self?$time_machine ) connect_peer(TIME_MACHINE, self$time_machine); +@pragma pop ignore-deprecations break; } diff --git a/scripts/base/init-bare.zeek b/scripts/base/init-bare.zeek index be5f97ddef..029dd46233 100644 --- a/scripts/base/init-bare.zeek +++ b/scripts/base/init-bare.zeek @@ -5189,7 +5189,7 @@ const dpd_ignore_ports = F &redef; const likely_server_ports: set[port] &redef; ## If true, output profiling for Time-Machine queries. -const time_machine_profiling = F &redef; +const time_machine_profiling = F &redef &deprecated="Remove in v7.1. Unused."; ## If true, warns about unused event handlers at startup. const check_for_unused_event_handlers = F &redef;