Hi Josephine,

If you are using Ubuntu with devstack master, can you try and source the following file and see if it makes the glance-manage work?

source /opt/stack/data/venv/bin/activate

Thanks
Rajat Dhasmana

On Tue, Aug 20, 2024 at 7:14 PM Josephine Seifert <josephine.seifert@cloudandheat.com> wrote:
Hi everyone,

within my devstack I can execute cinder-manage db sync or version and
everything works fine:

```
stack@devstack:~/devstack$ cinder-manage db version
INFO dbcounter [-] Registered counter for database cinder
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_ENGINE_SUBSTITUTION
{{(pid=304079) _check_effective_sql_mode
/opt/stack/data/venv/lib/python3.10/site-packages/oslo_db/sqlalchemy/engines.py:342}}
DEBUG dbcounter [-] [304079] Writer thread running {{(pid=304079)
stat_writer
/opt/stack/data/venv/lib/python3.10/site-packages/dbcounter.py:102}}
INFO alembic.runtime.migration [-] Context impl MySQLImpl.
INFO alembic.runtime.migration [-] Will assume non-transactional DDL.
a8189e5afd9a
```

But when I try to do the same with glance-manage I get an Error:

```
stack@devstack:~/devstack$ glance-manage db version
CRITICAL glance [-] Unhandled error: sqlalchemy.exc.NoSuchModuleError:
Can't load plugin: sqlalchemy.plugins:dbcounter
ERROR glance Traceback (most recent call last):
ERROR glance   File "/usr/bin/glance-manage", line 10, in <module>
....
```

my current version of sqlalchemy is:
stack@devstack:~/devstack$ pip show sqlalchemy
Name: SQLAlchemy
Version: 1.4.31

Does anyone have an idea, how I can fix this Error?

greetings
Luzi