Blame SOURCES/bz1078078-pcmk-crmd_report_unsuccessful_unfencing_operations.patch

7ebc05
commit 2a8e1620b6a224905d6cb4e9bc444c957a85f946
7ebc05
Author: Andrew Beekhof <andrew@beekhof.net>
7ebc05
Date:   Wed Apr 9 12:17:25 2014 +1000
7ebc05
7ebc05
    Fix: crmd: Report unsuccessful unfencing operations
7ebc05
    
7ebc05
    (cherry picked from commit 32f6349100e85b6a48dac01a80c967bc0134d165)
7ebc05
7ebc05
diff --git a/crmd/te_utils.c b/crmd/te_utils.c
7ebc05
index 60dd21c..b2003ba 100644
7ebc05
--- a/crmd/te_utils.c
7ebc05
+++ b/crmd/te_utils.c
7ebc05
@@ -124,8 +124,15 @@ tengine_stonith_notify(stonith_t * st, stonith_event_t * st_event)
7ebc05
     }
7ebc05
 
7ebc05
     if (st_event->result == pcmk_ok && safe_str_eq("on", st_event->action)) {
7ebc05
-        crm_notice("%s was successfully unfenced by %s for %s with %s",
7ebc05
-                   st_event->executioner, st_event->origin, st_event->device);
7ebc05
+        crm_notice("%s was successfully unfenced by %s (at the request of %s) with %s",
7ebc05
+                   st_event->target, st_event->executioner, st_event->origin,
7ebc05
+                   st_event->device); /* TODO: Why is device never set? */
7ebc05
+        return;
7ebc05
+
7ebc05
+    } else if (safe_str_eq("on", st_event->action)) {
7ebc05
+        crm_err("Unfencing of %s by %s with %s failed: %s (%d)",
7ebc05
+                st_event->target, st_event->executioner, st_event->device,
7ebc05
+                pcmk_strerror(st_event->result), st_event->result);
7ebc05
         return;
7ebc05
 
7ebc05
     } else if (st_event->result == pcmk_ok && crm_str_eq(st_event->target, fsa_our_uname, TRUE)) {