Comment 9 for bug 1455761

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

Reviewed: https://review.openstack.org/184070
Committed: https://git.openstack.org/cgit/stackforge/fuel-library/commit/?id=454a1485453919756b8a4e3083fb71b0928158ec
Submitter: Jenkins
Branch: master

commit 454a1485453919756b8a4e3083fb71b0928158ec
Author: Bogdan Dobrelya <email address hidden>
Date: Mon May 18 16:00:37 2015 +0200

    Fix get_monitor function and local vars for rabbit OCF

    W/o this fix:
    * get_monitor() does not handle the case then rabbit
    app is running and reports $OCF_RUNNING. This makes
    the resource to stuck in semi-started state for ever.
    * get_monitor() does not always record in logs when
    sets master score 0 to ensure the slave does not get
    promoted. This makes logging patterns not consistent.
    * get_monitor() has two exit point for generic error case
    instead of one. This makes logging patterns not consistent.
    * some variables are missing the local
    declaration and might be reused in another places
    leading to unpredictable results. For example,
    there is the nodelist var should be local as it is
    used both action_notify(), get_monitor().

    The solution is:
    * fix missing local declarations for variables and
    remove unused ones as well.
    * add missing log record for "ensuring this slave does
    not get promoted."
    * handle the get_monitor() case when rabbit app is not
    running as appropriate and report $OCF_NOT_RUNNING.
    * make the single get_monitor() return point for the
    $OCF_ERR_GENERIC case.

    Closes-bug: #1455761

    Change-Id: Iba5e9d984083acea1392cad0abd6453f5d6fbf8b
    Signed-off-by: Bogdan Dobrelya <email address hidden>