undercloud: manage mysql user + revoke grant during upgrade
This task is done when bootstraping a new deployment but we also need to run these commands when upgrading the containerized undercloud so healthcheck can run mysql commands from mysql user. Change-Id: Ie77785caba0a1fb8e2058a998b21cc88bc666fd7 Closes-Bug: #1776570
This commit is contained in:
parent
c36bad9780
commit
25456872c4
@ -268,6 +268,13 @@ outputs:
|
||||
fi
|
||||
become: true
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
# https://bugs.launchpad.net/tripleo/+bug/1776570
|
||||
- name: Manage mysql user for healthcheck and revoke grant
|
||||
shell: |
|
||||
mysql -e "CREATE USER IF NOT EXISTS \`mysql\`@\`localhost\`;"
|
||||
mysql -e "REVOKE ALL PRIVILEGES, GRANT OPTION FROM \`mysql\`@\`localhost\`;"
|
||||
become: true
|
||||
when: {get_param: UndercloudUpgrade}
|
||||
- name: Stop and disable mysql service
|
||||
when: mariadb_enabled|bool
|
||||
service: name=mariadb state=stopped enabled=no
|
||||
|
Loading…
Reference in New Issue
Block a user