Devstack and SQLAlchemy (Problems with stack.sh)
Folks, I’m having problems running the devstack install script (stack.sh) under an Ubuntu-22.04.2 VM. The same point in the script is causing the install to abort, but the exact error depends on some Python dependencies. Anybody have a possible solution to this; it looks like some kind of Python dependency issue? Error with SQLAlchemy==1.4.48 +lib/keystone:init_keystone:489 /usr/local/bin/keystone-manage --config-file /etc/keystone/keystone.conf db_sync CRITICAL keystone [-] Unhandled error: sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.plugins:dbcounter ERROR keystone File "/home/devstack/.local/lib/python3.10/site-packages/sqlalchemy/util/langhelpers.py", line 343, in load ERROR keystone raise exc.NoSuchModuleError( ERROR keystone sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.plugins:dbcounter Error with SQLAlchemy==2.0.12 +lib/keystone:init_keystone:489 /usr/local/bin/keystone-manage --config-file /etc/keystone/keystone.conf db_sync Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/migrate/changeset/databases/sqlite.py", line 13, in <module> from sqlalchemy.databases import sqlite as sa_base ModuleNotFoundError: No module named 'sqlalchemy.databases' Thanks in advance, - Matt
[I'm keeping your address in Cc since you don't appear to be subscribed, but please reply to the list rather than to me directly.] On 2023-05-16 11:31:28 +0100 (+0100), Matt Watkins wrote: [...]
Anybody have a possible solution to this; it looks like some kind of Python dependency issue?
Error with SQLAlchemy==1.4.48 [...]
It looks like the constraints file isn't being applied when pip is deciding what version of SQLA to install, since we currently pin it to 1.4.41 for master branches: https://opendev.org/openstack/requirements/src/commit/19eb2d2/upper-constrai... I don't know if that's the reason for the exception you quoted, but it's probably a good place to start looking. When I check example output from one of our CI jobs, I see it's passing "-c /opt/stack/requirements/upper-constraints.txt" in pip install commands, including when it installs keystone, which (for the master branch of devstack anyway) currently results in selecting SQLAlchemy-1.4.41-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl to satisfy the requirement. -- Jeremy Stanley
On Tue, 2023-05-16 at 11:31 +0100, Matt Watkins wrote:
Folks,
I’m having problems running the devstack install script (stack.sh) under an Ubuntu-22.04.2 VM.
The same point in the script is causing the install to abort, but the exact error depends on some Python dependencies.
Anybody have a possible solution to this; it looks like some kind of Python dependency issue?
Error with SQLAlchemy==1.4.48
+lib/keystone:init_keystone:489 /usr/local/bin/keystone-manage --config-file /etc/keystone/keystone.conf db_sync CRITICAL keystone [-] Unhandled error: sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.plugins:dbcounter ERROR keystone File "/home/devstack/.local/lib/python3.10/site-packages/sqlalchemy/util/langhelpers.py", line 343, in load ERROR keystone raise exc.NoSuchModuleError( ERROR keystone sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.plugins:dbcounter
Error with SQLAlchemy==2.0.12
+lib/keystone:init_keystone:489 /usr/local/bin/keystone-manage --config-file /etc/keystone/keystone.conf db_sync Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/migrate/changeset/databases/sqlite.py", line 13, in <module> from sqlalchemy.databases import sqlite as sa_base ModuleNotFoundError: No module named 'sqlalchemy.databases'
Thanks in advance,
- Matt
OpenStack as a whole doesn't support SQLAlchemy 2.x yet so that's the reason for the second failure. Regarding the latter, has the plugin been installed (you should see it in 'pip freeze')? We're not seeing this in the gate so my guess would be that this is something environmental. Stephen
Error with SQLAlchemy==1.4.48
+lib/keystone:init_keystone:489 /usr/local/bin/keystone-manage --config-file /etc/keystone/keystone.conf db_sync CRITICAL keystone [-] Unhandled error: sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.plugins:dbcounter ERROR keystone File "/home/devstack/.local/lib/python3.10/site-packages/sqlalchemy/util/langhelpers.py", line 343, in load ERROR keystone raise exc.NoSuchModuleError( ERROR keystone sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.plugins:dbcounter
This is an internal-to-devstack python module. Not sure why it’s not installing for you, but the easy button is to just disable its use in your localrc: MYSQL_GATHER_PERFORMANCE=False -—Dan
On 2023-05-16 07:08:13 -0700 (-0700), Dan Smith wrote:
Error with SQLAlchemy==1.4.48
+lib/keystone:init_keystone:489 /usr/local/bin/keystone-manage --config-file /etc/keystone/keystone.conf db_sync CRITICAL keystone [-] Unhandled error: sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.plugins:dbcounter ERROR keystone File "/home/devstack/.local/lib/python3.10/site-packages/sqlalchemy/util/langhelpers.py", line 343, in load ERROR keystone raise exc.NoSuchModuleError( ERROR keystone sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.plugins:dbcounter
This is an internal-to-devstack python module. Not sure why it’s not installing for you, but the easy button is to just disable its use in your localrc:
MYSQL_GATHER_PERFORMANCE=False
Also https://review.opendev.org/876601 purports to fix that exception under SQLAlchemy 2.x, but is only applied on the master branch (Matt didn't tell us what branch this occurred for). -- Jeremy Stanley
Thank you - this change/suggestion has got things moving to completion on my system; many thanks. - Matt
On 16 May 2023, at 15:08, Dan Smith <dms@danplanet.com> wrote:
Error with SQLAlchemy==1.4.48
+lib/keystone:init_keystone:489 /usr/local/bin/keystone-manage --config-file /etc/keystone/keystone.conf db_sync CRITICAL keystone [-] Unhandled error: sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.plugins:dbcounter ERROR keystone File "/home/devstack/.local/lib/python3.10/site-packages/sqlalchemy/util/langhelpers.py", line 343, in load ERROR keystone raise exc.NoSuchModuleError( ERROR keystone sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.plugins:dbcounter
This is an internal-to-devstack python module. Not sure why it’s not installing for you, but the easy button is to just disable its use in your localrc:
MYSQL_GATHER_PERFORMANCE=False
-—Dan
participants (4)
-
Dan Smith
-
Jeremy Stanley
-
Matt Watkins
-
Stephen Finucane