[Pacemaker] reliable way to cib SEGFAULT -- how is cibadmin -Q --xpath supposed to work?

Andrew Beekhof andrew at beekhof.net
Thu Jun 4 09:58:04 EDT 2009


On Thu, Jun 4, 2009 at 1:33 PM, Lars Ellenberg
<lars.ellenberg at linbit.com> wrote:
> On Wed, Jun 03, 2009 at 10:45:41PM +0200, Andrew Beekhof wrote:
>> fixed:
>>    http://hg.clusterlabs.org/pacemaker/stable-1.0/rev/cf478ed1269f
>
> thanks.
> though that simply returns the parent XML_ELEMENT_NODE,
> which makes both
> '//primitive[@type="IPaddr2" and instance_attributes/nvpair[@name = "ip" and @value="10.0.0.1"]]' and
> '//primitive[@type="IPaddr2" and instance_attributes/nvpair[@name = "ip" and @value="10.0.0.1"]]/@id'
> return the same, namely the full primitive xml:
>       <primitive class="ocf" id="ip_try3" provider="heartbeat" type="IPaddr2">
>         <instance_attributes id="ip_try3-instance_attributes">
>           <nvpair id="ip_try3-instance_attributes-ip" name="ip" value="10.0.0.1"/>
>         </instance_attributes>
>       </primitive>
>
> where I would have liked the ..../@id to only spit out
>        ip_try3
>
> current workaround is obviously
>  | sed -ne '1 { s/^<.* id="\([^"]*\)".*>$/\1/p; };q'
>
> but "it would be nice..."

yeah, alas everything between the xpath result and the screen was
built for element nodes.
i guess cibadmin could reapply the xpath expression to the result it
got from the cluster.
that could work.

> hm. maybe I can hack something there myself.

if you happened to write a patch for the above i'd be sure to include it :-)



More information about the Pacemaker mailing list