Skip to content

Comments

[master] FIX #61578 Zabbix Host Fixes for 5.4#64879

Closed
msch-io wants to merge 1 commit intosaltstack:masterfrom
msch-io:zabbix_host
Closed

[master] FIX #61578 Zabbix Host Fixes for 5.4#64879
msch-io wants to merge 1 commit intosaltstack:masterfrom
msch-io:zabbix_host

Conversation

@msch-io
Copy link

@msch-io msch-io commented Jul 29, 2023

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.

@msch-io msch-io requested a review from a team as a code owner July 29, 2023 19:43
@msch-io msch-io requested review from cmcmarrow and removed request for a team July 29, 2023 19:43
@welcome
Copy link

welcome bot commented Jul 29, 2023

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.
Please be sure to review our Code of Conduct. Also, check out some of our community resources including:

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.
If you have additional questions, email us at saltproject@vmware.com. We’re glad you’ve joined our community and look forward to doing awesome things with you!

@salt-project-bot-prod-environment salt-project-bot-prod-environment bot changed the title FIX #61578 Zabbix Host Fixes for 5.4 [master] FIX #61578 Zabbix Host Fixes for 5.4 Jul 29, 2023
@garethgreenaway
Copy link
Contributor

@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!
https://github.com/salt-extensions/saltext-zabbix

@dwoz dwoz added this to the Argon v3008.0 milestone Dec 18, 2023
@dwoz dwoz requested a review from a team as a code owner March 16, 2025 22:09
@twangboy
Copy link
Contributor

twangboy commented Apr 2, 2025

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.

@twangboy twangboy closed this Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] zabbix_host.present reports "updated" every time

4 participants