Comment 0 for bug 2004022

Revision history for this message
yatin (yatinkarel) wrote :

rally not compatible with sqlalchemy-2.0.0.

Get's below error with sqlalchemy-2.0.0:-
# rally db create [1/1900]
Creating database: sqlite:////tmp/rally.sqlite
Command failed, please check log for more info
2023-01-27 14:17:47.338 2484279 CRITICAL rally [-] Unhandled error: sqlalchemy.exc.InvalidRequestError: This connection has already initialized a
SQLAlchemy Transaction() object via begin() or autobegin; can't call begin() here unless rollback() or commit() is called first.
2023-01-27 14:17:47.338 2484279 ERROR rally Traceback (most recent call last):
2023-01-27 14:17:47.338 2484279 ERROR rally File "/root/tempest/workspace/rally/venv/bin/rally", line 8, in <module>
2023-01-27 14:17:47.338 2484279 ERROR rally sys.exit(main())
2023-01-27 14:17:47.338 2484279 ERROR rally File "/root/tempest/workspace/rally/venv/lib64/python3.9/site-packages/rally/cli/main.py", line 40,
in main
2023-01-27 14:17:47.338 2484279 ERROR rally return cliutils.run(sys.argv, categories)
2023-01-27 14:17:47.338 2484279 ERROR rally File "/root/tempest/workspace/rally/venv/lib64/python3.9/site-packages/rally/cli/cliutils.py", line
669, in run
2023-01-27 14:17:47.338 2484279 ERROR rally ret = fn(*fn_args, **fn_kwargs)
2023-01-27 14:17:47.338 2484279 ERROR rally File "/root/tempest/workspace/rally/venv/lib64/python3.9/site-packages/rally/cli/commands/db.py", li
ne 44, in create
2023-01-27 14:17:47.338 2484279 ERROR rally db.schema.schema_create()
2023-01-27 14:17:47.338 2484279 ERROR rally File "/root/tempest/workspace/rally/venv/lib64/python3.9/site-packages/rally/common/db/schema.py", l
ine 138, in schema_create
2023-01-27 14:17:47.338 2484279 ERROR rally models.BASE.metadata.create_all(engine)
2023-01-27 14:17:47.338 2484279 ERROR rally File "/root/tempest/workspace/rally/venv/lib64/python3.9/site-packages/sqlalchemy/sql/schema.py", li
ne 5558, in create_all
2023-01-27 14:17:47.338 2484279 ERROR rally bind._run_ddl_visitor(
2023-01-27 14:17:47.338 2484279 ERROR rally File "/root/tempest/workspace/rally/venv/lib64/python3.9/site-packages/sqlalchemy/engine/base.py", l
ine 3219, in _run_ddl_visitor
2023-01-27 14:17:47.338 2484279 ERROR rally with self.begin() as conn:
2023-01-27 14:17:47.338 2484279 ERROR rally File "/usr/lib64/python3.9/contextlib.py", line 119, in __enter__
2023-01-27 14:17:47.338 2484279 ERROR rally return next(self.gen)
2023-01-27 14:17:47.338 2484279 ERROR rally File "/root/tempest/workspace/rally/venv/lib64/python3.9/site-packages/sqlalchemy/engine/base.py", l
ine 3210, in begin
2023-01-27 14:17:47.338 2484279 ERROR rally with conn.begin():
2023-01-27 14:17:47.338 2484279 ERROR rally File "/root/tempest/workspace/rally/venv/lib64/python3.9/site-packages/sqlalchemy/engine/base.py", l
ine 853, in begin
2023-01-27 14:17:47.338 2484279 ERROR rally raise exc.InvalidRequestError(
2023-01-27 14:17:47.338 2484279 ERROR rally sqlalchemy.exc.InvalidRequestError: This connection has already initialized a SQLAlchemy Transaction()
 object via begin() or autobegin; can't call begin() here unless rollback() or commit() is called first.
2023-01-27 14:17:47.338 2484279 ERROR rally

Until rally codebase is compatible to sqlalchemy-2.0.0 would be good to pin it.