mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 03:58:20 +00:00
Implement minimal supervised cluster configuration
More aspects of the cluster configuration to get fleshed out later, but a basic cluster like one would use for a live deployment can now be instantiated and run under supervision. The new clusterized-pcap-processing supervisor mode is also not done yet.
This commit is contained in:
parent
25a8ba99fa
commit
29f386e388
12 changed files with 390 additions and 91 deletions
10
src/Net.cc
10
src/Net.cc
|
@ -33,6 +33,7 @@
|
|||
#include "iosource/PktDumper.h"
|
||||
#include "plugin/Manager.h"
|
||||
#include "broker/Manager.h"
|
||||
#include "Supervisor.h"
|
||||
|
||||
extern "C" {
|
||||
#include "setsignal.h"
|
||||
|
@ -288,6 +289,9 @@ void net_run()
|
|||
while ( iosource_mgr->Size() ||
|
||||
(BifConst::exit_only_after_terminate && ! terminating) )
|
||||
{
|
||||
if ( zeek::supervised_node && getppid() == 1 )
|
||||
zeek_terminate_loop("supervised cluster node was orphaned");
|
||||
|
||||
double ts;
|
||||
iosource::IOSource* src = iosource_mgr->FindSoonest(&ts);
|
||||
|
||||
|
@ -361,13 +365,11 @@ void net_run()
|
|||
current_dispatched = 0;
|
||||
current_iosrc = 0;
|
||||
|
||||
// Should we put the signal handling into an IOSource?
|
||||
extern void termination_signal();
|
||||
|
||||
if ( signal_val == SIGTERM || signal_val == SIGINT )
|
||||
// We received a signal while processing the
|
||||
// current packet and its related events.
|
||||
termination_signal();
|
||||
// Should we put the signal handling into an IOSource?
|
||||
zeek_terminate_loop("received termination signal");
|
||||
|
||||
if ( ! reading_traces )
|
||||
// Check whether we have timers scheduled for
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue