Merge remote-tracking branch 'origin/topic/awelzel/2885-log-caching-cluster-flaky'

* origin/topic/awelzel/2885-log-caching-cluster-flaky:
  log-caching-cluster: Wait for X509::known_log_certs to populate
This commit is contained in:
Tim Wojtulewicz 2023-04-18 11:11:44 -07:00
commit f222c15374
3 changed files with 27 additions and 2 deletions

12
CHANGES
View file

@ -1,3 +1,15 @@
6.0.0-dev.373 | 2023-04-18 11:11:44 -0700
* log-caching-cluster: Wait for X509::known_log_certs to populate (Arne Welzel, Corelight)
The known_log_certs table is populated asynchronously via broker after a
Broker::peer_added. It may take a variable amount of time depending on where
we run this test and it has been observed flaky specifically for the
arm_debian11 task. Instead of racing, give worker-2 3 seconds for receiving
the expected table content before continuing.
Fixes #2885
6.0.0-dev.371 | 2023-04-14 13:02:35 +0200 6.0.0-dev.371 | 2023-04-14 13:02:35 +0200
* ci/debian-11: Install libnode-dev, too (Arne Welzel, Corelight) * ci/debian-11: Install libnode-dev, too (Arne Welzel, Corelight)

View file

@ -1 +1 @@
6.0.0-dev.371 6.0.0-dev.373

View file

@ -41,7 +41,20 @@ event zeek_init()
event Broker::peer_added(endpoint: Broker::EndpointInfo, msg: string) event Broker::peer_added(endpoint: Broker::EndpointInfo, msg: string)
{ {
continue_processing(); if ( /worker-2/ in Cluster::node )
{
when ( |X509::known_log_certs| >= 3 )
{
continue_processing();
}
timeout 3sec
{
Reporter::error("Timeout waiting for X509::known_log_certs to be populated!");
terminate();
}
}
else
continue_processing();
} }
@endif @endif