osism / issues

This repository is used for bug reports that are cross-project or not bound to a specific repository (or to an unknown repository).
https://www.osism.tech
1 stars 1 forks source link

keystone: AttributeError: 'NoneType' object has no attribute 'getcurrent' #914

Closed berendt closed 3 months ago

berendt commented 8 months ago
(keystone)[root@testbed-node-0 /]# keystone-manage db_sync
2024-03-13 19:39:22.416 2752 DEBUG oslo_db.sqlalchemy.engines [-] MySQL server mode set to STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION _check_effective_sql_mode /var/lib/kolla/venv/lib/python3.10/site-packages/oslo_db/sqlalchemy/engines.py:342
2024-03-13 19:39:22.424 2752 INFO alembic.runtime.migration [-] Context impl MySQLImpl.
2024-03-13 19:39:22.424 2752 INFO alembic.runtime.migration [-] Will assume non-transactional DDL.
Exception ignored in: <function _removeHandlerRef at 0x7a8554608ca0>
Traceback (most recent call last):
  File "/usr/lib/python3.10/logging/__init__.py", line 846, in _removeHandlerRef
  File "/usr/lib/python3.10/logging/__init__.py", line 226, in _acquireLock
  File "/usr/lib/python3.10/threading.py", line 164, in acquire
  File "/var/lib/kolla/venv/lib/python3.10/site-packages/eventlet/green/thread.py", line 34, in get_ident
AttributeError: 'NoneType' object has no attribute 'getcurrent'
berendt commented 8 months ago

Related upstream issue: https://bugs.launchpad.net/keystone/+bug/2042744

berendt commented 8 months ago

Hotfix:

(keystone)[root@testbed-node-0 /]# diff -Naur /var/lib/kolla/venv/lib/python3.10/site-packages/eventlet/green/thread.py.orig /var/lib/kolla/venv/lib/python3.10/site-packages/eventlet/green/thread.py
--- /var/lib/kolla/venv/lib/python3.10/site-packages/eventlet/green/thread.py.orig  2024-03-13 19:45:48.154699128 +0000
+++ /var/lib/kolla/venv/lib/python3.10/site-packages/eventlet/green/thread.py   2024-03-13 19:45:56.802756473 +0000
@@ -30,9 +30,12 @@

 def get_ident(gr=None):
-    if gr is None:
-        return id(greenlet.getcurrent())
-    else:
+    try:
+        if gr is None:
+            return id(greenlet.getcurrent())
+        else:
+            return id(gr)
+    except:
         return id(gr)
berendt commented 8 months ago
2024-03-13 19:36:43.595414 Traceback (most recent call last):
2024-03-13 19:36:43.595455   File "/var/lib/kolla/venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1900, in _execute_context
2024-03-13 19:36:43.595458     self.dialect.do_execute(
2024-03-13 19:36:43.595462   File "/var/lib/kolla/venv/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
2024-03-13 19:36:43.595465     cursor.execute(statement, parameters)
2024-03-13 19:36:43.595468   File "/var/lib/kolla/venv/lib/python3.10/site-packages/pymysql/cursors.py", line 158, in execute
2024-03-13 19:36:43.595470     result = self._query(query)
2024-03-13 19:36:43.595473   File "/var/lib/kolla/venv/lib/python3.10/site-packages/pymysql/cursors.py", line 325, in _query
2024-03-13 19:36:43.595476     conn.query(q)
2024-03-13 19:36:43.595479   File "/var/lib/kolla/venv/lib/python3.10/site-packages/pymysql/connections.py", line 549, in query
2024-03-13 19:36:43.595481     self._affected_rows = self._read_query_result(unbuffered=unbuffered)
2024-03-13 19:36:43.595485   File "/var/lib/kolla/venv/lib/python3.10/site-packages/pymysql/connections.py", line 779, in _read_query_result
2024-03-13 19:36:43.595487     result.read()
2024-03-13 19:36:43.595490   File "/var/lib/kolla/venv/lib/python3.10/site-packages/pymysql/connections.py", line 1157, in read
2024-03-13 19:36:43.595492     first_packet = self.connection._read_packet()
2024-03-13 19:36:43.595495   File "/var/lib/kolla/venv/lib/python3.10/site-packages/pymysql/connections.py", line 729, in _read_packet
2024-03-13 19:36:43.595498     packet.raise_for_error()
2024-03-13 19:36:43.595501   File "/var/lib/kolla/venv/lib/python3.10/site-packages/pymysql/protocol.py", line 221, in raise_for_error
2024-03-13 19:36:43.595503     err.raise_mysql_exception(self._data)
2024-03-13 19:36:43.595506   File "/var/lib/kolla/venv/lib/python3.10/site-packages/pymysql/err.py", line 143, in raise_mysql_exception
2024-03-13 19:36:43.595508     raise errorclass(errno, errval)
2024-03-13 19:36:43.595518 pymysql.err.OperationalError: (1054, "Unknown column 'mapping.schema_version' in 'field list'")
berendt commented 8 months ago
2024-03-13 19:36:43.595414 Traceback (most recent call last):
2024-03-13 19:36:43.595455   File "/var/lib/kolla/venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1900, in _execute_context
2024-03-13 19:36:43.595458     self.dialect.do_execute(
2024-03-13 19:36:43.595462   File "/var/lib/kolla/venv/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
2024-03-13 19:36:43.595465     cursor.execute(statement, parameters)
2024-03-13 19:36:43.595468   File "/var/lib/kolla/venv/lib/python3.10/site-packages/pymysql/cursors.py", line 158, in execute
2024-03-13 19:36:43.595470     result = self._query(query)
2024-03-13 19:36:43.595473   File "/var/lib/kolla/venv/lib/python3.10/site-packages/pymysql/cursors.py", line 325, in _query
2024-03-13 19:36:43.595476     conn.query(q)
2024-03-13 19:36:43.595479   File "/var/lib/kolla/venv/lib/python3.10/site-packages/pymysql/connections.py", line 549, in query
2024-03-13 19:36:43.595481     self._affected_rows = self._read_query_result(unbuffered=unbuffered)
2024-03-13 19:36:43.595485   File "/var/lib/kolla/venv/lib/python3.10/site-packages/pymysql/connections.py", line 779, in _read_query_result
2024-03-13 19:36:43.595487     result.read()
2024-03-13 19:36:43.595490   File "/var/lib/kolla/venv/lib/python3.10/site-packages/pymysql/connections.py", line 1157, in read
2024-03-13 19:36:43.595492     first_packet = self.connection._read_packet()
2024-03-13 19:36:43.595495   File "/var/lib/kolla/venv/lib/python3.10/site-packages/pymysql/connections.py", line 729, in _read_packet
2024-03-13 19:36:43.595498     packet.raise_for_error()
2024-03-13 19:36:43.595501   File "/var/lib/kolla/venv/lib/python3.10/site-packages/pymysql/protocol.py", line 221, in raise_for_error
2024-03-13 19:36:43.595503     err.raise_mysql_exception(self._data)
2024-03-13 19:36:43.595506   File "/var/lib/kolla/venv/lib/python3.10/site-packages/pymysql/err.py", line 143, in raise_mysql_exception
2024-03-13 19:36:43.595508     raise errorclass(errno, errval)
2024-03-13 19:36:43.595518 pymysql.err.OperationalError: (1054, "Unknown column 'mapping.schema_version' in 'field list'")

Not related to the initial issue. This was fixed by reverting a backport of 739966.

elnunes97 commented 1 month ago

j'ai un probleme avec openstack dashboar : bobcat python 3.10 django 2.3.12 apache error log: [Sat Oct 12 15:00:45.043318 2024] [wsgi:error] [pid 4845:tid 140110787995200] [remote 10.0.0.1:17709] ); [Sat Oct 12 15:00:45.043326 2024] [wsgi:error] [pid 4845:tid 140110787995200] [remote 10.0.0.1:17709] }]); [Sat Oct 12 15:00:45.043334 2024] [wsgi:error] [pid 4845:tid 140110787995200] [remote 10.0.0.1:17709] [Sat Oct 12 15:00:45.043341 2024] [wsgi:error] [pid 4845:tid 140110787995200] [remote 10.0.0.1:17709] [Sat Oct 12 15:00:45.043360 2024] [wsgi:error] [pid 4845:tid 140110787995200] [remote 10.0.0.1:17709] [Sat Oct 12 15:00:45.043368 2024] [wsgi:error] [pid 4845:tid 140110787995200] [remote 10.0.0.1:17709] [Sat Oct 12 15:00:45.043375 2024] [wsgi:error] [pid 4845:tid 140110787995200] [remote 10.0.0.1:17709] [Sat Oct 12 15:00:45.043404 2024] [wsgi:error] [pid 4845:tid 140110787995200] [remote 10.0.0.1:17709] [Sat Oct 12 15:00:45.043412 2024] [wsgi:error] [pid 4845:tid 140110787995200] [remote 10.0.0.1:17709]

interface :

horizon

)