Comment 6 for bug 1942309

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/tripleo-heat-templates/+/807861
Committed: https://opendev.org/openstack/tripleo-heat-templates/commit/79791ce30d3203d03e9a4db4b3c18991d5102ff2
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit 79791ce30d3203d03e9a4db4b3c18991d5102ff2
Author: Damien Ciabrini <email address hidden>
Date: Mon Aug 30 17:17:46 2021 +0200

    Check whether an HA resource already exists explicitly

    With ephemeral heat we lost the meaning of the 'stack_action' hiera key
    which we previously used to distinguish between fresh deployment and
    pre-existing deployment (aka redeploy).
    Since this hiera key is not available anymore, in ansible we added a
    TRIPLEO_HA_WRAPPER_RESOURCE_EXISTS env variable which will be true
    when the resource existed even before calling puppet.

    This way we can restore the previous behaviour (which was relying
    on the stack_update hiera key) of restarting an HA
    bundle on the bootstrap node in case of a configuration change.

    While we're at it we make sure that the logging takes place via logger
    so we're sure to capture these events in the journal.

    Tested as follows:
    1) Initial deploy:
    [root@controller-0 ~]# journalctl |grep pcmkres
    Sep 01 10:23:35 controller-0.alejandro.ftw pcmkrestart[47636]: Initial deployment, skipping the restart of haproxy-bundle
    Sep 01 10:24:25 controller-0.alejandro.ftw pcmkrestart[49735]: Initial deployment, skipping the restart of galera-bundle
    Sep 01 10:25:15 controller-0.alejandro.ftw pcmkrestart[53052]: Initial deployment, skipping the restart of rabbitmq-bundle
    Sep 01 10:37:35 controller-0.alejandro.ftw pcmkrestart[148651]: Initial deployment, skipping the restart of openstack-cinder-volume

    Redeploy changing only the haproxy config via a hiera key change:
    Sep 01 11:12:29 controller-0.alejandro.ftw pcmkrestart[438507]: Wed Sep Restarting haproxy-bundle globally. Stopping:
    Sep 01 11:12:37 controller-0.alejandro.ftw pcmkrestart[439271]: Wed Sep Restarting haproxy-bundle globally. Starting:

    Depends-On: https://review.opendev.org/c/openstack/tripleo-ansible/+/807761

    Closes-Bug: #1942309

    Change-Id: I90ea2287b5ab32c8dc6bbf5f91927e7488326dcd
    (cherry picked from commit ad2a13ab47b6ad6c948d8c229dde8b9f1386ea29)