All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dmeventd -R (restart; BZ 454618)
@ 2010-10-05 10:45 Petr Rockai
  2010-10-05 12:54 ` ejt
  2010-10-05 21:31 ` Jonathan Brassow
  0 siblings, 2 replies; 8+ messages in thread
From: Petr Rockai @ 2010-10-05 10:45 UTC (permalink / raw)
  To: lvm-devel

Hi,

the attached patch implements dmeventd -R, which allows us to restart
dmeventd without losing the monitoring state. The version that is
already running needs to support a (new) "get status" command for this
to work. This means that upgrade scripts can't use dmeventd -R if they
are upgrading from a version that does not provide this mechanism,
without losing the monitoring status.

I believe a reasonable solution (for upgrades) is to:

- check the existing version of dmeventd
- if new, use dmeventd -R
- if old, kill dmeventd, start the new one and enable monitoring for all
  devices in the system

IIRC, RPM provides the version number of the package you are upgrading
from to the post-installation script, which would make the above fairly
easy. If no, you can run dmeventd -V in pre-install (and store it
somewhere) and use that in the post-install to decide what to do.

The patch provides an automated test for the -R functionality, in
test/t-dmeventd-restart.sh.

Yours,
   Petr.

PS: The other option is to just use dmeventd -R unconditionally. It
should fail if the running dmeventd is too old, but should not cause any
other harm. This needs some extra testing, though.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dmeventd-restart.diff
Type: text/x-diff
Size: 11496 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20101005/64d94e12/attachment.bin>

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

end of thread, other threads:[~2010-10-19 15:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-05 10:45 [PATCH] dmeventd -R (restart; BZ 454618) Petr Rockai
2010-10-05 12:54 ` ejt
2010-10-12 16:05   ` Petr Rockai
2010-10-05 21:31 ` Jonathan Brassow
2010-10-05 23:49   ` Alasdair G Kergon
2010-10-06 14:07     ` Petr Rockai
2010-10-19 14:51       ` Zdenek Kabelac
2010-10-19 15:00         ` Alasdair G Kergon

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.