All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Gruenbacher <agruenba@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] DLM Shutdown
Date: Wed, 10 Feb 2016 02:33:49 +0100	[thread overview]
Message-ID: <CAHc6FU58TBA2hxVjeakQZ=vyzt6-nWdvTdewE2xtSLEyJU1yXA@mail.gmail.com> (raw)

Hi Dave and Chrissie,

I recently started looking into how DLM works, with the help of
Chrissie's "Programming Locking Applications" handbook
(http://people.redhat.com/ccaulfie/docs/rhdlmbook.pdf). I didn't find
a simple way for testing DLM in a minimal setup: DLM requires
dlm_controld which depends on corosync. dlm_controld needs some sort
of membership management service and so I understand that it uses
corosync, but from a testing perspective, having something simple
would still be nice. So I started writing FakeDLM, a toy dlm_controld
substitute (https://github.com/andreas-gruenbacher/fakedlm).

This turned up a problem when shutting down DLM: dlm_controld only
shuts itself down on SIGTERM when no lockspaces exist anymore, it
never actively releases existing lockspaces. This means that as soon
as any application creates the default lockspace (via libdlm), or if
an application doesn't release any lockspaces it creates, dlm_controld
will never shut down.

It would make more sense, at least for testing purposes, to try
removing existing lockspaces and to perform a proper cleanup, though.
The only way I could find to make that happen is to do what
dlm_release_lockslace() in libdlm does though: to use
DLM_USER_REMOVE_LOCKSPACE requests. An added difficulty is that
lockspaces can be "created" with DLM_USER_CREATE_LOCKSPACE multiple
times (they are only created the first time), and only an equivalent
number of DLM_USER_REMOVE_LOCKSPACE requests will eventually remove
the lockspace.

In addition, the DLM_USER_REMOVE_LOCKSPACE requests are blocking so
they cannot be written to /dev/misc/dlm-control synchronously from the
process that handles the offline@/kernel/dlm/<lockspace_name> uevents
which the removal of a lockspace triggers for cleaning up the
lockspace configuration. Using aio_write instead has lead to lockdep
warnings and a deadlock in the kernel; I haven't found out the reason
for this problem yet, though.

Any ideas would be welcome.

Thanks,
Andreas



             reply	other threads:[~2016-02-10  1:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-10  1:33 Andreas Gruenbacher [this message]
2016-02-10 17:38 ` [Cluster-devel] DLM Shutdown David Teigland
2016-02-10 19:48   ` Andreas Gruenbacher
2016-02-10 20:18     ` David Teigland
2016-02-10 20:38       ` Andreas Gruenbacher
2016-02-10 21:16         ` David Teigland
2016-02-10 22:08           ` Andreas Gruenbacher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHc6FU58TBA2hxVjeakQZ=vyzt6-nWdvTdewE2xtSLEyJU1yXA@mail.gmail.com' \
    --to=agruenba@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.