Blob Blame History Raw
From: Andrew Beekhof <andrew@beekhof.net>
Date: Thu, 17 Sep 2015 14:43:15 +1000
Subject: [PATCH] Log: lrmd: Improved logging when no pacemaker remote authkey
 is available

(cherry picked from commit 20c2178f076ff32fdf9ba9a467c193b8dac2f9e5)
---
 lib/lrmd/lrmd_client.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/lib/lrmd/lrmd_client.c b/lib/lrmd/lrmd_client.c
index 42bdf2b..1f1ffde 100644
--- a/lib/lrmd/lrmd_client.c
+++ b/lib/lrmd/lrmd_client.c
@@ -1061,13 +1061,17 @@ lrmd_tls_set_key(gnutls_datum_t * key)
     if (set_key(key, specific_location) == 0) {
         crm_debug("Using custom authkey location %s", specific_location);
         return 0;
+
+    } else {
+        crm_err("No lrmd remote key found at %s, trying default locations", specific_location);
     }
 
-    if (set_key(key, DEFAULT_REMOTE_KEY_LOCATION)) {
+    if (set_key(key, DEFAULT_REMOTE_KEY_LOCATION) != 0) {
         rc = set_key(key, ALT_REMOTE_KEY_LOCATION);
     }
+
     if (rc) {
-        crm_err("No lrmd remote key found");
+        crm_err("No lrmd remote key found at %s", DEFAULT_REMOTE_KEY_LOCATION);
         return -1;
     }