change base scripts to use run-time if's or @if ... &analyze

This commit is contained in:
Vern Paxson 2023-05-19 13:26:27 -07:00
parent e749638380
commit 890010915a
30 changed files with 263 additions and 253 deletions

View file

@ -18,11 +18,11 @@ export {
# If we are not the manager, disable automatically generating masters. We will attach
# clones instead.
@if ( Cluster::is_enabled() && Cluster::local_node_type() != Cluster::MANAGER )
@if ( Cluster::is_enabled() && Cluster::local_node_type() != Cluster::MANAGER ) &analyze
redef Broker::table_store_master = F;
@endif
@if ( Broker::table_store_master )
@if ( Broker::table_store_master ) &analyze
global broker_backed_ids: set[string];

View file

@ -347,7 +347,7 @@ function nodeid_topic(id: string): string
return nodeid_topic_prefix + id + "/";
}
@if ( Cluster::is_enabled() )
@if ( Cluster::is_enabled() ) &analyze
event Cluster::hello(name: string, id: string) &priority=10
{
@ -383,9 +383,6 @@ event Cluster::hello(name: string, id: string) &priority=10
event Broker::peer_added(endpoint: Broker::EndpointInfo, msg: string) &priority=10
{
if ( ! Cluster::is_enabled() )
return;
local e = Broker::make_event(Cluster::hello, node, Broker::node_id());
Broker::publish(nodeid_topic(endpoint$id), e);
}

View file

@ -64,7 +64,7 @@ function archiver_rotation_format_func(ri: Log::RotationFmtInfo): Log::RotationP
return rval;
}
@if ( Supervisor::is_supervised() )
@if ( Supervisor::is_supervised() ) &analyze
redef Log::default_rotation_dir = "log-queue";

View file

@ -19,7 +19,7 @@ redef Log::enable_remote_logging = T;
## Log rotation interval.
redef Log::default_rotation_interval = 24 hrs;
@if ( ! Supervisor::is_supervised() )
@if ( ! Supervisor::is_supervised() ) &analyze
## Use the cluster's delete-log script.
redef Log::default_rotation_postprocessor_cmd = "delete-log";
@endif

View file

@ -13,7 +13,7 @@ redef Log::enable_remote_logging = T;
redef Log::default_rotation_interval = 24hrs;
@if ( ! Supervisor::is_supervised() )
@if ( ! Supervisor::is_supervised() ) &analyze
## Use the cluster's delete-log script.
redef Log::default_rotation_postprocessor_cmd = "delete-log";
@endif

View file

@ -12,7 +12,7 @@ redef Log::enable_remote_logging = T;
redef Log::default_rotation_interval = 24hrs;
@if ( ! Supervisor::is_supervised() )
@if ( ! Supervisor::is_supervised() ) &analyze
## Use the cluster's delete-log script.
redef Log::default_rotation_postprocessor_cmd = "delete-log";
@endif