On Mon, Jan 11, 2010 at 9:34 PM, hj lee <kerd...@gmail.com> wrote: > > > On Mon, Jan 11, 2010 at 1:22 PM, hj lee <kerd...@gmail.com> wrote: >> >> Hi, >> >> I have a situation crm_master does not update a master score. I increased >> log level at attrd. And I found that current value is 20000 but stored value >> is 5. I don't know how attrd ends up this state. But attrd ignores this >> update, so a master score does not change at all. I think the code should >> check the stored value, not current value in memory. As long as the stored >> value is different, then it should update. Should I create a bug? >> >> Thanks >> hj >> >> >> 2010-01-11 09:37:16.425570 copper2-attrd: [4649]: debug: debug3: >> log_data_element: attrd_ipc_callback: attrd_ipc_callback <attrd_update >> t="attrd" src="crm_attribute" task="update" attr_name="master-vmrd-res:0" >> attr_value="20000" attr_section="status" attr_host="copper2" /> >> 2010-01-11 09:37:16.425602 copper2-attrd: [4649]: debug: >> attrd_local_callback: update message from crm_attribute: >> master-vmrd-res:0=20000 >> 2010-01-11 09:37:16.425611 copper2-attrd: [4649]: debug: debug2: >> find_hash_entry: #011master-vmrd-res:0->section: status >> 2010-01-11 09:37:16.425642 copper2-attrd: [4649]: debug: debug2: >> log_hash_entry: Found (and updated) entry: >> 2010-01-11 09:37:16.425651 copper2-attrd: [4649]: debug: debug2: >> log_hash_entry: Set: status >> 2010-01-11 09:37:16.425658 copper2-attrd: [4649]: debug: debug2: >> log_hash_entry: Name: master-vmrd-res:0 >> 2010-01-11 09:37:16.425667 copper2-attrd: [4649]: debug: debug2: >> log_hash_entry: Value: 20000 >> 2010-01-11 09:37:16.425699 copper2-attrd: [4649]: debug: debug2: >> log_hash_entry: Timeout: (null) >> 2010-01-11 09:37:16.425708 copper2-attrd: [4649]: debug: >> attrd_local_callback: Supplied: 20000, Current: 20000, Stored: 5 >> 2010-01-11 09:37:16.425740 copper2-attrd: [4649]: debug: debug2: >> attrd_local_callback: Ignoring non-change >> > > Hi again, > > Thanks to the pacemaker log, I could browse the source code for this issue. > The stored_value is only updated after cib_ok returned, but current is > updated to the supplied value on request before sending update to cib. So > this can cause the difference in current and stored value. The code compares > only the supplied and current value. So if the cib update fails, then it > ends up this situation! The fix will be very simple, either remove compares > it against the stored_value or update current only after cib_ok returns.
Well spotted. Just checked in: http://hg.clusterlabs.org/pacemaker/stable-1.0/rev/214f0fc258f2 _______________________________________________ Pacemaker mailing list Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker