-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request group hashes recalculation in Agent-groups send full
cluster task
#23432
Comments
Issue UpdateThe methods suggested in the issue's description were modified to recalculate the group hashes. The following scenarios were reproduced to manually test the changes: Newly added workerAdded a new worker to a cluster with a master and a single worker. The worker requires a full New worker logs
Master logs
Manually setting the
|
Note
The branch fix/23422-groups-hash (#23422 (comment)) should be used as the base branch.
Description
We found the reason (at least, one of the reasons) behind the constant triggering of the
Agent-groups send full
task that was happening in some environments:As explained in #23422, if the
group_hash
column of any of the agents becomes empty after any problem during group assignment, the global group hash would never be correct. This made the global hash of master and worker different all the time, creating the infiniteAgent-groups send full
loop:The only way to recalculate the hash for the affected agent(s) was to modify (assign or unassign) a group, but the core team is now adding a new wazuh-db command to force recalculating said hash:
To do
We need to modify the
Agent-groups send/recv full
task in both the master and the workers so that during its execution, the command to recalculate the groups hash (global recalculate-agent-group-hashes
) is sent to wazuh-db.The full sync task does not use or compare hashes. However, as it is intended to run only exceptionally when the master-worker hashes have been different 5 times in a row, it is the best place to recalculate such information.
AsyncWazuhDBConnection().run_wdb_command
can be used to send the command.Checks
The following elements have been updated or reviewed (should also be checked if no modification is required):
api/test/integration/mapping/_test_mapping.py
).The text was updated successfully, but these errors were encountered: