All of lore.kernel.org
 help / color / mirror / Atom feed
* lvmlockd: adopt locks always failed
@ 2017-08-07  7:23 Eric Ren
  2017-08-07 15:47 ` David Teigland
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Ren @ 2017-08-07  7:23 UTC (permalink / raw)
  To: lvm-devel

Hi David!

I'm testing "dlm + lvmlockd". Everything goes well so far, until I try 
the steps:
1. do everything to have a LV active on a shared VGs successfully;
2. kill lvmlockd on purpose;
3. restart lvmlockd with "--adopt 1".

Every time I get:
"""
Aug 07 13:09:14 tw1 lvmlockd[27299]: 1502082554 lvmlockd started
Aug 07 13:09:14 tw1 lvmlockd[27299]: 1502082554 adopt_locks failed, 
reset host
"""

After some debugging, I narrow down it here:

1.
adopt_locks()
{
...

        if (lm_support_dlm()) {
                 rv = lm_get_lockspaces_dlm(&ls_found); ====> OK.
                 if ((rv < 0) && (rv != -ECONNREFUSED))
                         goto fail;
         }

         if (lm_support_sanlock()) {
                 rv = lm_get_lockspaces_sanlock(&ls_found);       ====> 
rv gets -2
                 if ((rv < 0) && (rv != -ECONNREFUSED))
                         goto fail;
         }
...
}

2.
sanlock_get_lockspaces()
{
...
         rv = connect_socket(&fd);
         if (rv < 0)
                 return rv;                 ===> it return -2, because 
sanlock plugin is not running
...
}

The problem here seems we should not ask sanlock for left lockspaces 
when it's not running?

Thanks in advance!
Eric



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-08-09 10:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-07  7:23 lvmlockd: adopt locks always failed Eric Ren
2017-08-07 15:47 ` David Teigland
2017-08-08  2:03   ` Eric Ren
2017-08-08 14:28     ` David Teigland
2017-08-09 10:11       ` Eric Ren

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.