src/main.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 1f3145388ffedb4f1ee0913832694f01664bb50c
Author: David Teigland <teigland(a)redhat.com>
Date: Fri Mar 6 11:08:30 2015 -0600
sanlock: no error when inquire finds no pid
sanlock_inquire() can be used to check if a pid is
registered, in which case it's expected to not find
the pid sometimes, so don't spam the logs with an error.
diff --git a/src/main.c b/src/main.c
index cfd7f42..4f7ea84 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1047,8 +1047,11 @@ static void process_cmd_thread_registered(int ci_in, struct sm_header *h_recv)
break;
}
if (ci_target < 0) {
- log_error("cmd %d target pid %d not found",
- h_recv->cmd, h_recv->data2);
+ if (h_recv->cmd != SM_CMD_INQUIRE) {
+ /* inquire can be used to check if a pid exists */
+ log_error("cmd %d target pid %d not found",
+ h_recv->cmd, h_recv->data2);
+ }
result = -ESRCH;
goto fail;
}