keystone/noble,now 2:25.0.0-0ubuntu1 keystone -manage db_sync

Bug #2064117 reported by Johan Bosch
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
keystone (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Fresh ubuntu 24.04 install when running
su -s /bin/sh -c "keystone-manage db_sync " keystone

This ends up in /var/log/apache2/keystone.log

2024-04-29 12:47:10.184549 File "/usr/lib/python3/dist-packages/pymysql/protocol.py", line 221, in raise_for_error
2024-04-29 12:47:10.184554 err.raise_mysql_exception(self._data)
2024-04-29 12:47:10.184572 File "/usr/lib/python3/dist-packages/pymysql/err.py", line 143, in raise_mysql_exception
2024-04-29 12:47:10.184577 raise errorclass(errno, errval)
2024-04-29 12:47:10.184629 sqlalchemy.exc.ProgrammingError: (pymysql.err.ProgrammingError) (1146, "Table 'keystone.project' doesn't exist")
2024-04-29 12:47:10.184634 [SQL: SELECT project.id AS project_id, project.name AS project_name, project.domain_id AS project_domain_id, project.description AS project_description, project.enabled AS project_enabled, project.extra AS project_extra, project.parent_id AS project_parent_id, project.is_domain AS project_is_domain
2024-04-29 12:47:10.184640 FROM project
2024-04-29 12:47:10.184644 WHERE project.name = %(name_1)s AND project.domain_id = %(domain_id_1)s]
2024-04-29 12:47:10.184648 [parameters: {'name_1': 'Default', 'domain_id_1': '<<keystone.domain.root>>'}]

after dbsync is run the project table does exist so i think things are just done in wrong order, result is that keystone dosnt work afterwards though

Revision history for this message
James Page (james-page) wrote :
Download full text (6.9 KiB)

Hi Johan

I'm not able to reproduce your problem; in my setup I've configured mysql with a keystone database, username and password for access, and then configured this in /etc/keystone/keystone.conf

I then ran the db_sync command to setup the database, created the fernet keys and then successfully bootstrapped the deployment.

2024-04-29 14:48:45.073 12333 INFO alembic.runtime.migration [-] Context impl MySQLImpl.
2024-04-29 14:48:45.073 12333 INFO alembic.runtime.migration [-] Will assume non-transactional DDL.
2024-04-29 14:48:45.093 12333 INFO alembic.runtime.migration [-] Running upgrade -> 27e647c0fad4, Initial version.
2024-04-29 14:48:45.939 12333 INFO alembic.runtime.migration [-] Running upgrade 27e647c0fad4 -> 29e87d24a316, Initial no-op Yoga expand migration.
2024-04-29 14:48:45.940 12333 INFO alembic.runtime.migration [-] Running upgrade 29e87d24a316 -> b4f8b3f584e0, Fix incorrect constraints.
2024-04-29 14:48:45.951 12333 INFO alembic.runtime.migration [-] Running upgrade b4f8b3f584e0 -> 11c3b243b4cb, Remove service_provider.relay_state_prefix server default.
2024-04-29 14:48:45.957 12333 INFO alembic.runtime.migration [-] Running upgrade 11c3b243b4cb -> 47147121, Add Identity Federation attribute mapping schema version.
2024-04-29 14:48:45.967 12333 INFO alembic.runtime.migration [-] Running upgrade 27e647c0fad4 -> e25ffa003242, Initial no-op Yoga contract migration.
2024-04-29 14:48:45.967 12333 INFO alembic.runtime.migration [-] Running upgrade e25ffa003242 -> 99de3849d860, Fix incorrect constraints.
2024-04-29 14:48:45.983 12333 INFO alembic.runtime.migration [-] Running upgrade 99de3849d860 -> c88cdce8f248, Remove duplicate constraints.
2024-04-29 14:49:26.124 13264 INFO keystone.common.fernet_utils [-] Created a new temporary key: /etc/keystone/fernet-keys/0.tmp
2024-04-29 14:49:26.125 13264 INFO keystone.common.fernet_utils [-] Become a valid new key: /etc/keystone/fernet-keys/0
2024-04-29 14:49:26.125 13264 INFO keystone.common.fernet_utils [-] Starting key rotation with 1 key files: ['/etc/keystone/fernet-keys/0']
2024-04-29 14:49:26.125 13264 INFO keystone.common.fernet_utils [-] Created a new temporary key: /etc/keystone/fernet-keys/0.tmp
2024-04-29 14:49:26.125 13264 INFO keystone.common.fernet_utils [-] Current primary key is: 0
2024-04-29 14:49:26.126 13264 INFO keystone.common.fernet_utils [-] Next primary key will be: 1
2024-04-29 14:49:26.126 13264 INFO keystone.common.fernet_utils [-] Promoted key 0 to be the primary: 1
2024-04-29 14:49:26.126 13264 INFO keystone.common.fernet_utils [-] Become a valid new key: /etc/keystone/fernet-keys/0
2024-04-29 14:49:36.731 13449 INFO keystone.common.utils [-] /etc/keystone/credential-keys/ does not appear to exist; attempting to create it
2024-04-29 14:49:36.732 13449 INFO keystone.common.fernet_utils [-] Created a new temporary key: /etc/keystone/credential-keys/0.tmp
2024-04-29 14:49:36.732 13449 INFO keystone.common.fernet_utils [-] Become a valid new key: /etc/keystone/credential-keys/0
2024-04-29 14:49:36.732 13449 INFO keystone.common.fernet_utils [-] Starting key rotation with 1 key files: ['/etc/keystone/credential-keys/0']
2024-04-29 14:49:36.732 13449 INFO keys...

Read more...

Changed in keystone (Ubuntu):
status: New → Incomplete
Revision history for this message
Johan Bosch (int0x21) wrote :

Yea that looks alot better then mine. il try to have some time tomorrow and i nuke the cluster and make a clean install and do things in a bit of a diffrent order i think

Revision history for this message
Johan Bosch (int0x21) wrote :

I think i narrowed it down, it seems it was my galera cluster that was a bit out of wack, sorry for the false alarm

Revision history for this message
James Page (james-page) wrote :

OK - marking as invalid then!

Changed in keystone (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.