-
Notifications
You must be signed in to change notification settings - Fork 5.6k
zabbix_host.present: many fixes #58604
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
zabbix_host.present: many fixes #58604
Conversation
|
Converted to Work-In-Progress, I will include the fix for #53838 to keep the state 100% Ok with the documentation. |
6e522fa to
4a691b8
Compare
4a691b8 to
29b5cd3
Compare
4c4b982 to
9f43e5b
Compare
|
I fixed the last failing tests today and will be great to have this approved before began to test and adjust the other Zabbix related states for Zabbix 5+ |
- Added visible_name to be pass to zabbix module. It was on documentation but the argument was not sent to underlying module. - Added checks before "pop" the elements "bulk" and "details" from hostinterfaces_get's response. Without that, the interface comparison didn't works with Zabbix >= 5.0 - Fixed the "inventory" comparison. It failed when there isn't a current and a new inventory. - Major rewrite of the update_interfaces routine. - Adequation to the new lint, black, isort, requirements.
- Now the zabbix_host.present accepts all host properties allowing to change the inventory mode or add a description to the created host. - Pass the "details" mandatory parameter to create SNMP hostinterfaces. The lack of this parameter prevents the host creation when any of its interfaces are SNMP.
9f43e5b to
6741403
Compare
|
@sagetherage to me it's important to have this PR merged before the code-freeze, I am using it at other projects and give maintenance to out-of-tree code isn't good. |
|
@piterpunk we have it marked for |
What does this PR do?
This PR fixes allows zabbix_host.present to:
What issues does this PR fix or reference?
Fixes #58602
Fixes #58603
Fixes #53838
Fixes #58620
Previous Behavior
Host's "Visible Name" never was configured because zabbix_host.present didn't pass the parameter visible_name to zabbix.create_host. Other additional host properties were also ignored.
Host comparison and update fails because non existent key "bulk" and a failure in inventory check.
The update_interfaces didn't really update them, it try to removes and recreates them. Usually this strategy fails, as interfaces with linked items can't be removed. Also, no SNMP interface can be created in Zabbix 5.0
New Behavior
Host's "Visible Name" is configured and additional host properties are processed. Host comparison and update runs Ok.
The update_interfaces now try to match the interface types and update them in place, then create the new ones and remove the rest.
SNMP interfaces can be created and updated seamlessly.
Merge requirements satisfied?
Commits signed with GPG?
No
Please review Salt's Contributing Guide for best practices.
See GitHub's page on GPG signing for more information about signing commits with GPG.