-
Notifications
You must be signed in to change notification settings - Fork 284
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_agent- Reworked Include logic similar to the Alias logic #1335
zabbix_agent- Reworked Include logic similar to the Alias logic #1335
Conversation
Please add a change fragment to this. |
@Thulium-Drake check out the testing failures |
8429f09
to
72e57d5
Compare
I've moved adding the Also, it doesn't really make sense to use anything else then |
Can you please add tests to molecule to cover this "use case"? |
Oh actually tests are failing, please take a look. |
77d912e
to
8c9e34f
Compare
Well I missed ensuring permissions for all included dirs on agent2 :-) and by fixing that, I also fixed the tests |
8c9e34f
to
2bdd5ca
Compare
2bdd5ca
to
116f5e3
Compare
…ent_include_dir is not a list
We still have a problem with the definition of |
@Thulium-Drake can you please add molecule tests for this case so the problem is obvious before your fix and it's gone with your code? |
I looked at the test that failed, it checks if the ownership of all mentioned
I've changed the docker_include_dir to a new variable, which will be set in the If it's a single dir, include that. If it's a list, mount the first directory on the list, as it doesn't really make sense to scatter all Zabbix config files around and keep them in subdirs in |
The errors don't seem related, they are all Galaxy errors |
I am sorry I don't get it. What benefits does this PR bring? What is the actual bug it is fixing? @pyrodie18 do you know? |
The fact that role breaks agent2's include mechanism, I first made a different solution. Then @pyrodie18 suggested to re-implement that using similar logic as used for adding host |
Ok, can you add to molecule tests that we see it is broken and after your code changes it is fixed? |
Well the problem is, it doesn't result into any errors in the Zabbix agent, but it does not include recursively. So it's not broken because it's spitting errors, it's broken by no longer including configuration files for, among others, I don't know to to make a test for that, because agent2 doesn't care if you not include the |
So we need this fix to include lets say all the files in |
Yes, even though they don't mention it explicitly in the docs (https://www.zabbix.com/documentation/current/en/manual/appendix/config/special_notes_include) it will only match on files in the included dirs.. |
The same story with zabbix-agent (the first version)? |
OOTB, no, because agent (1) does not have plugins, but that depends on the user, if they have their own include setup, it might be something they use. Though I'd say unlikely (but that's from my own experience) |
Ok, thanks a lot for contributing and your explanation! I am fine with this PR. @pyrodie18 please approve too as you deal with roles more that I do -) |
Thanks for the addition |
SUMMARY
Reworks the 'Include' logic to work in the same manner as 'Alias'.
Also updates the included paths for Zabbix Agent2 to include the plugins.d directory.
ISSUE TYPE
COMPONENT NAME
zabbix_agent
ADDITIONAL INFORMATION