Skip to content
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

fixed zbx_host idempotency with multiple host interfaces of the same … #391

Merged
merged 2 commits into from
Jun 3, 2021

Conversation

D3DeFi
Copy link
Contributor

@D3DeFi D3DeFi commented May 29, 2021

…type

SUMMARY

Fixes #389

It seems that loop where we compare existing interfaces to user-provided interfaces is checking each existing interface to ALL user-provided interfaces. Even the ones that are already matched are compared.

Additionally, if match is found, loop continues onward to next interface where it will detect difference, because it always compares interfaces that should not match.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

plugins/modules/zabbix_host.py
tests/integration/targets/test_zabbix_host/

ADDITIONAL INFORMATION

All versions should be affected by this

@D3DeFi D3DeFi added bug Something isn't working module The issue or pull request is related to Zabbix module labels May 29, 2021
@codecov
Copy link

codecov bot commented May 29, 2021

Codecov Report

Merging #391 (c1fe8d1) into main (d47718d) will decrease coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #391      +/-   ##
==========================================
- Coverage   76.71%   76.68%   -0.03%     
==========================================
  Files          21       21              
  Lines        2933     2938       +5     
  Branches      752      753       +1     
==========================================
+ Hits         2250     2253       +3     
  Misses        451      451              
- Partials      232      234       +2     
Impacted Files Coverage Δ
...ns/community/zabbix/plugins/modules/zabbix_host.py 83.33% <0.00%> (-0.25%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fd235ef...c1fe8d1. Read the comment docs.

@D3DeFi
Copy link
Contributor Author

D3DeFi commented May 31, 2021

@sky-joker can you please give this a brief look?

Copy link
Contributor

@sky-joker sky-joker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @D3DeFi for the patch!
LGTM 👍

@sky-joker sky-joker merged commit 9c4fdc3 into ansible-collections:main Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working module The issue or pull request is related to Zabbix module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

zabbix_host is not idempotent when called with two or more interfaces
2 participants