From 09c792c20667aa8d7fb2799e484d913a5eb8a147 Mon Sep 17 00:00:00 2001 From: David Teigland Date: Tue, 29 Aug 2017 15:18:12 -0500 Subject: [PATCH] lvmlockd: fix check for no running lock manager In some cases it was reporting there was no running lock manager when there is. --- daemons/lvmlockd/lvmlockd-core.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/daemons/lvmlockd/lvmlockd-core.c b/daemons/lvmlockd/lvmlockd-core.c index f9d07c151..a92114048 100644 --- a/daemons/lvmlockd/lvmlockd-core.c +++ b/daemons/lvmlockd/lvmlockd-core.c @@ -3676,7 +3676,17 @@ static int client_send_result(struct client *cl, struct action *act) if (!gl_lsname_dlm[0]) strcat(result_flags, "NO_GL_LS,"); } else { - strcat(result_flags, "NO_GL_LS,NO_LM"); + int found_lm = 0; + + if (lm_support_dlm() && lm_is_running_dlm()) + found_lm++; + if (lm_support_sanlock() && lm_is_running_sanlock()) + found_lm++; + + if (!found_lm) + strcat(result_flags, "NO_GL_LS,NO_LM"); + else + strcat(result_flags, "NO_GL_LS"); } } -- 2.43.5