You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In wazuh 4.4.0 a breaking change on the config for the API settings config file: wazuh/wazuh#14119
Since v4.4.0 of this module, the wazuh_api_yaml.erb file is hardcoded to the newer format: 713f87e
This results in a broken agent when managing via puppet an older version of wazuh package:
Having a declared older version for the agent:
wazuh::agent::agent_package_version: "4.3.0"
Puppet fails trying to restart the service due to misconfiguration:
Feb 25 21:01:41 wzmanager03 systemd[1]: Starting Wazuh manager...
Feb 25 21:01:43 wzmanager03 env[159725]: Configuration not valid. ERROR: 2000 - Some parameters are not expected in the configuration file (WAZUH_PATH/api/configuration/api.yaml): Additional properties are not allowed ('upload_configuration' was unexpected).
Feb 25 21:01:43 wzmanager03 env[159725]: wazuh-apid: Configuration error. Exiting
Feb 25 21:01:43 wzmanager03 systemd[1]: wazuh-manager.service: Control process exited, code=exited, status=1/FAILURE
Feb 25 21:01:43 wzmanager03 systemd[1]: wazuh-manager.service: Failed with result 'exit-code'.
Feb 25 21:01:43 wzmanager03 systemd[1]: Failed to start Wazuh manager.```
This has not been a real issue so far because we kept using the older module version, but now we need debian12 `bookworm` support introduced only on v.4.7.2 and because of [the way this module compares](https://github.com/wazuh/wazuh-puppet/blob/master/manifests/repo.pp#L33) the `lsbtdiscodename`it means debian12 cannot use older versions of this module.
This is probably a very niche problem, since most people should already have moved from wazuh v4.3.x anyway, but it forces us to maintain a custom fork of the module just for a 2 line config change that should have been templated anyway (e.g. please allow overrides on config files or else do not hardcode breaking changes).
Needless to say, this is really wazuh's fault for introducing breaking config syntax.
I am also attaching a PR that fixes this issue in a simple manner by comparing the package version on the template and conditionally using the older or the newer format.
The text was updated successfully, but these errors were encountered:
In wazuh 4.4.0 a breaking change on the config for the API settings config file: wazuh/wazuh#14119
Since v4.4.0 of this module, the
wazuh_api_yaml.erb
file is hardcoded to the newer format: 713f87eThis results in a broken agent when managing via puppet an older version of wazuh package:
Having a declared older version for the agent:
Puppet fails trying to restart the service due to misconfiguration:
The text was updated successfully, but these errors were encountered: