Upgrade data on disk on mysql major upgrade - non HA

During major upgrade of non-HA overcloud, paunch stops the
containerized mysql service, update container image and restart
the containerized mysql.

After a major update of mysql (e.g. 5.5 to 10.0), run mysql_upgrade
to ensure that database on-disk is upgraded to match the mysql
server version (e.g. update all MyISAM tables)

The mysql_upgrade cannot be performed during upgrade_steps because
paunch only runs during the deploy_steps. So run it in the
post_upgrade_steps, once we know paunch has updated mysql.

Change-Id: I6b6a531fd716ad9abcbf29886c0b1f2c64f04c9d
This commit is contained in:
Damien Ciabrini 2018-03-22 21:38:44 +00:00
parent 4707261912
commit 02f8609168

View File

@ -279,3 +279,7 @@ outputs:
- step|int == 2
- mariadb_enabled.rc == 0
service: name=mariadb state=stopped enabled=no
post_upgrade_tasks:
- name: Check and upgrade Mysql database after major version upgrade
command: docker exec -u root mysql mysql_upgrade
when: step|int == 2