>>> On 3/9/2011 at 07:51 PM, Lars Ellenberg <lars.ellenb...@linbit.com> wrote: > On Wed, Mar 09, 2011 at 09:42:49AM +0100, Andrew Beekhof wrote: > > I had http://hg.clusterlabs.org/pacemaker/1.1/raw-file/tip/xml/crm.xsl > > doing something similar. > > Agree its an interesting capability, haven't found much practical use > > for it yet though. > > > > Happy to put it in the extras directory though :-) > > Fine with me. > Then at least it does not get lost. > > How to figure out from the cib > pacemakers idea of the current status (and location) of a resource? > Look at the most-recent lrm_rsc_op, and it's result? Pretty much. For all the gory details, read unpack_rsc_op() in pacemaker/lib/pengine/unpack.c. But it (more or less) comes down to:
- For each node, sort the ops in order of descending call ID. - The most recent op and rc on each node (highest call ID) tells you the state of the resource on that node. Regards, Tim -- Tim Serong <tser...@novell.com> Senior Clustering Engineer, OPS Engineering, Novell Inc. _______________________________________________ Pacemaker mailing list: Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker