Ask Your Question
0

When I install ocata, when I install nova, I get error:NoSuchTableError: `compute_nodes`

asked 2017-12-07 00:13:58 -0600

liaodalin19903 gravatar image

When I sync db:

[root@controller ~]# su -s /bin/sh -c "nova-manage api_db sync" nova
[root@controller ~]# su -s /bin/sh -c "nova-manage db sync" nova
WARNING: cell0 mapping not found - not syncing cell0.
/usr/lib/python2.7/site-packages/pymysql/cursors.py:166: Warning: (1831, u"Duplicate index 'block_device_mapping_instance_uuid_virtual_name_device_name_idx' defined on the table 'nova.block_device_mapping'. This is deprecated and will be disallowed in a future release.")
  result = self._query(query)
/usr/lib/python2.7/site-packages/pymysql/cursors.py:166: Warning: (1831, u"Duplicate index 'uniq_instances0uuid' defined on the table 'nova.instances'. This is deprecated and will be disallowed in a future release.")
  result = self._query(query)

I use nova-status upgrade check get bellow error:

 [root@controller ~]# 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 ...
(more)
edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2017-12-08 21:29:48 -0600

Bernd Bausch gravatar image

The command nova-manage api_db sync should have created a table cell_mappings in the nova_api database and populated it with Cell 0. Since it didn't do it, I wonder if you have a version mismatch somewhere. I am not sure to what extent nova-manage logs what it does, but it would certainly be worthwhile checking the Nova logs.

You can confirm that there is or is not a cell mapping by entering MySQL, then:

mysql> use nova_api
mysql> show tables;
+------------------------------+
| Tables_in_nova_api           |
+------------------------------+
(...)
| cell_mappings                |
mysql> select * from cell_mappings;
+---------------------+------------+----+--------------------------------------+-------+------------------------------------------------------------+-----------------------------------------------------------------+
| created_at          | updated_at | id | uuid                                 | name  | transport_url                                              | database_connection                                             |
+---------------------+------------+----+--------------------------------------+-------+------------------------------------------------------------+-----------------------------------------------------------------+
| 2017-11-30 22:35:05 | NULL       |  1 | 00000000-0000-0000-0000-000000000000 | cell0 | none:///                                                   | mysql+pymysql://root:password@127.0.0.1/nova_cell0?charset=utf8 |
| 2017-11-30 22:35:39 | NULL       |  2 | 0d6598b2-9cf2-4e29-96a7-f5f85904a7c4 | cell1 | rabbit://stackrabbit:password@192.168.5.10:5672/nova_cell1 | mysql+pymysql://root:password@127.0.0.1/nova_cell1?charset=utf8 |
+---------------------+------------+----+--------------------------------------+-------+------------------------------------------------------------+-----------------------------------------------------------------+

Cell 0 should appear in that list.

edit flag offensive delete link more
0

answered 2017-12-07 15:25:51 -0600

timi gravatar image

probably you missed one or more steps from nova nova instalation, follow the guide at https://docs.openstack.org/ocata/inst... if you run it on Ubuntu

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2017-12-07 00:13:58 -0600

Seen: 19 times

Last updated: Dec 08