Permalink
Browse files

High: crmd: Also purge fencing results when we enter S_NOT_DC

The prevents us from prematurely erasing a node's status section and
starting resources in more than one location.

Sequence:

- Node A is DC
- Node A is fenced
- Node B becomes DC
- Node A returns
- Node B shuts down
- Node C becomes DC
- Node C incorrectly clears out Node A's status section
- Node C starts services that are already active on Node A
  - Because we tell the PE Node A is safely stopped when it isn't
  • Loading branch information...
beekhof committed Mar 20, 2012
1 parent 4d3c222 commit 227349466c8393d4f659a13ed6f0f4c8fdade04e
Showing with 10 additions and 0 deletions.
  1. +10 −0 crmd/election.c
View
@@ -497,6 +497,7 @@ do_dc_takeover(long long action,
char *target = gIter->data;
const char *uuid = get_uuid(target);
+ crm_notice("Marking %s, target of a previous stonith action, as clean", target);
send_stonith_update(NULL, target, uuid);
crm_free(target);
}
@@ -543,9 +544,18 @@ do_dc_release(long long action,
enum crmd_fsa_input current_input, fsa_data_t * msg_data)
{
if (action & A_DC_RELEASE) {
+ GListPtr gIter = NULL;
crm_debug("Releasing the role of DC");
clear_bit_inplace(fsa_input_register, R_THE_DC);
+ for (gIter = stonith_cleanup_list; gIter != NULL; gIter = gIter->next) {
+ char *target = gIter->data;
+ crm_debug("Purging %s from stonith cleanup list", target);
+ crm_free(target);
+ }
+ g_list_free(stonith_cleanup_list);
+ stonith_cleanup_list = NULL;
+
} else if (action & A_DC_RELEASED) {
crm_info("DC role released");
#if 0

0 comments on commit 2273494

Please sign in to comment.