Skip to content

Commit 1e6cfb8

Browse files
committed
Feature: controller: request fencing with any enforced priority fencing delay
1 parent f841bb7 commit 1e6cfb8

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

daemons/controld/controld_fencing.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,7 @@ te_fence_node(crm_graph_t *graph, crm_action_t *action)
815815
const char *target = NULL;
816816
const char *type = NULL;
817817
char *transition_key = NULL;
818+
const char *priority_delay = NULL;
818819
gboolean invalid_action = FALSE;
819820
enum stonith_call_options options = st_opt_none;
820821

@@ -833,9 +834,11 @@ te_fence_node(crm_graph_t *graph, crm_action_t *action)
833834
return FALSE;
834835
}
835836

837+
priority_delay = crm_meta_value(action->params, XML_CONFIG_ATTR_PRIORITY_FENCING_DELAY);
838+
836839
crm_notice("Requesting fencing (%s) of node %s "
837-
CRM_XS " action=%s timeout=%u",
838-
type, target, id, transition_graph->stonith_timeout);
840+
CRM_XS " action=%s timeout=%u priority_delay=%s",
841+
type, target, id, transition_graph->stonith_timeout, priority_delay);
839842

840843
/* Passing NULL means block until we can connect... */
841844
te_connect_stonith(NULL);
@@ -844,9 +847,9 @@ te_fence_node(crm_graph_t *graph, crm_action_t *action)
844847
options |= st_opt_allow_suicide;
845848
}
846849

847-
rc = stonith_api->cmds->fence(stonith_api, options, target, type,
848-
(int) (transition_graph->stonith_timeout / 1000),
849-
0);
850+
rc = stonith_api->cmds->fence_with_delay(stonith_api, options, target, type,
851+
(int) (transition_graph->stonith_timeout / 1000),
852+
0, crm_atoi(priority_delay, "-1"));
850853

851854
transition_key = pcmk__transition_key(transition_graph->id, action->id, 0,
852855
te_uuid),

0 commit comments

Comments
 (0)