Commit graph

13262 commits

Author SHA1 Message Date
Vern Paxson
772169f8e0 low-level tidying 2022-05-26 17:01:10 -07:00
Christian Kreibich
415bbe17d6 Merge branch 'topic/christian/management-cluster-dirs'
* topic/christian/management-cluster-dirs:
  Management framework: bump zeek-client to pull in instance serialization fixes
  Management framework: bump external cluster testsuite
  Management framework: update agent-checkin test to reflect recent changes
  Management framework: place each Zeek process in its own working dir
  Management framework: set defaults for log rotation and persistent state
  Management framework: add spool and state directory config settings
  Management framework: establish stdout/stderr files also for cluster nodes
  Management framework: default to having agents check in with the (local) controller
  Management framework: move role variable from logging into framework-wide config
  Management framework: distinguish supervisor/supervisee when loading agent/controller
  Management framework: simplify agent and controller stdout/stderr files
  Management framework: prefix the management logs with "management-"
  Management framework: comment and layouting tweaks, no functional change
  Management framework: rename env var that labels agents/controllers
  Management framework: increase robustness of agent/controller naming
2022-05-26 16:10:14 -07:00
Christian Kreibich
1165193df8 Management framework: bump zeek-client to pull in instance serialization fixes 2022-05-26 13:32:08 -07:00
Christian Kreibich
aeb29413a2 Management framework: bump external cluster testsuite 2022-05-26 13:32:08 -07:00
Christian Kreibich
328e663060 Management framework: update agent-checkin test to reflect recent changes
This keeps logs produced locally and without rotation, and adopts the simpler
stdout/sterr file naming.
2022-05-26 12:57:13 -07:00
Christian Kreibich
93ea03a081 Management framework: place each Zeek process in its own working dir
This establishes a directory "nodes" in Management::state_dir and places each
Zeek process into a subdirectory in it, named after the Zeek process. For
example, node "worker-01" runs with cwd <state_dir>/nodes/worker-01/.

Explicitly configured directories can override the naming logic, and also ignore
the state directory if they're absolute paths. One exception remains: the
Supervisor itself -- we'd have to use LogAscii::logdir to automatically place it
too in its own directory, but that feature currently does not interoperate with
log rotation.
2022-05-26 12:56:02 -07:00
Christian Kreibich
d1cd409e59 Management framework: set defaults for log rotation and persistent state
This adds management/persistence.zeek to establish common configuration for log
rotation and persistent variable state. Log-writing Zeek processes initially
write locally in their working directory, and rotate into subdirectory
"log-queue" of the spool. Since agent and controller have no logger,
persistence.zeek puts in place compatible configurations for them.

Storage folders for Broker-backed tables and clusterized stores default to
subdirectories of the new Zeek-level state folder.

When setting the ZEEK_MANAGEMENT_TESTING environment variable, persistent state
is kept in the local directory, and log rotation remains disabled.

This also tweaks @loads a bit in favor of simply loading frameworks/management,
which is easier to keep track of.
2022-05-26 12:55:10 -07:00
Tim Wojtulewicz
bc90cc0003 Add some missing NEWS entries 2022-05-26 12:49:42 -07:00
Tim Wojtulewicz
fb01c8967a Merge remote-tracking branch 'origin/topic/timw/2054-null-string-join'
* origin/topic/timw/2054-null-string-join:
  GH-2054: Allow nulls as separators for join_string_vec
2022-05-26 08:23:53 -07:00
zeek-bot
26152b8c7a Update doc submodule [nomail] [skip ci] 2022-05-26 00:38:12 +00:00
Tim Wojtulewicz
271d3c4038 GH-2054: Allow nulls as separators for join_string_vec 2022-05-25 17:03:26 -07:00
Christian Kreibich
7708cbe500 Management framework: add spool and state directory config settings
This allows specifying spool and variable-state directories specifically for the
management framework. They default to the corresponding installation-level
folders.
2022-05-25 13:56:23 -07:00
Christian Kreibich
e305d9c613 Management framework: establish stdout/stderr files also for cluster nodes 2022-05-25 13:56:23 -07:00
Christian Kreibich
da016b8a68 Management framework: default to having agents check in with the (local) controller
This allows single-machine settings to work out of the box when agent and
cluster are loaded in Supervisor mode.
2022-05-25 13:56:23 -07:00
Christian Kreibich
b96a4276eb Management framework: move role variable from logging into framework-wide config
The role isn't just about logging, it can also act as a general indicator to key
in on in role-specific code elsewhere, such as @if.
2022-05-25 13:56:23 -07:00
Christian Kreibich
e78fdc39e4 Management framework: distinguish supervisor/supervisee when loading agent/controller
Load the agent/controller bootstrapping code only from the Supervisor, and the
basic config only from a supervisee. When we're neither (which is likely a
mistake), we do nothing.
2022-05-25 13:56:23 -07:00
Christian Kreibich
d40bb6e85f Management framework: simplify agent and controller stdout/stderr files
Moving to a model in which every Zeek process runs out of its own working
directory simplifies the handling of those files.
2022-05-25 13:56:23 -07:00
Christian Kreibich
f8f7fd97e8 Management framework: prefix the management logs with "management-"
These were still using "cluster-", a leftover from earlier days of the
framework.
2022-05-25 13:56:23 -07:00
Christian Kreibich
bd6c1683a2 Management framework: comment and layouting tweaks, no functional change
Also remove additional instances of the term "data cluster".
2022-05-25 13:56:23 -07:00
Christian Kreibich
d4d6f10299 Management framework: rename env var that labels agents/controllers
Just a consistency tweak to avoid confusion with "cluster".
2022-05-25 13:56:23 -07:00
Christian Kreibich
d2903bb645 Management framework: increase robustness of agent/controller naming
The fallback mechanism when no explicit agent/controller names are configured
didn't work properly, because many places in the code relied on accessing the
name via the variables meant for explicit configuration, such as
Management::Agent::name. Agent and controller now offer functions for computing
the correct effective name, and we use that throughout.
2022-05-25 13:56:23 -07:00
Tim Wojtulewicz
2f453cd0cd Merge remote-tracking branch 'origin/topic/timw/1995-pcap-filter-error-messages'
* origin/topic/timw/1995-pcap-filter-error-messages:
  Propagate BPF_Program error message to script land
  Allow pcap pktsrc to use other BPF_Program::Compile method
2022-05-25 12:09:52 -07:00
Tim Wojtulewicz
f8bc23d3e1 Propagate BPF_Program error message to script land 2022-05-25 09:41:35 -07:00
Tim Wojtulewicz
b30d5702f6 Allow pcap pktsrc to use other BPF_Program::Compile method 2022-05-25 09:41:16 -07:00
Tim Wojtulewicz
515e5bf8a3 Merge remote-tracking branch 'origin/topic/bbannier/spicy-bump'
* origin/topic/bbannier/spicy-bump:
  Bump Spicy and spicy-plugin.
  Clean up test `spicy.spicyz-jit`.
2022-05-25 09:40:26 -07:00
Tim Wojtulewicz
7c56b6923b Merge remote-tracking branch 'origin/topic/timw/2125-scriptprofile-warnings'
* origin/topic/timw/2125-scriptprofile-warnings:
  GH-2125: Fix compiler warnings in ScriptProfile
2022-05-25 09:38:30 -07:00
Tim Wojtulewicz
97e8f9d268 Merge remote-tracking branch 'origin/topic/timw/dict-debug-fixes'
* origin/topic/timw/dict-debug-fixes:
  Use ZEEK_DICT_DEBUG more in Dict.cc instead of DEBUG
2022-05-25 09:38:06 -07:00
Tim Wojtulewicz
0b1c8575cc Merge remote-tracking branch 'origin/topic/timw/avoid-needing-flex-arguments'
* origin/topic/timw/avoid-needing-flex-arguments:
  Move fuzzer setup in CMake below builtin plugin setup
  Remove flex/bison flags from CI build
  Update cmake submodule [nomail]
2022-05-25 09:37:31 -07:00
Benjamin Bannier
8672c953e1 Bump Spicy and spicy-plugin. 2022-05-25 15:01:46 +02:00
Benjamin Bannier
3b7adde599 Clean up test spicy.spicyz-jit.
This test was created from a copy of `spicy.spicyz-aot`, but updated
incompletly. This patch removes the last ahead-of-time compilation bits.
2022-05-25 15:01:46 +02:00
zeek-bot
269d3be974 Update doc submodule [nomail] [skip ci] 2022-05-25 00:39:30 +00:00
Christian Kreibich
d4ecfa0a67 Merge branch 'topic/christian/installation-dirs-in-scriptland'
* topic/christian/installation-dirs-in-scriptland:
  Add scripts.base.misc.installation btest
  Add base/misc/installation.zeek, with Zeek installation directories
  Ensure presence of Zeek-related directories in toplevel CMakeLists.txt
2022-05-24 12:12:05 -07:00
Tim Wojtulewicz
772ea5b71c GH-2125: Fix compiler warnings in ScriptProfile 2022-05-24 11:42:18 -07:00
Tim Wojtulewicz
a61bc16b10 Merge remote-tracking branch 'origin/topic/timw/dockerfile-versions'
* origin/topic/timw/dockerfile-versions:
  Add DOCKERFILE_VERSION variable to all CI dockerfiles
2022-05-23 17:47:20 -07:00
Tim Wojtulewicz
69e6554f10 Update broker submodule [nomail] 2022-05-23 14:20:01 -07:00
Christian Kreibich
04c91736a1 Add scripts.base.misc.installation btest 2022-05-23 14:16:59 -07:00
Christian Kreibich
84a09debe3 Add base/misc/installation.zeek, with Zeek installation directories
This makes several of the installation's main directories available to the
script layer.
2022-05-23 14:16:59 -07:00
Christian Kreibich
9860b5686d Ensure presence of Zeek-related directories in toplevel CMakeLists.txt
This establishes several of the Zeek installation's directories in
CMakeLists.txt, and adds a new ZEEK_STATE_DIR (via `configure --state-dir`) for
arbitrary Zeek-related variable state. It defaults to ZEEK_ROOT/var/lib.

This leaves the existing, zeekctl-related ZEEK_LOCAL_STATE_DIR unchanged and
does not use it. We'll likely deprecate it when removal of zeekctl approaches.
2022-05-23 14:16:59 -07:00
Tim Wojtulewicz
3397beabf7 Use ZEEK_DICT_DEBUG more in Dict.cc instead of DEBUG 2022-05-23 14:12:39 -07:00
Tim Wojtulewicz
d8993aac0e Move fuzzer setup in CMake below builtin plugin setup 2022-05-23 12:50:03 -07:00
Tim Wojtulewicz
6b4c565151 Remove flex/bison flags from CI build 2022-05-23 12:06:04 -07:00
Tim Wojtulewicz
6f2640a4da Update cmake submodule [nomail] 2022-05-23 11:55:01 -07:00
Tim Wojtulewicz
4f11a57159 Add DOCKERFILE_VERSION variable to all CI dockerfiles 2022-05-23 08:47:11 -07:00
zeek-bot
eeebf8a429 Update doc submodule [nomail] [skip ci] 2022-05-20 00:37:20 +00:00
Tim Wojtulewicz
73273fc87b Merge remote-tracking branch 'origin/topic/vern/ZAM-inlining'
* origin/topic/vern/ZAM-inlining:
  speed up ZAM compilation by capping function size when inlining
2022-05-19 11:45:50 -07:00
Christian Kreibich
7b43153785 Merge branch 'topic/christian/build-path-tweak'
* topic/christian/build-path-tweak:
  Zeekify the scripts.base.utils.paths test
  Expand build_path() function to handle empty dir arguments gracefully
2022-05-19 11:25:08 -07:00
Tim Wojtulewicz
48c978ae17 Merge remote-tracking branch 'origin/topic/timw/cirrus-ccache'
* origin/topic/timw/cirrus-ccache:
  Rework .cirrus.yml a bit to commonize some parts
  Enable 'greedy' mode for other CI builds
  Enable ccache for Cirrus builds
  Fix SSL tests on Centos Stream 9
2022-05-19 10:52:11 -07:00
Christian Kreibich
0641d032c3 Zeekify the scripts.base.utils.paths test 2022-05-19 09:51:36 -07:00
Christian Kreibich
9d59a48ae2 Expand build_path() function to handle empty dir arguments gracefully
When passing an empty string as a directory, the function would produce
filenames starting with a slash even when the given file_name is not an absolute
path. Defaulting to the root directory is likely never intended and might
conveivably be dangerous. The middle "/" is now skipped also if dir is an empty
string.
2022-05-19 09:45:52 -07:00
Tim Wojtulewicz
b8f745ca84 Rework .cirrus.yml a bit to commonize some parts 2022-05-19 09:21:55 -07:00