diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-11-10 19:00:08 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-11-10 19:00:08 +0000 |
commit | 9b4a981f955ea4a187c92e24c980f45c42f9a02a (patch) | |
tree | b2e2d3c9f836823a2e89a7224fcedc14fb513810 /extraconfig/tasks/major_upgrade_check.sh | |
parent | 64a277323c580b16196b1d1805120ba35de1690c (diff) | |
parent | dde12b075ff51d4def4f49e635dd390a7f1f2cac (diff) |
Merge "Fix race during major-upgrade-pacemaker step"
Diffstat (limited to 'extraconfig/tasks/major_upgrade_check.sh')
-rwxr-xr-x | extraconfig/tasks/major_upgrade_check.sh | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/extraconfig/tasks/major_upgrade_check.sh b/extraconfig/tasks/major_upgrade_check.sh index b65f6915..8bdff5e7 100755 --- a/extraconfig/tasks/major_upgrade_check.sh +++ b/extraconfig/tasks/major_upgrade_check.sh @@ -18,14 +18,8 @@ check_pcsd() fi } -check_disk_for_mysql_dump() +mysql_need_update() { - # Where to backup current database if mysql need to be upgraded - MYSQL_BACKUP_DIR=/var/tmp/mysql_upgrade_osp - MYSQL_TEMP_UPGRADE_BACKUP_DIR=/var/lib/mysql-temp-upgrade-backup - # Spare disk ratio for extra safety - MYSQL_BACKUP_SIZE_RATIO=1.2 - # Shall we upgrade mysql data directory during the stack upgrade? if [ "$mariadb_do_major_upgrade" = "auto" ]; then ret=$(is_mysql_upgrade_needed) @@ -40,6 +34,17 @@ check_disk_for_mysql_dump() else DO_MYSQL_UPGRADE=1 fi +} + +check_disk_for_mysql_dump() +{ + # Where to backup current database if mysql need to be upgraded + MYSQL_BACKUP_DIR=/var/tmp/mysql_upgrade_osp + MYSQL_TEMP_UPGRADE_BACKUP_DIR=/var/lib/mysql-temp-upgrade-backup + # Spare disk ratio for extra safety + MYSQL_BACKUP_SIZE_RATIO=1.2 + + mysql_need_update if [ "$(hiera -c /etc/puppet/hiera.yaml bootstrap_nodeid)" = "$(facter hostname)" ]; then if [ $DO_MYSQL_UPGRADE -eq 1 ]; then |