Browse Source

HA: drop spurious mysql user on stack deploy

In HA deployments, puppet-mysql is not in charge of deleting
all default users in the DB, so we end up keeping an extra
root@<controller-x> user that is never used nor supported for
password update. Make sure we delete it at creation time.

Change-Id: I0dbe6bd43ad0e6bcb884798912d195e94738c344
Closes-Bug: #1867165
(cherry picked from commit a67cfd0ba9)
changes/06/715906/1
Damien Ciabrini 5 months ago
parent
commit
e7a4cee7b9
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      deployment/database/mysql-pacemaker-puppet.yaml

+ 1
- 0
deployment/database/mysql-pacemaker-puppet.yaml View File

@@ -240,6 +240,7 @@ outputs:
- 'timeout ${DB_MAX_TIMEOUT} /bin/bash -c ''until mysqladmin -uroot -p"${DB_ROOT_PASSWORD}" ping 2>/dev/null; do sleep 1; done'''
- 'mysql -uroot -p"${DB_ROOT_PASSWORD}" -e "CREATE USER ''clustercheck''@''localhost'' IDENTIFIED BY ''${DB_CLUSTERCHECK_PASSWORD}'';"'
- 'mysql -uroot -p"${DB_ROOT_PASSWORD}" -e "GRANT PROCESS ON *.* TO ''clustercheck''@''localhost'' WITH GRANT OPTION;"'
- 'mysql -uroot -p"${DB_ROOT_PASSWORD}" -e "DELETE FROM mysql.user WHERE user = ''root'' AND host NOT IN (''%'',''localhost'');"'
- 'timeout ${DB_MAX_TIMEOUT} mysqladmin -uroot -p"${DB_ROOT_PASSWORD}" shutdown'
volumes: &mysql_volumes
list_concat:


Loading…
Cancel
Save