All of lore.kernel.org
 help / color / mirror / Atom feed
* Deadlock on "systemctl daemon-reload" when using socket based lvmetad activation.
@ 2014-02-19 20:14 Andrey Borzenkov
  2014-02-20  8:36 ` Peter Rajnoha
  0 siblings, 1 reply; 4+ messages in thread
From: Andrey Borzenkov @ 2014-02-19 20:14 UTC (permalink / raw)
  To: lvm-devel

I tried to enable pure socket based activation of lvmetad (i.e. start
only lvmetad.socket without lvmetad.service). This resulted in
interesting deadlock. generator tries to connect to lvmetad if
use_lvmetad=1 (implicitly as part of lvm_init()). During initial run on
boot socket does not yet exist, so nothing bad happens. Now as long as
there is no LVM configuration on a host and no LVM activity, lvmetad is
also not started. If in this state "systemctl daemon-reload" is called
(which is also implicitly done when enabling/disabling services)
generators are run and LVM generator tries to contact lvmetad. Now
socket *does* exist (it was created when lvmetad.socket was started)
but systemd does not yet process incoming socket connections. So we
have systemd waiting for generators to finish and generator waiting for
systemd to accept socket connection request ...

Details are in https://bugzilla.novell.com/show_bug.cgi?id=862076#c44
and following comment.

It seems that full lvm_init() is rather overkill in this case;
generators are supposed to be as lightweight as possible. Is there any
way to only parse configuration without doing full initialization?

Always starting lvmetad really defeats the idea of socket activation
(do not start process until needed) and does not fully eliminate the
problem (consider lvmetad crashing in the wrong moment).



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

end of thread, other threads:[~2014-02-20 16:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-19 20:14 Deadlock on "systemctl daemon-reload" when using socket based lvmetad activation Andrey Borzenkov
2014-02-20  8:36 ` Peter Rajnoha
2014-02-20  9:23   ` Peter Rajnoha
2014-02-20 16:30     ` Andrey Borzenkov

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.