Skip to content

Commit aec6c7e

Browse files
committed
Feature: stonith_admin: --delay option defaults to 0
This commit also documents the current behavior in the help: - Requested fencing delay combines with any static/random delays from pcmk_delay_base/max. - A delay value -1 now means disable also any static/random fencing delays from pcmk_delay_base/max.
1 parent 10de2e7 commit aec6c7e

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

include/pcmki/pcmki_fence.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
* \param[in] tolerance If a successful action for \p target happened within
2727
* this many ms, return 0 without performing the action
2828
* again.
29-
* \param[in] delay Enforce a fencing delay. Value -1 means disabled.
29+
* \param[in] delay Apply a fencing delay. Value -1 means disable also any
30+
* static/random fencing delays from pcmk_delay_base/max
3031
*
3132
* \return Standard Pacemaker return code
3233
*/

tools/stonith_admin.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ struct {
7171
char *unregister_level;
7272
} options = {
7373
.timeout = 120,
74-
.delay = -1
74+
.delay = 0
7575
};
7676

7777
gboolean add_env_params(const gchar *option_name, const gchar *optarg, gpointer data, GError **error);
@@ -208,8 +208,10 @@ static GOptionEntry addl_entries[] = {
208208
INDENT "used with most commands).",
209209
"SECONDS" },
210210
{ "delay", 'y', 0, G_OPTION_ARG_INT, &options.delay,
211-
"Enforced fencing delay in seconds (default -1 (disabled);\n"
212-
INDENT "with --fence, --reboot, --unfence).",
211+
"Apply a fencing delay in seconds. Any static/random delays from\n"
212+
INDENT "pcmk_delay_base/max will be combined, otherwise all\n"
213+
INDENT "disabled with the value -1\n"
214+
INDENT "(default 0; with --fence, --reboot, --unfence).",
213215
"SECONDS" },
214216
{ "as-node-id", 'n', 0, G_OPTION_ARG_NONE, &options.as_nodeid,
215217
"(Advanced) The supplied node is the corosync node ID\n"

0 commit comments

Comments
 (0)