dff8d99
From: Andrew Beekhof <andrew@beekhof.net>
dff8d99
Date: Wed, 2 Sep 2015 14:32:40 +1000
dff8d99
Subject: [PATCH] Fix: crmd: Choose more appropriate names for notification
dff8d99
 options
dff8d99
dff8d99
(cherry picked from commit 8971ef024ffebf3d0240b30e620697a7b58232c4)
dff8d99
---
dff8d99
 crmd/control.c | 12 ++++++------
dff8d99
 cts/CIB.py     |  4 ++--
dff8d99
 2 files changed, 8 insertions(+), 8 deletions(-)
dff8d99
dff8d99
diff --git a/crmd/control.c b/crmd/control.c
dff8d99
index d92f46b..d1f9acd 100644
dff8d99
--- a/crmd/control.c
dff8d99
+++ b/crmd/control.c
dff8d99
@@ -893,12 +893,12 @@ pe_cluster_option crmd_opts[] = {
dff8d99
 	  "  To ensure these changes take effect, we can optionally poll the cluster's status for changes."
dff8d99
         },
dff8d99
 
dff8d99
-	{ "notification-script", NULL, "string", NULL, "/dev/null", &check_script,
dff8d99
-          "Notification script to be called after significant cluster events",
dff8d99
-          "Full path to a script that will be invoked when resources start/stop/fail, fencing occurs or nodes join/leave the cluster.\n"
dff8d99
+	{ "notification-agent", NULL, "string", NULL, "/dev/null", &check_script,
dff8d99
+          "Notification script or tool to be called after significant cluster events",
dff8d99
+          "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"
dff8d99
           "Must exist on all nodes in the cluster."
dff8d99
         },
dff8d99
-	{ "notification-target", NULL, "string", NULL, "", NULL,
dff8d99
+	{ "notification-recipient", NULL, "string", NULL, "", NULL,
dff8d99
           "Destination for notifications (Optional)",
dff8d99
           "Where should the supplied script send notifications to.  Useful to avoid hard-coding this in the script."
dff8d99
         },
dff8d99
@@ -992,8 +992,8 @@ config_query_callback(xmlNode * msg, int call_id, int rc, xmlNode * output, void
dff8d99
 
dff8d99
     verify_crmd_options(config_hash);
dff8d99
 
dff8d99
-    script = crmd_pref(config_hash, "notification-script");
dff8d99
-    value  = crmd_pref(config_hash, "notification-target");
dff8d99
+    script = crmd_pref(config_hash, "notification-agent");
dff8d99
+    value  = crmd_pref(config_hash, "notification-recipient");
dff8d99
     crmd_enable_notifications(script, value);
dff8d99
 
dff8d99
     value = crmd_pref(config_hash, XML_CONFIG_ATTR_DC_DEADTIME);
dff8d99
diff --git a/cts/CIB.py b/cts/CIB.py
dff8d99
index cd3a6a1..0933ccd 100644
dff8d99
--- a/cts/CIB.py
dff8d99
+++ b/cts/CIB.py
dff8d99
@@ -219,8 +219,8 @@ class CIB11(ConfigBase):
dff8d99
         o["dc-deadtime"] = "5s"
dff8d99
         o["no-quorum-policy"] = no_quorum
dff8d99
         o["expected-quorum-votes"] = self.num_nodes
dff8d99
-        o["notification-script"] = "/var/lib/pacemaker/notify.sh"
dff8d99
-        o["notification-target"] = "/var/lib/pacemaker/notify.log"
dff8d99
+        o["notification-agent"] = "/var/lib/pacemaker/notify.sh"
dff8d99
+        o["notification-recipient"] = "/var/lib/pacemaker/notify.log"
dff8d99
 
dff8d99
         if self.CM.Env["DoBSC"] == 1:
dff8d99
             o["ident-string"] = "Linux-HA TEST configuration file - REMOVEME!!"