Bug 1299855
Summary: | Glance client error using IPv6 - ValueError: invalid literal for int() with base 10: 'fd00' | |||
---|---|---|---|---|
Product: | Red Hat OpenStack | Reporter: | Attila Darazs <adarazs> | |
Component: | openstack-tripleo-heat-templates | Assignee: | Erno Kuvaja <ekuvaja> | |
Status: | CLOSED NOTABUG | QA Contact: | Attila Darazs <adarazs> | |
Severity: | urgent | Docs Contact: | ||
Priority: | high | |||
Version: | 7.0 (Kilo) | CC: | adarazs, cschwede, cyril, eglynn, fpercoco, jcoufal, jpena, jruzicka, jschluet, mburns, pgrist, rhel-osp-director-maint, scohen, srevivo | |
Target Milestone: | --- | Keywords: | Automation | |
Target Release: | 11.0 (Ocata) | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | Bug Fix | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1299953 (view as bug list) | Environment: | ||
Last Closed: | 2017-02-09 22:48:33 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1299953, 1312983 |
Description
Attila Darazs
2016-01-19 12:20:35 UTC
Using the latest upstream master of python-glanceclient (https://github.com/openstack/python-glanceclient) both the image-list and image-create worked, so the problem is definitely in the old glanceclient. The code failing is in `glance/common/client.py` which is not glanceclient. It's an old http client used to talk to the registry service. Therefore, the communication between glance-api and glance-registry doesn't support IPv6. Cyril, I think this could be tackled with a lite spec upstream in the Mitaka timeframe. Could you please write one? FWIW, I have a manually set up environment running on IPv6, and glanceclient works fine for me in this case. Could it be a configuration issue? In terms of packages, the only difference is that I have python-glanceclient-0.17.3-1.el7ost.noarch vs python-glanceclient-0.17.3-2.el7ost.noarch in the report. I took a look at the environment and it seems to be a config issue. The registry_host, unlike the bind_host has to be a valid, parsable, ipv6 as it's a string read by glance-api to talk to glance registry. The value in the environment was missing the `[]` which are required by ipv6. Changing it to the one below seemed to have fixed the issue: registry_host=[fd00:fd00:fd00:2000:f816:3eff:fedb:a219] I can confirm Flavio's analysis (shared by Mike): >>> pr = urlparse("http://2001:db8:fd00:1000:f816:3eff:fe1d:2f22:5000") >>> pr.port Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/urlparse.py", line 113, in port port = int(port, 10) ValueError: invalid literal for int() with base 10: 'db8' >>> pr = urlparse("http://[2001:db8:fd00:1000:f816:3eff:fe1d:2f22]:5000") >>> pr.port 5000 Also, RFC 2732 (http://www.ietf.org/rfc/rfc2732.txt) states that 'to use a literal IPv6 address in a URL, the literal address should be enclosed in "[" and "]" characters.' This bug did not make the OSP 8.0 release. It is being deferred to OSP 10. This one is coming over late and moving to OSP11 as something we should fix soon. If this in progress or could be done sooner let's bring it back sooner, but not sure IPV6 is common enough to not leave this as something to work around for now. Attila, Can you confirm that this is still reproduces on OSP10? Sean Based on #c5 and #c6, closing this out as not a bug, please re-open if that's not the case or the issue persists without the []. I missed this one... clearing the needinfo. Not an issue any more. |