Skip to content

Commit c38c5e6

Browse files
authored
Merge pull request #73 from wenningerk/check_pcmk_graceful_exit
Fix: sbd-pacemaker: bail out of status earlier
2 parents 909d6e1 + 79b778d commit c38c5e6

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/sbd-pacemaker.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ compute_status(pe_working_set_t * data_set)
276276
static int updates = 0;
277277
static int ever_had_quorum = FALSE;
278278

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

281281
updates++;
282282

@@ -286,11 +286,15 @@ compute_status(pe_working_set_t * data_set)
286286
return;
287287
}
288288

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

290-
if (node == NULL) {
291+
if ((node == NULL) || (node->details == NULL)) {
291292
set_servant_health(pcmk_health_unknown, LOG_WARNING, "Node state: %s is UNKNOWN", local_uname);
293+
notify_parent();
294+
return;
295+
}
292296

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

296300
} else if (node->details->unclean) {

0 commit comments

Comments
 (0)