Comment 7 for bug 1831315

Revision history for this message
Harald Jensås (harald-jensas) wrote : Re: Udercloud IPv6 - ValueError: invalid literal for int() with base 10: '3456:789a:1::3' - db connection URI gets its brackets eaten

So, I got into the container and tried running the nova-manage command manually.
The same error happens.

afaict the config is good:
bash-4.2$ grep '3456:789a:1::3' /etc/nova/nova.conf
connection=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
connection=mysql+pymysql://nova:LP1VoffTn36gPLU8tz67YYEV8@[fd12:3456:789a:1::3]/nova?read_default_group=tripleo&read_default_file=/etc/my.cnf.d/tripleo.cnf
api_servers=http://[fd12:3456:789a:1::3]:9292
auth_url=http://[fd12:3456:789a:1::3]:5000
api_endpoint=http://[fd12:3456:789a:1::3]:6385/v1
www_authenticate_uri=http://[fd12:3456:789a:1::3]:5000
auth_uri=http://[fd12:3456:789a:1::3]:5000
auth_url=http://[fd12:3456:789a:1::3]:35357
url=http://[fd12:3456:789a:1::3]:9696
auth_url=http://[fd12:3456:789a:1::3]:5000/v3
auth_url=http://[fd12:3456:789a:1::3]:5000

bash-4.2$ /usr/bin/nova-manage cell_v2 discover_hosts --by-service --verbose
Found 2 cell mappings.
Skipping cell0 since it does not contain hosts.
Getting computes from cell 'default': 4165e8f0-6bbc-4b61-86c7-208ba08f0589
An error has occurred:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/nova/cmd/manage.py", line 2212, in main
    ret = fn(*fn_args, **fn_kwargs)
  File "/usr/lib/python2.7/site-packages/nova/cmd/manage.py", line 1303, in discover_hosts
    by_service)
  File "/usr/lib/python2.7/site-packages/nova/objects/host_mapping.py", line 265, in discover_hosts
    by_service)
  File "/usr/lib/python2.7/site-packages/nova/objects/host_mapping.py", line 221, in _check_and_create_host_mappings
    ctxt, 'nova-compute', include_disabled=True)
  File "/usr/lib/python2.7/site-packages/oslo_versionedobjects/base.py", line 184, in wrapper
    result = fn(cls, context, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/nova/objects/service.py", line 591, in get_by_binary
    context, binary, include_disabled=include_disabled)
  File "/usr/lib/python2.7/site-packages/nova/db/api.py", line 145, in service_get_all_by_binary
    include_disabled=include_disabled)
  File "/usr/lib/python2.7/site-packages/nova/db/sqlalchemy/api.py", line 228, in wrapped
    with ctxt_mgr.reader.using(context):
  File "/usr/lib64/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py", line 1064, in _transaction_scope
    context=context) as resource:
  File "/usr/lib64/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py", line 659, in _session
    bind=self.connection, mode=self.mode)
  File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py", line 418, in _create_session
    self._start()
  File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py", line 510, in _start
    engine_args, maker_args)
  File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py", line 534, in _setup_for_connection
    sql_connection=sql_connection, **engine_kwargs)
  File "/usr/lib/python2.7/site-packages/debtcollector/renames.py", line 43, in decorator
    return wrapped(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/engines.py", line 153, in create_engine
    url = sqlalchemy.engine.url.make_url(sql_connection)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/url.py", line 225, in make_url
    return _parse_rfc1738_args(name_or_url)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/url.py", line 284, in _parse_rfc1738_args
    return URL(name, **components)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/url.py", line 71, in __init__
    self.port = int(port)
ValueError: invalid literal for int() with base 10: '3456:789a:1::3'