[Pacemaker] the behavior when deleting the attribute while DC is electing
David Vossel
dvossel at redhat.com
Thu Jun 13 18:51:13 UTC 2013
----- 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);
}
}
> Sincerely,
> Yuichi
>
More information about the Pacemaker
mailing list