Skip to content

Commit

Permalink
Merge pull request #73 from wenningerk/check_pcmk_graceful_exit
Browse files Browse the repository at this point in the history
Fix: sbd-pacemaker: bail out of status earlier
  • Loading branch information
wenningerk authored Mar 26, 2019
2 parents 909d6e1 + 79b778d commit c38c5e6
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/sbd-pacemaker.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ compute_status(pe_working_set_t * data_set)
static int updates = 0;
static int ever_had_quorum = FALSE;

node_t *node = pe_find_node(data_set->nodes, local_uname);
node_t *node = NULL;

updates++;

Expand All @@ -286,11 +286,15 @@ compute_status(pe_working_set_t * data_set)
return;
}

node = pe_find_node(data_set->nodes, local_uname);

if (node == NULL) {
if ((node == NULL) || (node->details == NULL)) {
set_servant_health(pcmk_health_unknown, LOG_WARNING, "Node state: %s is UNKNOWN", local_uname);
notify_parent();
return;
}

} else if (node->details->online == FALSE) {
if (node->details->online == FALSE) {
set_servant_health(pcmk_health_unknown, LOG_WARNING, "Node state: OFFLINE");

} else if (node->details->unclean) {
Expand Down

0 comments on commit c38c5e6

Please sign in to comment.