Bug 1561177

Summary: Major upgrade: implement migration tasks for MySQL major version update
Product: Red Hat OpenStack Reporter: Damien Ciabrini <dciabrin>
Component: openstack-tripleo-heat-templatesAssignee: Angus Thomas <athomas>
Status: CLOSED ERRATA QA Contact: Udi Shkalim <ushkalim>
Severity: high Docs Contact:
Priority: high    
Version: 13.0 (Queens)CC: augol, dbecker, jschluet, mburns, michele, mkrcmari, morazi, rhel-osp-director-maint
Target Milestone: betaKeywords: Triaged
Target Release: 13.0 (Queens)   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: openstack-tripleo-heat-templates-8.0.2-0.20180327213843.f25e2d8.el7ost instack-undercloud-8.4.0-2.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-27 13:48:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Damien Ciabrini 2018-03-27 20:08:33 UTC
Description of problem:
With the introduction of MariaDB10 in OSP13 [1], we need to run database upgrade script mysql_upgrade after the undercloud is upgraded or the overcloud ran a major upgrade.

This step is required to ensure the internal MySQL data on disk (e.g. performance schema, new MyISAM internal tables) will be upgraded to the latest version and available to the mysql server. 

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1374296

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Deploy an OSP12
2. Upgrade overcloud to OSP13 (will use container with mariadb 10.1)

Actual results:
mysql log file will contain error advising to upgrade the data format on disk (non fatal). 

Expected results:
mysql data on disk should be upgraded for mysql server to stop logging warning and use all features of mariadb)

Additional info:
This BZ gathers fixes from puppet-tripleo and tripleo-heat-templates (overcloud), as well as instack-undercloud (undercloud)

Comment 7 Marian Krcmarik 2018-05-14 10:53:27 UTC
$ cat /var/lib/mysql/mysql_upgrade_info 

2018-05-13  1:43:44 140581861636288 [ERROR] Missing system table mysql.roles_mapping; please run mysql_upgrade to create it
2018-05-13  1:43:44 140581860693760 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1146: Table 'mysql.gtid_slave_pos' doesn't exist
2018-05-13  1:43:44 140581861636288 [Note] /usr/libexec/mysqld: ready for connections.
Version: '10.1.20-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 0  MariaDB Server
2018-05-13  1:43:46 140581860423424 [Warning] 'user' entry 'root@database-2' ignored in --skip-name-resolve mode.
2018-05-13  1:43:46 140581860423424 [Warning] 'proxies_priv' entry '@% root@database-2' ignored in --skip-name-resolve mode.
2018-05-13  1:43:46 140581860153088 [Note] /usr/libexec/mysqld: Normal shutdown
2018-05-13  1:43:46 140581860153088 [Note] Event Scheduler: Purging the queue. 0 events
2018-05-13  1:43:46 140580973696768 [Note] InnoDB: FTS optimize thread exiting.
2018-05-13  1:43:46 140581860153088 [Note] InnoDB: Starting shutdown...
2018-05-13  1:43:46 140581860153088 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
2018-05-13  1:43:47 140581860153088 [Note] InnoDB: Shutdown completed; log sequence number 27118971
2018-05-13  1:43:47 140581860153088 [Note] /usr/libexec/mysqld: Shutdown complete

Comment 9 errata-xmlrpc 2018-06-27 13:48:49 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.