Browse Source

Force re-run of pacemaker bundle init containers during upgrade-scaleup

We need to recreate the *_init_bundle containers during the staged
upgrade (upgrade-scaleup), because the init containers will e.g. set
the correct replica count for the bundle as we're scaling up from 1 to
3 controllers.

The init containers wouldn't get re-run/recreated automatically on
upgrade-scaleup because none of their input would change. The
DeploymentIdentifier is set by the `openstack upgrade prepare` command
and applied during upgrade with `--limit controller-0`. Then later
when we run `--limit controller-0,controller-1`, the
DeploymentIdentifier value does not change from the perspective of
controller-0, so we have to explicitly remove the bundle init
containers to force re-running them.

Change-Id: I93c6d7292f37529735e24286f4076634aa4fe6a5
Partial-Bug: #1831690
(cherry picked from commit d4db2fa532)
tags/10.6.1
Jiri Stransky 1 month ago
parent
commit
4b9c3637f8

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

@@ -528,6 +528,12 @@ outputs:
528 528
                 mysql_node_names_upgraded is not defined or
529 529
                 mysql_node_names_upgraded | length == 0
530 530
 
531
+            - name: remove mysql init container on upgrade-scaleup to force re-init
532
+              shell: |
533
+                if podman inspect mysql_init_bundle &> /dev/null; then
534
+                    podman rm mysql_init_bundle
535
+                fi
536
+              when: mysql_short_node_names_upgraded | length > 1
531 537
             - name: add the mysql short name to hiera data for the upgrade.
532 538
               include_role:
533 539
                 name: tripleo-upgrade-hiera

+ 6
- 0
deployment/database/redis-pacemaker-puppet.yaml View File

@@ -452,6 +452,12 @@ outputs:
452 452
                 redis_short_node_names_upgraded is not defined or
453 453
                 redis_short_node_names_upgraded | length == 0
454 454
 
455
+            - name: remove redis init container on upgrade-scaleup to force re-init
456
+              shell: |
457
+                if podman inspect redis_init_bundle &> /dev/null; then
458
+                    podman rm redis_init_bundle
459
+                fi
460
+              when: redis_short_node_names_upgraded | length > 1
455 461
             - name: add the redis short name to hiera data for the upgrade.
456 462
               include_role:
457 463
                 name: tripleo-upgrade-hiera

+ 6
- 0
deployment/haproxy/haproxy-pacemaker-puppet.yaml View File

@@ -551,6 +551,12 @@ outputs:
551 551
                 haproxy_short_node_names_upgraded is not defined or
552 552
                 haproxy_short_node_names_upgraded | length == 0
553 553
 
554
+            - name: remove haproxy init container on upgrade-scaleup to force re-init
555
+              shell: |
556
+                if podman inspect haproxy_init_bundle &> /dev/null; then
557
+                    podman rm haproxy_init_bundle
558
+                fi
559
+              when: haproxy_short_node_names_upgraded | length > 1
554 560
             - name: add the haproxy short name to hiera data for the upgrade.
555 561
               include_role:
556 562
                 name: tripleo-upgrade-hiera

+ 6
- 0
deployment/rabbitmq/rabbitmq-messaging-notify-pacemaker-puppet.yaml View File

@@ -421,6 +421,12 @@ outputs:
421 421
                 oslo_messaging_notify_node_names_upgraded is not defined or
422 422
                 oslo_messaging_notify_node_names_upgraded | length == 0
423 423
 
424
+            - name: remove rabbitmq init container on upgrade-scaleup to force re-init
425
+              shell: |
426
+                if podman inspect rabbitmq_init_bundle &> /dev/null; then
427
+                    podman rm rabbitmq_init_bundle
428
+                fi
429
+              when: oslo_messaging_notify_short_node_names_upgraded | length > 1
424 430
             - name: add the oslo_messaging_notify short name to hiera data for the upgrade.
425 431
               include_role:
426 432
                 name: tripleo-upgrade-hiera

+ 6
- 0
deployment/rabbitmq/rabbitmq-messaging-pacemaker-puppet.yaml View File

@@ -418,6 +418,12 @@ outputs:
418 418
                 rabbitmq_short_node_names_upgraded is not defined or
419 419
                 rabbitmq_short_node_names_upgraded | length == 0
420 420
 
421
+            - name: remove rabbitmq init container on upgrade-scaleup to force re-init
422
+              shell: |
423
+                if podman inspect rabbitmq_init_bundle &> /dev/null; then
424
+                    podman rm rabbitmq_init_bundle
425
+                fi
426
+              when: rabbitmq_short_node_names_upgraded | length > 1
421 427
             - name: add the rabbitmq short name to hiera data for the upgrade.
422 428
               include_role:
423 429
                 name: tripleo-upgrade-hiera

+ 6
- 0
deployment/rabbitmq/rabbitmq-messaging-rpc-pacemaker-puppet.yaml View File

@@ -421,6 +421,12 @@ outputs:
421 421
                 oslo_messaging_rpc_node_names_upgraded is not defined or
422 422
                 oslo_messaging_rpc_node_names_upgraded | length == 0
423 423
 
424
+            - name: remove rabbitmq init container on upgrade-scaleup to force re-init
425
+              shell: |
426
+                if podman inspect rabbitmq_init_bundle &> /dev/null; then
427
+                    podman rm rabbitmq_init_bundle
428
+                fi
429
+              when: oslo_messaging_rpc_short_node_names_upgraded | length > 1
424 430
             - name: add the oslo_messaging_rpc short name to hiera data for the upgrade.
425 431
               include_role:
426 432
                 name: tripleo-upgrade-hiera

Loading…
Cancel
Save