I was following the product documentation "https://docs.openstack.org/nova/2023.1/install/verify.html" after the nova installation is complete on my controller and compute node Iam seeing the " no such table: cell_mappings" while verifying the installation executing the command "nova-status upgrade check".
~# nova-status upgrade check
Modules with known eventlet monkey patching issues were imported prior to eventlet monkey patching: urllib3. This warning can usually be ignored if the caller is only importing and not executing nova code.
Error:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1802, in _execute_context
self.dialect.do_execute(
File "/usr/lib/python3/dist-packages/sqlalchemy/engine/default.py", line 732, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: no such table: cell_mappings
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/nova/cmd/status.py", line 341, in main
ret = fn(*fn_args, **fn_kwargs)
File "/usr/lib/python3/dist-packages/oslo_upgradecheck/upgradecheck.py", line 105, in check
result = func(self)
File "/usr/lib/python3/dist-packages/nova/cmd/status.py", line 113, in _check_cellsv2
cell_mappings = self._get_cell_mappings()
File "/usr/lib/python3/dist-packages/nova/cmd/status.py", line 220, in _get_cell_mappings
cell_mappings = cell_mapping_obj.CellMappingList.get_all(ctxt)
File "/usr/lib/python3/dist-packages/oslo_versionedobjects/base.py", line 184, in wrapper
result = fn(cls, context, *args, **kwargs)
File "/usr/lib/python3/dist-packages/nova/objects/cell_mapping.py", line 256, in get_all
db_mappings = cls._get_all_from_db(context)
File "/usr/lib/python3/dist-packages/oslo_db/sqlalchemy/enginefacade.py", line 1010, in wrapper
return fn(*args, **kwargs)
File "/usr/lib/python3/dist-packages/nova/objects/cell_mapping.py", line 252, in _get_all_from_db
expression.asc(api_db_models.CellMapping.id)).all()
File "/usr/lib/python3/dist-packages/sqlalchemy/orm/query.py", line 2759, in all
return self._iter().all()
File "/usr/lib/python3/dist-packages/sqlalchemy/orm/query.py", line 2894, in _iter
result = self.session.execute(
File "/usr/lib/python3/dist-packages/sqlalchemy/orm/session.py", line 1692, in execute
result = conn._execute_20(statement, params or {}, execution_options)
File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1614, in _execute_20
return meth(self, args_10style, kwargs_10style, execution_options)
File "/usr/lib/python3/dist-packages/sqlalchemy/sql/elements.py", line 325, in _execute_on_connection
return connection._execute_clauseelement(
File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1481, in _execute_clauseelement
ret = self._execute_context(
File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1845, in _execute_context
self._handle_dbapi_exception(
File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 2024, in _handle_dbapi_exception
util.raise_(newraise, with_traceback=exc_info[2], from_=e)
File "/usr/lib/python3/dist-packages/sqlalchemy/util/compat.py", line 207, in raise_
raise exception
File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1802, in _execute_context
self.dialect.do_execute(
File "/usr/lib/python3/dist-packages/sqlalchemy/engine/default.py", line 732, in do_execute
cursor.execute(statement, parameters)
oslo_db.exception.DBNonExistentTable: (sqlite3.OperationalError) no such table: cell_mappings
[SQL: SELECT cell_mappings.created_at AS cell_mappings_created_at, cell_mappings.updated_at AS cell_mappings_updated_at, cell_mappings.id AS cell_mappings_id, cell_mappings.uuid AS cell_mappings_uuid, cell_mappings.name AS cell_mappings_name, cell_mappings.transport_url AS cell_mappings_transport_url, cell_mappings.database_connection AS cell_mappings_database_connection, cell_mappings.disabled AS cell_mappings_disabled
FROM cell_mappings ORDER BY cell_mappings.id ASC]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
But when I execute the with su command its wokring.
:~# su -s /bin/sh -c "nova-status upgrade check" nova
Modules with known eventlet monkey patching issues were imported prior to eventlet monkey patching: urllib3. This warning can usually be ignored if the caller is only importing and not executing nova code.
+-------------------------------------------+
| Upgrade Check Results |
+-------------------------------------------+
| Check: Cells v2 |
| Result: Success |
| Details: None |
+-------------------------------------------+
| Check: Placement API |
| Result: Success |
| Details: None |
+-------------------------------------------+
| Check: Cinder API |
| Result: Success |
| Details: None |
+-------------------------------------------+
| Check: Policy File JSON to YAML Migration |
| Result: Success |
| Details: None |
+-------------------------------------------+
| Check: Older than N-1 computes |
| Result: Success |
| Details: None |
+-------------------------------------------+
| Check: hw_machine_type unset |
| Result: Success |
| Details: None |
+-------------------------------------------+
| Check: Service User Token Configuration |
| Result: Success |
| Details: None |
+-------------------------------------------+
Not sure if it's really an issue or not. I am installing OpenStack zed on Ubuntu 22.04 jammy.
I referred to bug https://bugs.launchpad.net/nova/+bug/1781573 but its resolved in the zed release.Not sure if its the same or diffn