Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure MariaDBAccount gets created with MariaDBDatabase
Currently the MariaDBAccount gets created in an early step before the password secret gets validated to be there. In case the service password is missing the deployment stops after the MariaDBAccount is there. If one deletes the ctlplane at this point, the nova-api MariaDBAccount won't be deleted because the loadDatabaseAndAccountCRs() will not return the account because the MariaDBDatabase object was not created. With this the nova-api MariaDBAccount remains with a finalizer. When the password secret now is created with a new ctlplane, the old nova-api MariaDBAccount conficts with the new deployment because it will not be created in the db instance and all nova tasks to initialize its DB fail with an access error. This change moves creating the nova-api MariaDBAccount right before creating the MariaDBDatabase. This reduces the situation that there will be a MariaDBAccount for nova-api without its MariaDBDatabase. Currently this situation could also happen when the service password is there, but galera is not created properly, like DB root pwd missing. Jira: OSPRH-10167 Signed-off-by: Martin Schuppert <[email protected]>
- Loading branch information