crm_res_running doesn't check properly if a resource is running

Bug #1433377 reported by Felipe Reyes
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
hacluster (Juju Charms Collection)
Fix Released
High
Felipe Reyes

Bug Description

crm_res_running[0] doesn't work as expected, when a resource is running and the status is asked to pacemaker the output is like "resource XXX is running on: NODE-YY", so the the condition "opt_name in output" is always True, no matter the resource is running or stopped

Example using a nova-cloud-controller where res_nova_consoleauth is running, but crm_res_running doesn't detect it:

>>> import commands
>>> commands.getstatusoutput("crm resource status res_nova_consoleauth")
(0, 'resource res_nova_consoleauth is running on: juju-freyes-machine-6 ')
>>> import pcmk
>>> pcmk.crm_res_running('res_nova_consoleauth')
False

[0] http://bazaar.launchpad.net/~openstack-charmers/charms/trusty/hacluster/next/view/head:/hooks/pcmk.py#L50

Tags: cts

Related branches

Felipe Reyes (freyes)
Changed in hacluster (Juju Charms Collection):
assignee: nobody → Felipe Reyes (freyes)
status: New → In Progress
Felipe Reyes (freyes)
Changed in hacluster (Juju Charms Collection):
status: In Progress → Fix Committed
Felipe Reyes (freyes)
Changed in hacluster (Juju Charms Collection):
milestone: none → 15.04
importance: Undecided → High
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.