Fix srv_uptime evaluation for RabbitMQ OCF

Bug #1417947 reported by Bogdan Dobrelya
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Bogdan Dobrelya
6.0.x
Invalid
Undecided
Unassigned
Changed in fuel:
importance: Undecided → High
assignee: nobody → Bogdan Dobrelya (bogdando)
milestone: none → 6.1
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (master)

Fix proposed to branch: master
Review: https://review.openstack.org/152839

Revision history for this message
Bogdan Dobrelya (bogdando) wrote :

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

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

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
Revision history for this message
Alexander Nevenchannyy (anevenchannyy) wrote :

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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.