Blob Blame History Raw
From: Andrew Beekhof <andrew@beekhof.net>
Date: Wed, 2 Sep 2015 14:32:40 +1000
Subject: [PATCH] Fix: crmd: Choose more appropriate names for notification
 options

(cherry picked from commit 8971ef024ffebf3d0240b30e620697a7b58232c4)
---
 crmd/control.c | 12 ++++++------
 cts/CIB.py     |  4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/crmd/control.c b/crmd/control.c
index d92f46b..d1f9acd 100644
--- a/crmd/control.c
+++ b/crmd/control.c
@@ -893,12 +893,12 @@ pe_cluster_option crmd_opts[] = {
 	  "  To ensure these changes take effect, we can optionally poll the cluster's status for changes."
         },
 
-	{ "notification-script", NULL, "string", NULL, "/dev/null", &check_script,
-          "Notification script to be called after significant cluster events",
-          "Full path to a script that will be invoked when resources start/stop/fail, fencing occurs or nodes join/leave the cluster.\n"
+	{ "notification-agent", NULL, "string", NULL, "/dev/null", &check_script,
+          "Notification script or tool to be called after significant cluster events",
+          "Full path to a script or binary that will be invoked when resources start/stop/fail, fencing occurs or nodes join/leave the cluster.\n"
           "Must exist on all nodes in the cluster."
         },
-	{ "notification-target", NULL, "string", NULL, "", NULL,
+	{ "notification-recipient", NULL, "string", NULL, "", NULL,
           "Destination for notifications (Optional)",
           "Where should the supplied script send notifications to.  Useful to avoid hard-coding this in the script."
         },
@@ -992,8 +992,8 @@ config_query_callback(xmlNode * msg, int call_id, int rc, xmlNode * output, void
 
     verify_crmd_options(config_hash);
 
-    script = crmd_pref(config_hash, "notification-script");
-    value  = crmd_pref(config_hash, "notification-target");
+    script = crmd_pref(config_hash, "notification-agent");
+    value  = crmd_pref(config_hash, "notification-recipient");
     crmd_enable_notifications(script, value);
 
     value = crmd_pref(config_hash, XML_CONFIG_ATTR_DC_DEADTIME);
diff --git a/cts/CIB.py b/cts/CIB.py
index cd3a6a1..0933ccd 100644
--- a/cts/CIB.py
+++ b/cts/CIB.py
@@ -219,8 +219,8 @@ class CIB11(ConfigBase):
         o["dc-deadtime"] = "5s"
         o["no-quorum-policy"] = no_quorum
         o["expected-quorum-votes"] = self.num_nodes
-        o["notification-script"] = "/var/lib/pacemaker/notify.sh"
-        o["notification-target"] = "/var/lib/pacemaker/notify.log"
+        o["notification-agent"] = "/var/lib/pacemaker/notify.sh"
+        o["notification-recipient"] = "/var/lib/pacemaker/notify.log"
 
         if self.CM.Env["DoBSC"] == 1:
             o["ident-string"] = "Linux-HA TEST configuration file - REMOVEME!!"