[Pacemaker] [Problem] The "dampen" parameter of the attrd_updater command is ignored, and an attribute is updated.
Andrew Beekhof
andrew at beekhof.net
Wed May 28 06:42:28 UTC 2014
On 28 May 2014, at 4:36 pm, renayama19661014 at ybb.ne.jp wrote:
> Hi Andrew,
>
>> Perhaps try:
>>
>> diff --git a/attrd/commands.c b/attrd/commands.c
>> index 7f1b4b0..7342e23 100644
>> --- a/attrd/commands.c
>> +++ b/attrd/commands.c
>> @@ -464,6 +464,15 @@ attrd_peer_update(crm_node_t *peer, xmlNode *xml, bool filter)
>>
>> a->changed |= changed;
>>
>> + if(changed) {
>> + if(a->timer) {
>> + crm_trace("Delayed write out (%dms) for %s", a->timeout_ms, a->id);
>> + mainloop_timer_start(a->timer);
>> + } else {
>> + write_or_elect_attribute(a);
>> + }
>> + }
>> +
>> /* this only involves cluster nodes. */
>> if(v->nodeid == 0 && (v->is_remote == FALSE)) {
>> if(crm_element_value_int(xml, F_ATTRD_HOST_ID, (int*)&v->nodeid) == 0) {
>> @@ -476,15 +485,6 @@ attrd_peer_update(crm_node_t *peer, xmlNode *xml, bool filter)
>> }
>> }
>> }
>> -
>> - if(changed) {
>> - if(a->timer) {
>> - crm_trace("Delayed write out (%dms) for %s", a->timeout_ms, a->id);
>> - mainloop_timer_start(a->timer);
>> - } else {
>> - write_or_elect_attribute(a);
>> - }
>> - }
>> }
>>
>> void
>
> Okay!
> I confirm movement.
"movement" == it works as expected now? or that you're going to check :)
>
> Many Thanks!
> Hideo Yamauchi.
>
> --- On Wed, 2014/5/28, Andrew Beekhof <andrew at beekhof.net> wrote:
>
>>
>> On 28 May 2014, at 4:10 pm, Andrew Beekhof <andrew at beekhof.net> wrote:
>>
>>>
>>> On 28 May 2014, at 3:04 pm, renayama19661014 at ybb.ne.jp wrote:
>>>
>>>> Hi Andrew,
>>>>
>>>>>> I'd expect that block to hit this clause though:
>>>>>>
>>>>>> } else if(mainloop_timer_running(a->timer)) {
>>>>>> crm_info("Write out of '%s' delayed: timer is running", a->id);
>>>>>> return;
>>>>>
>>>>> Which point of the source code does the suggested code mentioned above revise?
>>>>> (Which line of the source code is it?)
>>>>
>>>> Is it the next cord that you pointed?
>>>
>>> right
>>>
>>>>
>>>> void
>>>> write_attribute(attribute_t *a)
>>>> {
>>>> int updates = 0;
>>>> (snip)
>>>> } else if(mainloop_timer_running(a->timer)) {
>>>> crm_info("Write out of '%s' delayed: timer is running", a->id);
>>>> return;
>>>> }
>>>> (snip)
>>>>
>>>> At the time of phenomenon of the problem, the timer does not yet block it by this processing because it does not start.
>>>
>>> Thats the curious part
>>
>> Perhaps try:
>>
>> diff --git a/attrd/commands.c b/attrd/commands.c
>> index 7f1b4b0..7342e23 100644
>> --- a/attrd/commands.c
>> +++ b/attrd/commands.c
>> @@ -464,6 +464,15 @@ attrd_peer_update(crm_node_t *peer, xmlNode *xml, bool filter)
>>
>> a->changed |= changed;
>>
>> + if(changed) {
>> + if(a->timer) {
>> + crm_trace("Delayed write out (%dms) for %s", a->timeout_ms, a->id);
>> + mainloop_timer_start(a->timer);
>> + } else {
>> + write_or_elect_attribute(a);
>> + }
>> + }
>> +
>> /* this only involves cluster nodes. */
>> if(v->nodeid == 0 && (v->is_remote == FALSE)) {
>> if(crm_element_value_int(xml, F_ATTRD_HOST_ID, (int*)&v->nodeid) == 0) {
>> @@ -476,15 +485,6 @@ attrd_peer_update(crm_node_t *peer, xmlNode *xml, bool filter)
>> }
>> }
>> }
>> -
>> - if(changed) {
>> - if(a->timer) {
>> - crm_trace("Delayed write out (%dms) for %s", a->timeout_ms, a->id);
>> - mainloop_timer_start(a->timer);
>> - } else {
>> - write_or_elect_attribute(a);
>> - }
>> - }
>> }
>>
>> void
>>
>>
>>
>>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20140528/deee5ab5/attachment-0004.sig>
More information about the Pacemaker
mailing list