-
Notifications
You must be signed in to change notification settings - Fork 104
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
Breaking ipaddr or ipmath filter changes with version 2.6 #375
Breaking ipaddr or ipmath filter changes with version 2.6 #375
Comments
We just ran into the exact same issue. Reposting my commrnt from #359 (comment) here where it fits better: Also wanted to chime in and say this is a breaking change (and affected us), because the old Easy to verify by running the following task with netcommon 2.5.1 and the latest utils collection: - name: DEBUG NEW IPADDR FILTER
debug:
msg:
- 'SUBNET VAR : {{ item.subnet }}'
- 'OLD NETCOMMON FILTER : {{ item.subnet | ansible.netcommon.ipaddr("network/prefix") }}'
- 'NEW UTILS FILTER : {{ item.subnet | ansible.utils.ipaddr("network/prefix") }}'
loop:
- subnet: 1.1.1.1/32
- subnet: 10.10.10.0/24
- subnet: 192.168.0.0/23 Output looks like this:
I have pinned ansible.netcommon to 2.5.1 for now and it works around the issue. But we would need clarification on whether this is an unintended bug ( I would think so because the PR doesn't read like it was perceived as a breaking change ) or whether it is intentionally breaking and we have to update all our ansible code? |
This also has downstream effects on other collections, such as |
@jantari @ClausHolbechArista @usrme we recently moved ipaddr filters from netcommon to utils. its unintentional bug in utils collection. I am working on the fix and that we will release utils in end of march or 1st week of April. let me know if you need any information or anything from my side. For now you can use netcommon 2.5.1 as workaround. |
What did I just read? Revert! |
Fix bugs in Ipaddr filters SUMMARY ipaddr - Fix input validation issues in ipaddr,ipv4,ipv6,ipwrap filters. ipaddr - Add valid network for link-local fixes: #148 fixes: ansible-collections/ansible.netcommon#375 fixes: ansible-collections/ansible.netcommon#350 ISSUE TYPE Bugfix Pull Request COMPONENT NAME ADDITIONAL INFORMATION Reviewed-by: Nilashish Chakraborty <[email protected]> Reviewed-by: Sagar Paul <[email protected]>
Opening this bug again as we have not released netcommon #378 |
We have released utils 2.5.2 and netcommon 2.6.1 which fixed #375 and ansible-collections/ansible.utils#148 issues. For FQDN issue ansible-core team already merged ansible/ansible#77210. This fix will be available in 28th march release. which means, |
Do you folks honestly expect everyone to rewrite the thousands of existing playbooks that use the ipaddr() filter? |
SUMMARY
With the release of
ansible.netcommon
v2.6 our roles using theansible.netcommon.ipaddr
combined withansible.netcommon.ipmath
filters fail.It is not clear if it is the output of
ansible.netcommon.ipaddr
that changed, or the input validation foransible.netcommon.ipmath
.ISSUE TYPE
COMPONENT NAME
ansible.netcommon.ipmath
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
N/A
STEPS TO REPRODUCE
Simple playbook to only
EXPECTED RESULTS
Testing with
ansible.netcommon
v.2.5.1:ACTUAL RESULTS
Fatal error during play
The text was updated successfully, but these errors were encountered: