cluster: Be noisy when attempting to connect to an unknown node

Mostly due to spending too much time wondering why nodes didn't connect
when there was a mismatch between "manager" and "manager-1" in the
cluster layout. Remove manager from test-all-policy-cluster test to
avoid connection attempts in this test.
This commit is contained in:
Arne Welzel 2024-12-12 10:52:09 +01:00
parent fb74834f4c
commit 271fc15041
2 changed files with 5 additions and 3 deletions

View file

@ -36,6 +36,8 @@ function connect_peer(node_type: NodeType, node_name: string)
status));
return;
}
Reporter::warning(fmt("connect_peer: node '%s' (%s) not found", node_name, node_type));
}
function connect_peers_with_type(node_type: NodeType)

View file

@ -23,9 +23,9 @@ redef Cluster::backend = Cluster::CLUSTER_BACKEND_BROKER;
@TEST-START-FILE cluster-layout.zeek
redef Cluster::nodes = {
["manager"] = [$node_type=Cluster::MANAGER, $ip=127.0.0.1, $p=to_port(getenv("BROKER_PORT1"))],
["logger-1"] = [$node_type=Cluster::LOGGER, $ip=127.0.0.1, $p=to_port(getenv("BROKER_PORT2")), $manager="manager"],
["proxy-1"] = [$node_type=Cluster::PROXY, $ip=127.0.0.1, $p=to_port(getenv("BROKER_PORT3")), $manager="manager"],
["worker-1"] = [$node_type=Cluster::WORKER, $ip=127.0.0.1, $p=to_port(getenv("BROKER_PORT4")), $manager="manager"],
["logger-1"] = [$node_type=Cluster::LOGGER, $ip=127.0.0.1, $p=to_port(getenv("BROKER_PORT2"))],
["proxy-1"] = [$node_type=Cluster::PROXY, $ip=127.0.0.1, $p=to_port(getenv("BROKER_PORT3"))],
["worker-1"] = [$node_type=Cluster::WORKER, $ip=127.0.0.1, $p=to_port(getenv("BROKER_PORT4"))],
};
@TEST-END-FILE