Browse Source

Merge "Fix MariaDB staged upgrade" into stable/stein

tags/10.6.1
Zuul 3 weeks ago
parent
commit
8482c6bf3e
2 changed files with 9 additions and 1 deletions
  1. 1
    1
      common/deploy-steps.j2
  2. 8
    0
      deployment/database/mysql-pacemaker-puppet.yaml

+ 1
- 1
common/deploy-steps.j2 View File

@@ -19,7 +19,7 @@
19 19
 {% set external_update_steps_max = 2 -%}
20 20
 {% set pre_upgrade_rolling_steps_max = 1 -%}
21 21
 {% set upgrade_steps_max = 6 -%}
22
-{% set external_upgrade_steps_max = 2 -%}
22
+{% set external_upgrade_steps_max = 3 -%}
23 23
 {% set post_upgrade_steps_max = 4 -%}
24 24
 {% set fast_forward_upgrade_steps_max = 9 -%}
25 25
 {% set fast_forward_upgrade_prep_steps_max = 3 -%}

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

@@ -563,6 +563,13 @@ outputs:
563 563
             - step|int == 3
564 564
           block: *mysql_fetch_retag_container_tasks
565 565
         - name: Check and upgrade Mysql database after major version upgrade
566
+         # Note: during upgrade to Stein, a new pacemaker cluster is recreated,
567
+         # controller nodes added sequentially to this new cluster, and the upgrade
568
+         # workflow (upgrade tasks, deploy/convertge) is ran once per controller.
569
+         # This mysql upgrade block must run only once per controller, before
570
+         # the controller is added into the cluster (by mysql_init_bundle) and
571
+         # before pacemaker has a chance to start galera on that controller.
572
+         # So do not exercise the upgrade if mysql is already running.
566 573
           when: step|int == 3
567 574
           block:
568 575
             # mariadb package changes ownership of /var/lib/mysql on package
@@ -580,6 +587,7 @@ outputs:
580 587
                   list_join:
581 588
                     - ' '
582 589
                     - - 'kolla_set_configs;'
590
+                      - 'if mysqladmin ping --silent; then exit 0; fi;'
583 591
                       - 'chown -R mysql:mysql /var/lib/mysql;'
584 592
                       - 'chown -R mysql:mysql /var/log/mariadb;'
585 593
                       - 'mysqld_safe --user=mysql --wsrep-provider=none --skip-networking --wsrep-on=off &'

Loading…
Cancel
Save