Skip to content

Commit b56cfaa

Browse files
committed
Feature: scheduler: Do not differentiate the case where all the nodes have equal priority
In any cases, priority-fencing-delay won't take precedence over any configured pcmk_delay_base/max.
1 parent 435d333 commit b56cfaa

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/pengine/utils.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2337,17 +2337,17 @@ node_priority_fencing_delay(pe_node_t * node, pe_working_set_t * data_set)
23372337
GListPtr gIter = NULL;
23382338

23392339
// `priority-fencing-delay` is disabled
2340-
if (data_set->priority_fencing_delay < 0) {
2341-
return -1;
2340+
if (data_set->priority_fencing_delay <= 0) {
2341+
return 0;
23422342
}
23432343

2344-
/* No need to delay fencing if the fencing target is not a normal cluster
2344+
/* No need to request a delay if the fencing target is not a normal cluster
23452345
* member, for example if it's a remote node or a guest node. */
23462346
if (node->details->type != node_member) {
23472347
return 0;
23482348
}
23492349

2350-
// No need to delay fencing if the fencing target is in our partition
2350+
// No need to request a delay if the fencing target is in our partition
23512351
if (node->details->online) {
23522352
return 0;
23532353
}
@@ -2384,7 +2384,7 @@ node_priority_fencing_delay(pe_node_t * node, pe_working_set_t * data_set)
23842384
/* All the nodes have equal priority.
23852385
* Any configured corresponding `pcmk_delay_base/max` will be applied. */
23862386
if (lowest_priority == top_priority) {
2387-
return -1;
2387+
return 0;
23882388
}
23892389

23902390
if (node->details->priority < top_priority) {
@@ -2468,7 +2468,7 @@ pe_fence_op(pe_node_t * node, const char *op, bool optional, const char *reason,
24682468
free(op_key);
24692469
}
24702470

2471-
if (data_set->priority_fencing_delay >= 0
2471+
if (data_set->priority_fencing_delay > 0
24722472

24732473
/* It's a suitable case where `priority-fencing-delay` applies.
24742474
* At least add `priority-fencing-delay` field as an indicator. */

0 commit comments

Comments
 (0)