File jsc#ECO-1611-0013-Feature-stonith_admin-delay-option-defaults-to-0.patch of Package pacemaker.19404

From d375eccaf0f43352d20f906d98c292758b7c394c Mon Sep 17 00:00:00 2001
From: "Gao,Yan" <ygao@suse.com>
Date: Wed, 1 Apr 2020 15:04:34 +0200
Subject: [PATCH 13/15] Feature: stonith_admin: --delay option defaults to 0

This commit also documents the current behavior in the help:

- Any static/random delays from pcmk_delay_base/max will be added to
requested fencing delay.

- A delay value -1 now means disable also any static/random fencing
delays from pcmk_delay_base/max.
---
 include/pcmki/pcmki_fence.h | 3 ++-
 fencing/admin.c       | 8 +++++---
 2 files changed, 7 insertions(+), 4 deletions(-)

Index: pacemaker-1.1.18+20180430.b12c320f5/fencing/admin.c
===================================================================
--- pacemaker-1.1.18+20180430.b12c320f5.orig/fencing/admin.c
+++ pacemaker-1.1.18+20180430.b12c320f5/fencing/admin.c
@@ -160,8 +160,10 @@ static struct crm_option long_options[]
         "\t\t\tused with most commands)."
     },
     {   "delay", required_argument, NULL, 'y',
-        "Enforced fencing delay in seconds (default -1 (disabled);\n"
-        "\t\t\twith --fence, --reboot, --unfence)."
+        "Apply a fencing delay in seconds. Any static/random delays from\n"
+        "\t\t\tpcmk_delay_base/max will be added, otherwise all\n"
+        "\t\t\tdisabled with the value -1\n"
+        "\t\t\t(default 0; with --fence, --reboot, --unfence)."
     },
     {   "as-node-id", no_argument, NULL, 'n',
         "(Advanced) The supplied node is the corosync node ID\n"
@@ -416,7 +418,7 @@ main(int argc, char **argv)
     int verbose = 0;
     int argerr = 0;
     int timeout = 120;
-    int delay = -1;
+    int delay = 0;
     int option_index = 0;
     int fence_level = 0;
     int no_connect = 0;
openSUSE Build Service is sponsored by