uri module fails when url contains some IPv6 addresses #56258
Labels
affects_2.7
This issue/PR affects Ansible v2.7
bug
This issue/PR relates to a bug.
has_pr
This issue has an associated PR.
module
This issue/PR relates to a module.
net_tools
Net-tools category
python3
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
traceback
This issue/PR includes a traceback.
SUMMARY
With some IPv6 addresses the uri module (and probably others too) will fail with this error:
"msg": "invalid literal for int() with base 10: '16d8:0:7::205]:80'"
It doesn't fail with all IPv6 addresses, for example these works:
2a00:1450:400f:808::200e (ipv6.google.com)
2a03:2880:f10a:83:face:b00c::25de (facebook.com)
But this IPv6 address consistently fails: 2a00:16d8:0:7::205
In addition to version 2.7.10 mentioned below I've tested on 2.6.3 and 2.8.0a1.post0 as well with identical results.
ISSUE TYPE
COMPONENT NAME
uri
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
I'm running Mac OS X Mojave (10.14) with ansible installed via homebrew (2.7.10) and pip in virtualenv for 2.8.0a1.post0.
STEPS TO REPRODUCE
EXPECTED RESULTS
I would have expected the uri module to properly parse the IPv6 address and carry out the GET request, as would happen with for example any IPv4 address.
ACTUAL RESULTS
The module failed with the following error message which hints it failed to properly parse the URL:
"msg": "invalid literal for int() with base 10: '16d8:0:7::205]:80'"
The text was updated successfully, but these errors were encountered: