-
Notifications
You must be signed in to change notification settings - Fork 330
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
IPv6 address parsed as IPv4 #1561
Comments
@barnabas-kurdi Judging from your error, it is caused by the mismatch between the IP address and port you specified( httpx.InvalidURL: Invalid port: 'BBBB::'). Could you please check it again? Thank you! |
@barnabas-kurdi And I think this problem should not be problem of azure - azcollection this repo, and should be the problem of ansible this platform, it should be in "https://github.com/ansible/ansible/issues" |
@Fred-sun Thank you for your response! The thing is, I specified no address when invoking the module whatsoever, so I am not sure where and why the address is pulled from (I'm thinking the modules are using it in the API requests sent to Azure?). The ansible.builtin.uri module (and other builtin modules) works perfectly when using the EE I built, this is why I assumed that this is not a general ansible platform problem, but an issue with the azcollection in particular. I get the same error when using any module from the collection, no matter what module arguments I try. |
@barnabas-kurdi I will recheck it. thank you! |
@Fred-sun I have resolved the issue: turns out the problem was not with a dual stack address, but an ipv6 address set in the no_proxy environment variable. no_proxy=...,AAAA:BBBB::/48,... Once I unset the variable for the module invocation, it was working fine. I have found this same issue in the httpx repo, however it seems to have been solved in a pull request in 2023 (encode/httpx#2659) and the azure collection is using the newest version of httpx, so I am not sure what gives. It might be worth some time investment to figure out what might be causing the issue, since its source is not immediately apparent. |
@barnabas-kurdi Thank you for your feedback, we will investigate and find out the cause and fix it. Thank you! |
SUMMARY
Local dual IPv6/IPv4 address seems to be parsed as IPv4 when using any module in the Azure collection (by Graph's request adapter). I was able to replicate the issue with multiple modules. I am not sure what the IP is used for in this case in the first place.
ISSUE TYPE
COMPONENT NAME
All modules in the collection seem to be affected.
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
The Red Hat Universal Base Image 9 is in use, EE built by ansible-builder, no specific network settings.
STEPS TO REPRODUCE
I tried running the module with and without the proxy, it made no difference. I also tried changing the module arguments, that made no difference whatsoever either. Any module seems to produce a similar error.
EXPECTED RESULTS
I would except the module to be able to parse the dual address.
ACTUAL RESULTS
In the output below 'BBBB' represents part of the local dual IPv4/IPv6 address (AAAA:BBBB:CCCC:DDDD:xxxx:xxxx:xxxx:xxxx).
The text was updated successfully, but these errors were encountered: