public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: zkabelac@sourceware.org
To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org
Subject: LVM2 ./WHATS_NEW_DM daemons/dmeventd/dmeventd.c
Date: Tue, 24 Apr 2012 12:25:00 -0000	[thread overview]
Message-ID: <20120424122546.2329.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2012-04-24 12:25:23

Modified files:
	.              : WHATS_NEW_DM 
	daemons/dmeventd: dmeventd.c 

Log message:
	Synchronize with self-destruction of dmeventd
	
	In some occasional case dmevent restart was experiencing problems
	with obtaining pid lockfile. So this patch tries to send several more kill
	message until daemon kills itself so there is would reponse.
	With this small loop the restart seems to work reliable,
	although the loopsize and usleep are just randomly picked for now.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW_DM.diff?cvsroot=lvm2&r1=1.599&r2=1.600
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/dmeventd/dmeventd.c.diff?cvsroot=lvm2&r1=1.99&r2=1.100

--- LVM2/WHATS_NEW_DM	2012/04/24 08:24:36	1.599
+++ LVM2/WHATS_NEW_DM	2012/04/24 12:25:12	1.600
@@ -1,5 +1,6 @@
 Version 1.02.75 - 
 ================================
+  Synchronize with dead of dmeventd.
   Rename (Blk)DevNames/DevNos dmsetup header to (Blk)DevNamesUsed/DevNosUsed.
   Add configure --with-veritysetup for independent veritysetup tool.
   Properly support passed in dmevent path in dm_event_register_handler().
--- LVM2/daemons/dmeventd/dmeventd.c	2012/03/15 08:45:55	1.99
+++ LVM2/daemons/dmeventd/dmeventd.c	2012/04/24 12:25:20	1.100
@@ -1893,6 +1893,13 @@
 		exit(EXIT_FAILURE);
 	}
 
+	/* Let's wait a bit till deamon dies - spaming him with messages meanwhile */
+	for (i = 0; i < 10; ++i) {
+		if (daemon_talk(&fifos, &msg, DM_EVENT_CMD_DIE, "-", "-", 0, 0))
+			break; /* yep, it's dead probably */
+		usleep(10);
+	}
+
 	fini_fifos(&fifos);
 }
 


             reply	other threads:[~2012-04-24 12:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-24 12:25 zkabelac [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-03-15  8:45 prajnoha
2012-03-14 11:16 prajnoha
2012-03-01 22:06 zkabelac
2012-03-01  9:50 zkabelac
2011-07-28 13:06 prajnoha
2011-07-28 13:03 prajnoha

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=20120424122546.2329.qmail@sourceware.org \
    --to=zkabelac@sourceware.org \
    --cc=lvm-devel@redhat.com \
    --cc=lvm2-cvs@sourceware.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).