Comment 5 for bug 1709594

Revision history for this message
Jianghua Wang (wjh-fresh) wrote : Re: live-migration without '--block-migrate" failed with "No sql_connection parameter is established"

I tried to print the stack in enginefacade.py.
Checking source code:
  https://github.com/openstack/oslo.db/blob/master/oslo_db/sqlalchemy/enginefacade.py#L471
  conf.register_opts(options.database_opts, 'database')

It seems will try to get the connection from settings database/connection; but not api_database/connection. Is this wrong by considering the Aggregates were migrated to API database?

See the following stack

  File "/opt/stack/nova/nova/objects/aggregate.py", line 541, in get_by_host
    _get_by_host_from_db(context, host, key=key)]
  File "/usr/local/lib/python2.7/dist-packages/oslo_db/sqlalchemy/enginefacade.py", line 992, in wrapper
    with self._transaction_scope(context):
  File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File "/usr/local/lib/python2.7/dist-packages/oslo_db/sqlalchemy/enginefacade.py", line 1042, in _transaction_scope
    context=context) as resource:
  File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File "/usr/local/lib/python2.7/dist-packages/oslo_db/sqlalchemy/enginefacade.py", line 647, in _session
    bind=self.connection, mode=self.mode)
  File "/usr/local/lib/python2.7/dist-packages/oslo_db/sqlalchemy/enginefacade.py", line 402, in _create_session
    self._start()
  File "/usr/local/lib/python2.7/dist-packages/oslo_db/sqlalchemy/enginefacade.py", line 477, in _start
    traceback.print_stack(file=f)
conf is not None: conf=<oslo_config.cfg.ConfigOpts object at 0x7f279c064950>

url_args={'connection': None, 'slave_connection': None}