NoSuchTableError: `compute_nodes`

asked 2017-08-30 04:01:02 -0500

liaodalin19903 gravatar image

updated 2017-08-30 23:42:37 -0500

When I install the openstack-ocata in controller node, then i use nova-status upgrade check command to check,

and I get the bellow error:

 [root@controller keystone]# nova-status upgrade check
Error:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/nova/cmd/status.py", line 455, in main
    ret = fn(*fn_args, **fn_kwargs)
  File "/usr/lib/python2.7/site-packages/nova/cmd/status.py", line 385, in check
    result = func(self)
  File "/usr/lib/python2.7/site-packages/nova/cmd/status.py", line 291, in _check_resource_providers
    num_computes += self._count_compute_nodes(ctxt)
  File "/usr/lib/python2.7/site-packages/nova/cmd/status.py", line 117, in _count_compute_nodes
    compute_nodes = Table('compute_nodes', meta, autoload=True)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/schema.py", line 416, in __new__
    metadata._remove_table(name, schema)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 60, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/schema.py", line 411, in __new__
    table._init(name, metadata, *args, **kw)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/schema.py", line 484, in _init
    self._autoload(metadata, autoload_with, include_columns)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/schema.py", line 508, in _autoload
    self, include_columns, exclude_columns
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1972, in run_callable
    return conn.run_callable(callable_, *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1477, in run_callable
    return callable_(self, *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/default.py", line 364, in reflecttable
    return insp.reflecttable(table, include_columns, exclude_columns)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/reflection.py", line 547, in reflecttable
    table_name, schema, **table.dialect_kwargs)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/reflection.py", line 312, in get_table_options
    info_cache=self.info_cache, **kw)
  File "<string>", line 2, in get_table_options
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/reflection.py", line 54, in cache
    ret = fn(self, con, *args, **kw)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/dialects/mysql/base.py", line 2689, in get_table_options
    connection, table_name, schema, **kw)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/dialects/mysql/base.py", line 2811, in _parsed_state_or_create
    info_cache=kw.get('info_cache', None)
  File "<string>", line 2, in _setup_parser
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/reflection.py", line 54, in cache
    ret = fn(self, con, *args, **kw)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/dialects/mysql/base.py", line 2836, in _setup_parser
    full_name=full_name)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/dialects/mysql/base.py", line 2924, in _show_create_table
    raise exc.NoSuchTableError(full_name)
NoSuchTableError: `compute_nodes`

EDIT-1

Attention, I set the controller and compute node in one node.

I created three nova related databases:

CREATE DATABASE nova;
CREATE DATABASE nova_api;
CREATE DATABASE nova_cell0;
edit retag flag offensive close merge delete

Comments

did you create nova, nova_api and cell databases?

nubber gravatar imagenubber ( 2017-08-30 21:10:15 -0500 )edit

@nubber Yes, I have created them.

liaodalin19903 gravatar imageliaodalin19903 ( 2017-08-30 22:35:52 -0500 )edit

compute_nodes is a table in the nova database. You may need to create/populate it with: nova db sync nova-manage cell_v2 simple_cell_setup

jep gravatar imagejep ( 2017-09-01 10:13:23 -0500 )edit