From 3dd95b90c1638b7050b1b28e72fcb8cc56b4c522 Mon Sep 17 00:00:00 2001 From: Arne Welzel Date: Wed, 24 Sep 2025 12:32:59 +0200 Subject: [PATCH] cluster: allow cluster-layout script to redef cluster backend This makes testing a bit easier right now, but it's not actually safe to rely on Cluster::backend for conditional loading. --- scripts/base/frameworks/cluster/__load__.zeek | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/base/frameworks/cluster/__load__.zeek b/scripts/base/frameworks/cluster/__load__.zeek index 2072b457a7..42c049acf5 100644 --- a/scripts/base/frameworks/cluster/__load__.zeek +++ b/scripts/base/frameworks/cluster/__load__.zeek @@ -15,12 +15,6 @@ redef Broker::log_topic = Cluster::rr_log_topic; # Add a cluster prefix. @prefixes += cluster -# Broker-specific additions: -@if ( Cluster::backend == Cluster::CLUSTER_BACKEND_BROKER ) -@load ./broker-backpressure -@load ./broker-telemetry -@endif - @if ( Supervisor::is_supervised() ) # When running a supervised cluster, populate Cluster::nodes from the node table # the Supervisor provides to new Zeek nodes. The management framework configures @@ -39,6 +33,12 @@ redef Cluster::manager_is_logger = F; @load cluster-layout @endif +# Broker-specific additions: +@if ( Cluster::backend == Cluster::CLUSTER_BACKEND_BROKER ) +@load ./broker-backpressure +@load ./broker-telemetry +@endif + @if ( Cluster::node in Cluster::nodes ) @load ./setup-connections