public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2 ./WHATS_NEW_DM daemons/dmeventd/libdevmap ...
@ 2012-02-15 13:56 zkabelac
  0 siblings, 0 replies; 6+ messages in thread
From: zkabelac @ 2012-02-15 13:56 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2012-02-15 13:56:47

Modified files:
	.              : WHATS_NEW_DM 
	daemons/dmeventd: libdevmapper-event.c 

Log message:
	Detect failing fifo
	
	If the fifo died because of dmeventd restart - do not wait for 20s
	in select  - it will not get better and return error immediately.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW_DM.diff?cvsroot=lvm2&r1=1.565&r2=1.566
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/dmeventd/libdevmapper-event.c.diff?cvsroot=lvm2&r1=1.44&r2=1.45

--- LVM2/WHATS_NEW_DM	2012/02/15 12:23:15	1.565
+++ LVM2/WHATS_NEW_DM	2012/02/15 13:56:47	1.566
@@ -1,5 +1,6 @@
 Version 1.02.71 - 
 ====================================
+  Detect failing fifo and skip 20s retry communication period.
   Add DM_DEFAULT_NAME_MANGLING_MODE env. variable to override configured value.
   Add dm_lib_init to automatically initialise device-mapper library on load.
   Replace any '\' char with '\\' in table specification on input.
--- LVM2/daemons/dmeventd/libdevmapper-event.c	2012/02/13 11:24:09	1.44
+++ LVM2/daemons/dmeventd/libdevmapper-event.c	2012/02/15 13:56:47	1.45
@@ -232,6 +232,7 @@
 	size_t size = 2 * sizeof(uint32_t);	/* status + size */
 	uint32_t *header = alloca(size);
 	char *buf = (char *)header;
+	struct stat fstatbuf;
 
 	while (bytes < size) {
 		for (i = 0, ret = 0; (i < 20) && (ret < 1); i++) {
@@ -245,6 +246,13 @@
 				log_error("Unable to read from event server");
 				return 0;
 			}
+			/* Check whether fifo is still alive */
+			if ((ret == 0) &&
+			    fstat(fifos->server + 1, &fstatbuf) &&
+			    (errno == EBADF)) {
+				log_error("Fifo fd is bad for event server.");
+				return 0;
+			}
 		}
 		if (ret < 1) {
 			log_error("Unable to read from event server.");


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

* LVM2 ./WHATS_NEW_DM daemons/dmeventd/libdevmap ...
@ 2012-03-20 17:38 zkabelac
  0 siblings, 0 replies; 6+ messages in thread
From: zkabelac @ 2012-03-20 17:38 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2012-03-20 17:38:48

Modified files:
	.              : WHATS_NEW_DM 
	daemons/dmeventd: libdevmapper-event.c 

Log message:
	Fix check for passed in path for dmeventd startup
	
	Check passed in executable path for dmeventd instead of predefined
	compiled in path which is not the thing to be executed.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW_DM.diff?cvsroot=lvm2&r1=1.595&r2=1.596
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/dmeventd/libdevmapper-event.c.diff?cvsroot=lvm2&r1=1.49&r2=1.50

--- LVM2/WHATS_NEW_DM	2012/03/15 08:45:55	1.595
+++ LVM2/WHATS_NEW_DM	2012/03/20 17:38:47	1.596
@@ -1,5 +1,6 @@
 Version 1.02.75 - 
 ================================
+  Properly support passed in dmevent path in dm_event_register_handler().
   Remove dmeventd fifos on exit if they are not managed by systemd.
   Use SD_ACTIVATION env. var. in systemd units to better detect systemd in use.
   Do not run a new dmeventd instance on restart if there's no existing one.
--- LVM2/daemons/dmeventd/libdevmapper-event.c	2012/03/12 14:46:53	1.49
+++ LVM2/daemons/dmeventd/libdevmapper-event.c	2012/03/20 17:38:47	1.50
@@ -440,8 +440,8 @@
       start_server:
 	/* server is not running */
 
-	if (!strncmp(DMEVENTD_PATH, "/", 1) && stat(DMEVENTD_PATH, &statbuf)) {
-		log_sys_error("stat", DMEVENTD_PATH);
+	if ((args[0][0] == '/') && stat(args[0], &statbuf)) {
+		log_sys_error("stat", args[0]);
 		return 0;
 	}
 


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

* LVM2 ./WHATS_NEW_DM daemons/dmeventd/libdevmap ...
@ 2012-03-12 14:46 zkabelac
  0 siblings, 0 replies; 6+ messages in thread
From: zkabelac @ 2012-03-12 14:46 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2012-03-12 14:46:53

Modified files:
	.              : WHATS_NEW_DM 
	daemons/dmeventd: libdevmapper-event.c 

Log message:
	We need longer window for checking read from fifo.
	
	Seems like some dmeventd startups are taking more time then expected,
	so make the time window longer here.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW_DM.diff?cvsroot=lvm2&r1=1.591&r2=1.592
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/dmeventd/libdevmapper-event.c.diff?cvsroot=lvm2&r1=1.48&r2=1.49

--- LVM2/WHATS_NEW_DM	2012/03/06 04:47:37	1.591
+++ LVM2/WHATS_NEW_DM	2012/03/12 14:46:53	1.592
@@ -1,5 +1,6 @@
 Version 1.02.75 - 
 ================================
+  Make the time window for reading fifo longer 5sec (1.02.73).
 
 Version 1.02.74 - 6th March 2012
 ================================
--- LVM2/daemons/dmeventd/libdevmapper-event.c	2012/03/01 10:41:48	1.48
+++ LVM2/daemons/dmeventd/libdevmapper-event.c	2012/03/12 14:46:53	1.49
@@ -245,7 +245,7 @@
 				log_error("Unable to read from event server");
 				return 0;
 			}
-			if ((ret == 0) && i && !bytes) {
+			if ((ret == 0) && (i > 4) && !bytes) {
 				log_error("No input from event server.");
 				return 0;
 			}


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

* LVM2 ./WHATS_NEW_DM daemons/dmeventd/libdevmap ...
@ 2012-02-13 11:24 zkabelac
  0 siblings, 0 replies; 6+ messages in thread
From: zkabelac @ 2012-02-13 11:24 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2012-02-13 11:24:09

Modified files:
	.              : WHATS_NEW_DM 
	daemons/dmeventd: libdevmapper-event.c 

Log message:
	Check for missing reply_uuid

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW_DM.diff?cvsroot=lvm2&r1=1.554&r2=1.555
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/dmeventd/libdevmapper-event.c.diff?cvsroot=lvm2&r1=1.43&r2=1.44

--- LVM2/WHATS_NEW_DM	2012/02/13 11:18:46	1.554
+++ LVM2/WHATS_NEW_DM	2012/02/13 11:24:09	1.555
@@ -1,5 +1,6 @@
 Version 1.02.71 - 
 ====================================
+  Check for missing reply_uuid in dm_event_get_registered_device().
   Check for allocation failure in dmeventd restart().
   Add few missing allocation failures tests in dmsetup.
   Fix potential risk of writing in front of buffer in _sysfs_get_dm_name().
--- LVM2/daemons/dmeventd/libdevmapper-event.c	2012/02/10 15:17:52	1.43
+++ LVM2/daemons/dmeventd/libdevmapper-event.c	2012/02/13 11:24:09	1.44
@@ -743,6 +743,10 @@
 	msg.data = NULL;
 
 	_dm_event_handler_clear_dev_info(dmevh);
+	if (!reply_uuid) {
+		ret = -ENXIO; /* dmeventd probably gave us bogus uuid back */
+		goto fail;
+	}
 	dmevh->uuid = dm_strdup(reply_uuid);
 	if (!dmevh->uuid) {
 		ret = -ENOMEM;


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

* LVM2 ./WHATS_NEW_DM daemons/dmeventd/libdevmap ...
@ 2012-02-10 15:17 zkabelac
  0 siblings, 0 replies; 6+ messages in thread
From: zkabelac @ 2012-02-10 15:17 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2012-02-10 15:17:52

Modified files:
	.              : WHATS_NEW_DM 
	daemons/dmeventd: libdevmapper-event.c 

Log message:
	Fix message check
	
	Check pointer from strchr for NULL instead of crash later.
	Badly formated message would have crash dmeventd otherwise.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW_DM.diff?cvsroot=lvm2&r1=1.548&r2=1.549
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/dmeventd/libdevmapper-event.c.diff?cvsroot=lvm2&r1=1.42&r2=1.43

--- LVM2/WHATS_NEW_DM	2012/02/10 14:48:28	1.548
+++ LVM2/WHATS_NEW_DM	2012/02/10 15:17:52	1.549
@@ -1,5 +1,6 @@
 Version 1.02.70 - 
 ===================================
+  Fix dm_event_get_version() check.
   Add pointer test for dependency check in _add_dev().
   Validate name and uuid params of dm_tree_add_new_dev_with_udev_flags().
   Do not crash for dm_report_init() sort_key == NULL and behave like "".
--- LVM2/daemons/dmeventd/libdevmapper-event.c	2011/07/08 12:35:48	1.42
+++ LVM2/daemons/dmeventd/libdevmapper-event.c	2012/02/10 15:17:52	1.43
@@ -811,11 +811,11 @@
 	p = msg.data;
 	*version = 0;
 
-	p = strchr(p, ' ') + 1; /* Message ID */
+	p = strchr(p, ' '); /* Message ID */
         if (!p) return 0;
-	p = strchr(p, ' ') + 1; /* HELLO */
+	p = strchr(p + 1, ' '); /* HELLO */
         if (!p) return 0;
-	p = strchr(p, ' '); /* HELLO, once more */
+	p = strchr(p + 1, ' '); /* HELLO, once more */
 	if (p)
 		*version = atoi(p);
 	return 1;


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

* LVM2 ./WHATS_NEW_DM daemons/dmeventd/libdevmap ...
@ 2009-06-15 12:29 mbroz
  0 siblings, 0 replies; 6+ messages in thread
From: mbroz @ 2009-06-15 12:29 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	mbroz@sourceware.org	2009-06-15 12:29:41

Modified files:
	.              : WHATS_NEW_DM 
	daemons/dmeventd: libdevmapper-event.c 

Log message:
	Do not fork daemon when dmeventd cannot be found.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW_DM.diff?cvsroot=lvm2&r1=1.276&r2=1.277
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/dmeventd/libdevmapper-event.c.diff?cvsroot=lvm2&r1=1.27&r2=1.28

--- LVM2/WHATS_NEW_DM	2009/06/09 16:10:20	1.276
+++ LVM2/WHATS_NEW_DM	2009/06/15 12:29:41	1.277
@@ -1,5 +1,6 @@
 Version 1.02.33 -
 ===============================
+  Do not fork daemon when dmeventd cannot be found.
   Add crypt target handling to libdevmapper node.
   Add splitname command to dmsetup.
   Add subsystem, vg_name, lv_name, lv_layer fields to dmsetup reports.
--- LVM2/daemons/dmeventd/libdevmapper-event.c	2008/11/03 23:01:21	1.27
+++ LVM2/daemons/dmeventd/libdevmapper-event.c	2009/06/15 12:29:41	1.28
@@ -425,6 +425,12 @@
 
       start_server:
 	/* server is not running */
+
+	if (!strncmp(DMEVENTD_PATH, "/", 1) && stat(DMEVENTD_PATH, &statbuf)) {
+		log_error("Unable to find dmeventd.");
+		return_0;
+	}
+
 	pid = fork();
 
 	if (pid < 0)


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

end of thread, other threads:[~2012-03-20 17:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-15 13:56 LVM2 ./WHATS_NEW_DM daemons/dmeventd/libdevmap zkabelac
  -- strict thread matches above, loose matches on Subject: below --
2012-03-20 17:38 zkabelac
2012-03-12 14:46 zkabelac
2012-02-13 11:24 zkabelac
2012-02-10 15:17 zkabelac
2009-06-15 12:29 mbroz

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).