Blame SOURCES/pacemaker-fix_crmd_correcty_update_the_history_cache_when_recurring_ops_change_their_return_code.patch
|
|
ed0026 |
commit 7a0a6f877a30397377cf3304519e0a9ae51980b7
|
|
|
ed0026 |
Author: Andrew Beekhof <andrew@beekhof.net>
|
|
|
ed0026 |
Date: Wed Aug 7 13:50:52 2013 +1000
|
|
|
ed0026 |
|
|
|
ed0026 |
Fix: crmd: Correcty update the history cache when recurring ops change their return code
|
|
|
ed0026 |
|
|
|
ed0026 |
diff --git a/crmd/lrm.c b/crmd/lrm.c
|
|
|
ed0026 |
index d158973..2e17488 100644
|
|
|
ed0026 |
--- a/crmd/lrm.c
|
|
|
ed0026 |
+++ b/crmd/lrm.c
|
|
|
ed0026 |
@@ -200,6 +200,19 @@ update_history_cache(lrm_state_t * lrm_state, lrmd_rsc_info_t * rsc, lrmd_event_
|
|
|
ed0026 |
}
|
|
|
ed0026 |
|
|
|
ed0026 |
if (op->interval > 0) {
|
|
|
ed0026 |
+ GListPtr iter = NULL;
|
|
|
ed0026 |
+
|
|
|
ed0026 |
+ for(iter = entry->recurring_op_list; iter; iter = iter->next) {
|
|
|
ed0026 |
+ lrmd_event_data_t *o = iter->data;
|
|
|
ed0026 |
+
|
|
|
ed0026 |
+ /* op->rsc_id is implied */
|
|
|
ed0026 |
+ if(op->interval == o->interval && strcmp(op->op_type, o->op_type) == 0) {
|
|
|
ed0026 |
+ crm_trace("Removing existing recurring op entry: %s_%s_%d", op->rsc_id, op->op_type, op->interval);
|
|
|
ed0026 |
+ entry->recurring_op_list = g_list_remove(entry->recurring_op_list, o);
|
|
|
ed0026 |
+ break;
|
|
|
ed0026 |
+ }
|
|
|
ed0026 |
+ }
|
|
|
ed0026 |
+
|
|
|
ed0026 |
crm_trace("Adding recurring op: %s_%s_%d", op->rsc_id, op->op_type, op->interval);
|
|
|
ed0026 |
entry->recurring_op_list = g_list_prepend(entry->recurring_op_list, lrmd_copy_event(op));
|
|
|
ed0026 |
|