[Pacemaker] crm_attribte failed with Multiple attributes match

hj lee kerdosa at gmail.com
Wed Jan 13 01:31:46 UTC 2010


On Tue, Jan 12, 2010 at 2:15 PM, hj lee <kerdosa at gmail.com> wrote:

>
>
>> 2010-01-12 00:19:47.879800 copper1-cib: [4764]: debug: cib_process_xpath:
>> Processing cib_query op for //cib/status//node_state[@id='
>> copper1.dr.peach.com']//nvpair[@name='master-vmrd-res:0']
>> (/cib/status/node_state[1]/transient_attributes/instance_attributes/nvpair[3])
>> 2010-01-12 00:19:47.897835 copper1-cib:last message repeated 2 times
>> 2010-01-12 00:19:47.879870 copper1-attrd: [4766]: debug: log_data_element:
>> find_nvpair_attr: Match <xpath-query >
>> 2010-01-12 00:19:47.879892 copper1-attrd: [4766]: debug: log_data_element:
>> find_nvpair_attr: Match   <nvpair
>> id="status-copper1.dr.peach.com-master-vmrd-res:0" name="master-vmrd-res:0"
>> value="10000" />
>> 2010-01-12 00:19:47.898582 copper1-attrd:last message repeated 2 times
>> 2010-01-12 00:19:47.879938 copper1-attrd: [4766]: debug: log_data_element:
>> find_nvpair_attr: Match </xpath-query>
>> 2010-01-12 00:19:47.879958 copper1-attrd: [4766]: WARN: find_nvpair_attr:
>> Multiple attributes match name=master-vmrd-res:0
>> 2010-01-12 00:19:47.879968 copper1-attrd: [4766]: info:
>> find_nvpair_attr:   Value: 10000
>> #011(id=status-copper1.dr.peach.com-master-vmrd-res:0)
>> 2010-01-12 00:19:47.899603 copper1-attrd:last message repeated 2 times
>> 2010-01-12 00:19:47.880025 copper1-attrd: [4766]: info:
>> attrd_perform_update: Sent update -40: master-vmrd-res:0=5
>> 2010-01-12 00:19:47.880057 copper1-attrd: [4766]: ERROR:
>> attrd_cib_callback: Update -40 for master-vmrd-res:0=5 failed: Required data
>> for this CIB API call not found
>>
>>
> I suspect libxml2 is not thread-safe. And I found the following statement
> from libxml2 website(http://xmlsoft.org/threads.html).
>
> "Note that the thread safety cannot be ensured for multiple threads sharing
> the same document, the locking must be done at the application level".
>
> Is cib code a thread-safe?
>
>
Hi again,

I verified that cib is single thread, so thread-safe is not issue.  I wrote
a simple shell script that keeps read and write master score. And I dumped
cib xml to file when  xpath_search() returns multiple entries. Running this
script, this problem is easily reproducible. I run this script on both nodes
with 0 and 1(ex, cib-test.sh 0). When it returns multiple entries, it always
returns 3 of the same entriy! I checked the dumped cib xml, there was only
one entry. This is a show stopper for our product release. Would you look at
this issue seriously?

-----cib-test.sh ----
#!/bin/bash

id=$1
let count=1

while [ true ]; do
  crm_master -l reboot -r vmrd-res:$id
  crm_master -l reboot -r vmrd-res:$id -v $count
  let "count=$count+1"
  if [ $count -gt 99999 ]; then
    count=1
  fi
  sleep 1
done

Thank you very much
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20100112/aa88ef02/attachment-0002.htm>


More information about the Pacemaker mailing list