[master] FIX #61578 Zabbix Host Fixes for 5.4#64879
[master] FIX #61578 Zabbix Host Fixes for 5.4#64879msch-io wants to merge 1 commit intosaltstack:masterfrom
Conversation
…to Zabbix API with version 5.4
|
Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. |
|
@msch-io thanks for much for the PR. For the zabbix modules we have started moving this out into a Salt extension that will ultimately be community managed. Would you mind applying your changes to that repo? Thanks! |
|
This module and its associated states and tests have been transitioned to community support and are no longer maintained by the Salt Core team. The code has been removed from the Salt code-base and can be found in this repository: https://github.com/salt-extensions/community-extensions-holding/ There is currently discussion and work being done on the salt-extensions Discord channel (https://discordapp.com/channels/1200072194781368340/1208165123240370197) to document and build the infrastructure for community-supported salt extensions. There is also a Salt-Extensions Working Group that takes place on the 1st and 3rd Thursday of every month to coordinate salt-extension efforts. |
What does this PR do?
The Salt state zabbix_host manages hosts in Zabbix using the Zabbix API. Changes to the Zabbix API in version 5.4 lead to a bug for the state module. Even though there was no change either to the configuration or the the host in Zabbix Salt updates the host every time.
The state is checking for differences between the current and the desired state of a host. A host in Zabbix also contains information about different interfaces. In Zabbix 5.4 new fields were added to the hostinterface object. These are read-only fields which reflect information about the status of the interface. These information are not relevant for the configuration state of the host.
I added code to ensure that these fields get removed if they exists before the comparison takes place. Otherwise a difference between the current and the desired state will be assumed. I also updated the unit test so that this information is included. This change should be backwards compatible. I also added a test for not updating a host which already is in the desired state which does not have the new fields included.
Further information to the changes on Zabbix side can be found here:
tl;dr
Remove new read-only fields from hostinterface objects, which were added in Zabbix version 5.4
These cause Salt to update the host each and every time, even if there is no difference between the desired and actual state of the host.
What issues does this PR fix or reference?
Fixes: #61578
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
Commits signed with GPG?
Yes
Please review Salt's Contributing Guide for best practices.
See GitHub's page on GPG signing for more information about signing commits with GPG.