diff options
author | David Teigland <teigland@redhat.com> | 2017-08-07 10:37:22 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2017-08-07 10:45:59 -0500 |
commit | 568c7ed6f1a1df23b9843a54b0bc53816ac5f621 (patch) | |
tree | 2fd96e24422c1104f38cf84fc8d8338646ac05a1 | |
parent | fe423ef583a48ca0f780156ec5f1fe33716318ad (diff) | |
download | lvm2-568c7ed6f1a1df23b9843a54b0bc53816ac5f621.tar.gz |
lvmlockd: fix lm running check during adoption
When trying to adopt locks in startup, we want to ignore
a lock manager that isn't running, not fail.
-rw-r--r-- | WHATS_NEW | 1 | ||||
-rw-r--r-- | daemons/lvmlockd/lvmlockd-core.c | 11 |
2 files changed, 5 insertions, 7 deletions
@@ -1,5 +1,6 @@ Version 2.02.174 - ================================= + Fix lvmlockd check for running lock managers during lock adoption. Add --withgeneralpreamble and --withlocalpreamble to lvmconfig. Improve makefiles' linking. Fix some paths in generated makefiles to respected configured settings. diff --git a/daemons/lvmlockd/lvmlockd-core.c b/daemons/lvmlockd/lvmlockd-core.c index 867e3caad..5f08bbfdf 100644 --- a/daemons/lvmlockd/lvmlockd-core.c +++ b/daemons/lvmlockd/lvmlockd-core.c @@ -5176,20 +5176,17 @@ static void adopt_locks(void) * Get list of lockspaces from lock managers. * Get list of VGs from lvmetad with a lockd type. * Get list of active lockd type LVs from /dev. - * - * ECONNREFUSED means the lock manager is not running. - * This is expected for at least one of them. */ - if (lm_support_dlm()) { + if (lm_support_dlm() && lm_is_running_dlm()) { rv = lm_get_lockspaces_dlm(&ls_found); - if ((rv < 0) && (rv != -ECONNREFUSED)) + if (rv < 0) goto fail; } - if (lm_support_sanlock()) { + if (lm_support_sanlock() && lm_is_running_sanlock()) { rv = lm_get_lockspaces_sanlock(&ls_found); - if ((rv < 0) && (rv != -ECONNREFUSED)) + if (rv < 0) goto fail; } |