Access the Database
All should be run on the controller.
Find the database_password:
./cc-ansible --site /opt/site-config edit_passwordsGet inside mariadb service container:
docker exec -it mariadb bashEnter database_password:
mysql -u root -pShow the databases:
MariaDB [(none)]> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| PERCONA_SCHEMA |
| blazar |
| cinder |
| doni |
| glance |
| heat |
| information_schema |
| ironic |
| keystone |
| mysql |
| neutron |
| nova |
| nova_api |
| nova_cell0 |
| performance_schema |
| placement |
| zun |
+--------------------+Select the database:
Show the desired tables:
Drop a database:
Show entris in a table:
Here is how to delete an entry of a table. For example here we delete a network segment with id 7edefbb6-78a7-4dc8-af94-6bd18376bb08 in blazar database:
After cleaning a service's database, Keystone's records must be cleaned as well.
From Keystone the following items should be deleted:
The service entry itself:
To delete the service:
Its endpoints:
To delete all endpoints, use Keystone CLI:
Its user:
Delete the user by:
NOTE: zun service has entries in placement database service as well. Deleting them is crucial and resolved a bug. The following instructions are regarding that.
We need to remove the controller-01-k8s resource provider which is a key item. However, it has references in other tables of the database. So they should be deleted too.
allocationstable:
inventoriestable:
Then the foreign key check must be disabled, delete the resource provider, and enable it again.
Then deploy the service to create a new database.
Last updated