Comment 4 for bug 1831315

Revision history for this message
Mike Bayer (zzzeek) wrote : Re: Udercloud IPv6 - ValueError: invalid literal for int() with base 10: '3456:789a:1::3'

something is eating the brackets before it gets to SQLAlchemy:

>>> from sqlalchemy.engine import url

# with brackets, happy
>>> url.make_url("mysql+pymysql://nova_api:LP1VoffTn36gPLU8tz67YYEV8@[fd12:3456:789a:1::3]/nova_api?read_default_group=tripleo&read_default_file=/etc/my.cnf.d/tripleo.cnf")
mysql+pymysql://nova_api:***@[fd12:3456:789a:1::3]/nova_api?read_default_file=/etc/my.cnf.d/tripleo.cnf&read_default_group=tripleo

# take the two brackets out, identical error

>>> url.make_url("mysql+pymysql://nova_api:LP1VoffTn36gPLU8tz67YYEV8@fd12:3456:789a:1::3/nova_api?read_default_group=tripleo&read_default_file=/etc/my.cnf.d/tripleo.cnf")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/classic/dev/sqlalchemy/lib/sqlalchemy/engine/url.py", line 229, in make_url
    return _parse_rfc1738_args(name_or_url)
  File "/home/classic/dev/sqlalchemy/lib/sqlalchemy/engine/url.py", line 288, in _parse_rfc1738_args
    return URL(name, **components)
  File "/home/classic/dev/sqlalchemy/lib/sqlalchemy/engine/url.py", line 71, in __init__
    self.port = int(port)
ValueError: invalid literal for int() with base 10: '3456:789a:1::3'