Commit graph

12680 commits

Author SHA1 Message Date
Johanna Amann
f77213ba66 Deprecation and warning fixes 2022-01-05 10:41:55 +00:00
Johanna Amann
9e5c4ae700 Clang-format updates 2022-01-05 10:28:26 +00:00
Johanna Amann
d1e7134156 Merge remote-tracking branch 'origin/master' into topic/johanna/tls12-decryption 2022-01-05 10:27:55 +00:00
Christian Kreibich
e0e779ade1 Bump the zeek-testing-cluster testsuite 2022-01-04 16:17:33 -08:00
Tim Wojtulewicz
c3839d9871 Merge remote-tracking branch 'origin/topic/timw/update-rapidjson'
* origin/topic/timw/update-rapidjson:
  Update rapidjson submodule to latest upstream master
2022-01-04 14:59:32 -07:00
Tim Wojtulewicz
b56f1ab861 Update rapidjson submodule to latest upstream master 2022-01-04 12:11:24 -07:00
Tim Wojtulewicz
e586964837 Update submodules to latest (new) release tags [skip ci] [nomail] 2022-01-04 11:49:43 -07:00
Tim Wojtulewicz
078d58e17a Update NEWS prior to 4.2 branching [skip ci] [nomail] 2022-01-04 09:42:50 -07:00
Christian Kreibich
326ea47158 Update doc submodule [nomail] [skip ci] 2022-01-03 13:00:11 -08:00
Tim Wojtulewicz
5400d789fe Merge remote-tracking branch 'origin/topic/vern/local-scope-work'
* origin/topic/vern/local-scope-work:
  added notice of deprecation to NEWS
  test suite update
  deprecation warning on use of out-of-scope local
2022-01-03 13:56:27 -07:00
Tim Wojtulewicz
a75b46bd12 Merge remote-tracking branch 'origin/topic/robin/gh1822-bittorrent-re'
* origin/topic/robin/gh1822-bittorrent-re:
  Switch BitTorrent analyzer to Zeek's regex engine
  Adding test for BitTorrent tracker.
2022-01-03 13:55:18 -07:00
Christian Kreibich
8a61a3689e Updating CHANGES, VERSION, and NEWS. 2022-01-03 12:13:07 -08:00
Vern Paxson
aee333cc62 added notice of deprecation to NEWS 2022-01-03 11:24:18 -08:00
Christian Kreibich
a52d297fca Merge branch 'topic/christian/cluster-controller-comments'
* topic/christian/cluster-controller-comments:
  Docs/comment pass over the cluster controller framework
2022-01-03 09:33:43 -08:00
Christian Kreibich
5a72864ae8 Docs/comment pass over the cluster controller framework 2022-01-03 00:31:03 -08:00
Vern Paxson
38c6c8f073 test suite update 2021-12-25 16:04:08 -08:00
Vern Paxson
9970f45ecb deprecation warning on use of out-of-scope local 2021-12-25 16:03:53 -08:00
zeek-bot
86aed8c91b Update doc submodule [nomail] [skip ci] 2021-12-23 00:38:25 +00:00
Christian Kreibich
8d38d5dc7e Update doc submodule [nomail] [skip ci] 2021-12-22 13:37:25 -08:00
Christian Kreibich
260403edd3 Merge branch 'topic/christian/cluster-controller-next'
* topic/christian/cluster-controller-next: (22 commits)
  Remove periodic pinging of controller by agents
  Move cluster controller/agent main.zeek scripts into their own modules
  Bump zeek-client
  First uses of request state timeouts
  Add expiration mechanism to client request state.
  Move get_instances_response event to using a Result record
  Track successful config deployment in cluster controller
  Bump zeek-client
  Add ClusterController::API::notify_agents_ready event
  Make all globals start with a "g_" prefix
  Add missing debug() log function to log module's API
  Add separate utility module for controller and agent
  Bump zeek-client
  Support for dropping instances no longer needed after config updates
  Additional infrastructure for printing types
  Bump zeek-client
  Support on-demand peering with agents when receiving new cluster configuration
  Expand requests support in the controller
  Whitespace tweaks in cluster controller and agent scripts
  Add Github action job for cluster tests
  ...
2021-12-22 13:29:59 -08:00
Avinal Kumar
c2cff6dac7
Switch BitTorrent analyzer to Zeek's regex engine
- Removes dependency on <regex.h>
- Replaces regex function with Zeek's standard regex functions
- Some replacements are workaround, may be improved later via an
appropiate API
- Update test baseline to fix what seems to be capturing on a bug in the
existing code.

Edit pass by Robin Sommer. Note that our test doesn't cover all the code
paths, but it does go through the one with the most substantial change.
2021-12-22 08:24:27 +01:00
Christian Kreibich
ac40d5c5b2 Remove periodic pinging of controller by agents
This changes the agent-controller communication to remove the need for ongoing
pinging of the controller by agents not actively "in service". Instead, agents
now use the notify_agent_hello event to the controller to report only their
identity. The controller puts them into service via an agent_welcome_request/
response pair, and takes them out of service via agent_standby_request/response.

This removes the on_change handler from the set of agents that is ready for
service, because not every change to this set is now a suitable time to
potentially send out the configuration. We now invoke this check explicitly in
the two situations where it's warranted: when a agent reports ready for service,
and when we've received a new configuration.
2021-12-21 16:44:04 -08:00
Christian Kreibich
8463f14a52 Move cluster controller/agent main.zeek scripts into their own modules
This has no practical relevance other than allowing the two to be loaded a the
same time, which some of our (cluster-unrelated) tests require. Absence of
namespacing would trigger symbol clashes at this point.
2021-12-21 14:52:29 -08:00
Christian Kreibich
069eb28987 Bump zeek-client 2021-12-21 14:52:29 -08:00
Christian Kreibich
30db1b3bfb First uses of request state timeouts
This now features support for the test_timeout_request/response events, as
supported by the client, and also adds a timeout event for set_configuration, in
case agents do not respond in time.

Includes corresponding zeek-client submodule bump.
2021-12-21 14:52:29 -08:00
Christian Kreibich
1e823f931e Add expiration mechanism to client request state.
This establishes a timeout controlled via ClusterController::request_timeout,
triggering a ClusterController::Request::request_expired event whenever a
timeout rolls around before request state has been finalized by a request's
normal processing.
2021-12-21 14:52:29 -08:00
Christian Kreibich
fc9679e510 Move get_instances_response event to using a Result record
Includes corresponding zeek-client bump.
2021-12-21 14:52:29 -08:00
Christian Kreibich
1461d56340 Track successful config deployment in cluster controller
This allows us to start returning deployed configurations to the client upon
request.
2021-12-21 14:52:29 -08:00
Christian Kreibich
bbe7d32529 Bump zeek-client 2021-12-21 14:52:29 -08:00
Christian Kreibich
09d9be3433 Add ClusterController::API::notify_agents_ready event
This changes the basic agent-management model to one in which the configurations
received from the client define not just the data cluster, but also set the set
of acceptable instances. Unless connectivity already exists, the controller will
establish peerings with new agents that listen, or wait for ones that connect to
the controller to check in.

Once all required agents are available, the controller triggers the new
notify_agents_ready event, an agent/controller-level "cluster-is-ready"
event. The controller also uses this event to submit a pending config update to
the now-ready instances.
2021-12-21 14:52:29 -08:00
Christian Kreibich
b57be021b7 Make all globals start with a "g_" prefix
This makes it easier to spot them in code, and is shorter than using explicit
namespacing.
2021-12-21 14:52:28 -08:00
Christian Kreibich
14a8c979c1 Add missing debug() log function to log module's API 2021-12-21 14:52:28 -08:00
Christian Kreibich
a56ee6b9a6 Add separate utility module for controller and agent
We can figure out later whether & where to re-settle helper functions that end
up in there.
2021-12-21 14:52:28 -08:00
Christian Kreibich
6fcd99b4a0 Bump zeek-client 2021-12-21 14:52:28 -08:00
Christian Kreibich
ddbd83fee4 Support for dropping instances no longer needed after config updates
This sends such expired instances empty configurations that will cause them to
shut down their remaining data cluster nodes.
2021-12-21 14:52:28 -08:00
Christian Kreibich
8eee5bb3d2 Additional infrastructure for printing types
Also added convenience for instantiating (dummy) configuration records.
2021-12-21 14:52:28 -08:00
Christian Kreibich
2395301168 Bump zeek-client 2021-12-21 14:52:28 -08:00
Christian Kreibich
5cb44c2f69 Support on-demand peering with agents when receiving new cluster configuration
Prior to this, static configuration needed to be in place to configure the
controller/agent layout. The configuration update can now include new instances
that the controller will connect to, assuming they're instances with a listening
agent.
2021-12-21 14:52:28 -08:00
Christian Kreibich
484f79f599 Expand requests support in the controller
Request records for configuration updates now store the full configuration. The
ClusterController::Request module now provies a to_string() function for
rendering requests to a string.
2021-12-21 14:52:28 -08:00
Christian Kreibich
aceb05099a Whitespace tweaks in cluster controller and agent scripts 2021-12-21 14:52:28 -08:00
Christian Kreibich
e9bdaebc70 Add Github action job for cluster tests
This job runs in sequence after the image build one, using its resulting image.
The actual tests live in the external zeek-testing-cluster testsuite, which
the new job clones and runs.

To specify a version of the testsuite to use, testing/external/ has a new
commit-hash.zeek-testing-cluster file that tracks the testsuite's relevant
commit ref
2021-12-21 14:52:28 -08:00
Christian Kreibich
2a5690fd00 Tweak Docker image configure invocation to include zeek-client
We don't yet install zeek-client by default, but need it in the image for
testing the cluster.
2021-12-21 14:52:28 -08:00
Christian Kreibich
eafa77b2b6 Add Docker image artifact storage
This enables subsequent jobs/workflows to access the generated image without use
of an image registry.
2021-12-21 14:52:28 -08:00
Robin Sommer
0507f6005c
Adding test for BitTorrent tracker.
Our test trace is extracted from https://www.cloudshark.org/captures/b9089aac6eee.

There actually seems to be a bug in the existing code: the URI passed to
bt_tracker_request() includes a partial HTTP version. This commits
includes the baseline as the current code produces it, we'll fix that in
a subsequent comment.
2021-12-21 17:48:26 +01:00
Christian Kreibich
1e60264548 Update auxil/broker submodule [nomail] [skip ci] 2021-12-20 19:33:46 -08:00
zeek-bot
e93fcd3c64 Update doc submodule [nomail] [skip ci] 2021-12-15 00:36:00 +00:00
Tim Wojtulewicz
2376fe414c Merge remote-tracking branch 'origin/topic/vern/usage-usage'
* origin/topic/vern/usage-usage:
  fixes for double-delete and reducing '?' operator with constant alternatives
  additional test suite updates for "-u" usage issues
  test suite updates for "xform" and "usage" alternatives, plus test name change
  removed unused script variable
  correct usage info for -u flag; -uu no longer supported
  fix typo in btest filename
2021-12-14 16:54:26 -07:00
Vern Paxson
06ffd97749 fixes for double-delete and reducing '?' operator with constant alternatives 2021-12-14 15:36:03 -08:00
Vern Paxson
77f6a658e6 additional test suite updates for "-u" usage issues 2021-12-14 15:35:24 -08:00
Tim Wojtulewicz
ba0a7c0fed NEWS: Fix some formatting issues 2021-12-14 14:01:27 -07:00