Comment 2 for bug 1896697

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to config-files (master)

Reviewed: https://review.opendev.org/753500
Committed: https://git.openstack.org/cgit/starlingx/config-files/commit/?id=0d30fad51343267df4441b89c7289fd73e8f247e
Submitter: Zuul
Branch: master

commit 0d30fad51343267df4441b89c7289fd73e8f247e
Author: Don Penney <email address hidden>
Date: Wed Sep 23 00:39:03 2020 -0400

    Update rabbitmq OCF script to protect against failed status

    In rare cases, the rabbitmq status check may return a status of '2',
    which is an indication to the OCF script that the rabbitmq-server is
    not running, but it may be at least partially up. In such a case, SM
    will see this as a failure of the service when it calls the OCF status
    check, but will subsequently fail to relaunch the service due to the
    partial status of the already-running service.

    To help avoid this, this commit updates the OCF script to:
    1. Update the "stop" function to attempt "rabbitmqctl stop" regardless
    of the "status" result. If the service is partially running, this
    should tear it down.
    2. Update the "start" script to call the "stop" function prior to
    attempting to launch the service, in case it is partially running.

    Change-Id: I19842d382dd1ab60b1caade6608f8dbb9257ebbe
    Closes-Bug: 1896697
    Signed-off-by: Don Penney <email address hidden>