1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

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.
This commit is contained in:
David Teigland 2017-08-07 10:37:22 -05:00
parent fe423ef583
commit 568c7ed6f1
2 changed files with 5 additions and 7 deletions

View File

@ -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.

View File

@ -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;
}