----- Original Message -----
> From: "Yuichi SEINO" <seino.clust...@gmail.com>
> To: "The Pacemaker cluster resource manager" <pacemaker@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

> 

_______________________________________________
Pacemaker mailing list: Pacemaker@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

Reply via email to