[Pacemaker] the behavior when deleting the attribute while DC is electing

Yuichi SEINO seino.cluster2 at gmail.com
Sun Jun 16 20:50:23 EDT 2013


Hi,

Thanks for fixing. I checked this patch in pacemaker.
https://github.com/ClusterLabs/pacemaker/commit/dbfbc353aacd21faf59947f1e67d82ebe21608f8

Sincerely,
Yuichi

2013/6/14 Yuichi SEINO <seino.cluster2 at gmail.com>:
> Hi,
>
> 2013/6/14 David Vossel <dvossel at redhat.com>:
>>
>>
>>
>>
>> ----- Original Message -----
>>> From: "Yuichi SEINO" <seino.cluster2 at gmail.com>
>>> To: "The Pacemaker cluster resource manager" <pacemaker at oss.clusterlabs.org>
>>> Sent: Thursday, June 13, 2013 6:29:37 AM
>>> Subject: [Pacemaker] the behavior when deleting the attribute while DC is     electing
>>>
>>> Hi,
>>>
>>> I have a question.
>>> When the attribute is updated while DC is electing, the attribute is
>>> refreshed after the electing DC finished. However, when the attribute
>>> is deleted while DC is electing, the attribute failed to be refreshed.
>>> So,  the attribute remain the old value. Are you correct about this?
>>>
>>> I looked at attrd.c. When the attribute is refreshed, the following
>>> function is called.
>>> If the attribute is deleted, then entry->value is NULL. Therefore, the
>>> attribute isn't refreshed.
>>>
>>> update_for_hash_entry(gpointer key, gpointer value, gpointer user_data)
>>> {
>>>     attr_hash_entry_t *entry = value;
>>>
>>>     if (entry->value != NULL) {
>>>         attrd_timer_callback(value);
>>>     }
>>> }
>>
>> ah, does this fix it?
>>
>> diff --git a/tools/attrd.c b/tools/attrd.c
>> index 1e834ea..48e9c39 100644
>> --- a/tools/attrd.c
>> +++ b/tools/attrd.c
>> @@ -405,7 +405,7 @@ update_for_hash_entry(gpointer key, gpointer value, gpointer user_data)
>>  {
>>      attr_hash_entry_t *entry = value;
>>
>> -    if (entry->value != NULL) {
>> +    if (entry->value != NULL || entry->stored_value != NULL) {
>>          attrd_timer_callback(value);
>>      }
>>  }
>>
>
> I tested this patch. I could get the expected result.
> the attribute is refreshed when deleting.
>
> Sincerely,
> Yuichi
>
>>
>>
>>> Sincerely,
>>> Yuichi
>>
>>>
>>
>> _______________________________________________
>> Pacemaker mailing list: Pacemaker at 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://bugs.clusterlabs.org
>
>
>
> --
> Yuichi SEINO
> METROSYSTEMS CORPORATION
> E-mail:seino.cluster2 at gmail.com



--
Yuichi SEINO
METROSYSTEMS CORPORATION
E-mail:seino.cluster2 at gmail.com




More information about the Pacemaker mailing list