Fix srv_uptime evaluation for RabbitMQ OCF

Bug #1417947 reported by Bogdan Dobrelya on 2015-02-04
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
High
Bogdan Dobrelya
6.0.x
Undecided
Unassigned
Changed in fuel:
importance: Undecided → High
assignee: nobody → Bogdan Dobrelya (bogdando)
milestone: none → 6.1
status: New → In Progress
Bogdan Dobrelya (bogdando) wrote :

This issue impacts the full rabbitmq cluster reassemble case, so it was set to the high

Reviewed: https://review.openstack.org/152839
Committed: https://git.openstack.org/cgit/stackforge/fuel-library/commit/?id=5f0b093894ab2f4ad04b15ef65216b634c0aa05e
Submitter: Jenkins
Branch: master

commit 5f0b093894ab2f4ad04b15ef65216b634c0aa05e
Author: Bogdan Dobrelya <email address hidden>
Date: Wed Feb 4 10:38:15 2015 +0100

    Fix srv_uptime for rabbit OCF

    The original condition for srv_uptime was
    if "x$stime" != "x(null)"
    In 6.1 it was changed to the reverse one and should be fixed

    Closes-bug: #1417947

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

Changed in fuel:
status: In Progress → Fix Committed
tags: added: system-test-not-required

Verified on MOS 6.1 ISO #429
Steps to Verify:
Current srv_uptime function contains:
srv_uptime() {
    local stime
    stime=$( crm_attribute -N `hostname` -l reboot --name 'rabbit-start-time' --query 2>/dev/null | awk '{print $3}' | awk -F "=" '{print $2}' | sed -e '/(null)/d' )

    if [ -z "${stime}" -o x"${stime}" == x"(null)" ] ; then
        echo 0
    else
        echo $(( $(now) - ${stime} ))
    fi

    return $OCF_SUCCESS
}

Changed in fuel:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers