Following fixes are done in the script:-
- Use openstack_citest as db user as done in CI[1] as
with root as db user it fails configure it.
- Use MYSQL_USER var instead of hardcoded root user
- Fix Syntax Error in CREATE USER psql command by using
quotes for DATABASE_PASSWORD
- Swith to root user for running psql command as without
it, it asks for stack user password which is not configured,
same is done in devstack[2].
- Create variable DATABASE_NAME for database name and use
at all required places.
[1] https://review.opendev.org/c/openstack/neutron/+/814009/
[2] https://opendev.org/openstack/devstack/src/branch/master/lib/databases/postgresql#L90
Change-Id: Ieb523e3afdf69fff87ea9062ed857c37a8d56f5c