Gitweb:
http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=955e85a37c3...
Commit: 955e85a37c34f2d04980585789c7fe5dbe7d1bf2
Parent: 9d0ecbac1ff8ac1f045bd19bb73ca063a5351014
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Fri Jun 15 09:40:23 2012 -0400
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Fri Jun 15 09:42:26 2012 -0400
qdisk: Report non-zero exit codes from heuristic
If a heuristic failed, it was difficult to determine why.
This change allows debug logging of heuristic (or /bin/sh)
return codes so that administrators have an idea as to
what went wrong.
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
cman/qdisk/score.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/cman/qdisk/score.c b/cman/qdisk/score.c
index 3ca531f..653fdf3 100644
--- a/cman/qdisk/score.c
+++ b/cman/qdisk/score.c
@@ -215,6 +215,8 @@ check_heuristic(struct h_data *h, int block, struct timespec *now)
goto miss;
}
if (WEXITSTATUS(status) != 0) {
+ logt_print(LOG_DEBUG, "Heuristic: sh returned %d for '%s'\n",
+ WEXITSTATUS(status), h->program);
ret = 0;
goto miss;
}