[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster fence/fenced/main.c group/dlm_controld ...



CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	teigland sourceware org	2006-08-15 17:17:47

Modified files:
	fence/fenced   : main.c 
	group/dlm_controld: main.c 
	group/gfs_controld: main.c 

Log message:
	daemons that depend on groupd (fenced, dlm_controld, gfs_controld)
	should log and error and exit if groupd dies

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/fenced/main.c.diff?cvsroot=cluster&r1=1.36&r2=1.37
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/dlm_controld/main.c.diff?cvsroot=cluster&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/main.c.diff?cvsroot=cluster&r1=1.9&r2=1.10

--- cluster/fence/fenced/main.c	2006/07/25 20:05:52	1.36
+++ cluster/fence/fenced/main.c	2006/08/15 17:17:45	1.37
@@ -425,6 +425,10 @@
 					log_error("cluster is down, exiting");
 					exit(1);
 				}
+				if (pollfd[i].fd == groupd_fd) {
+					log_error("groupd is down, exiting");
+					exit(1);
+				}
 				client_dead(i);
 			} else if (pollfd[i].revents & POLLIN) {
 				if (pollfd[i].fd == groupd_fd)
--- cluster/group/dlm_controld/main.c	2006/07/13 21:28:45	1.3
+++ cluster/group/dlm_controld/main.c	2006/08/15 17:17:46	1.4
@@ -246,7 +246,11 @@
 					log_error("cluster is down, exiting");
 					exit(1);
 				}
-				log_error("closing fd %d", pollfd[i].fd);
+				if (pollfd[i].fd == groupd_fd) {
+					log_error("groupd is down, exiting");
+					exit(1);
+				}
+				log_debug("closing fd %d", pollfd[i].fd);
 				close(pollfd[i].fd);
 			}
 		}
--- cluster/group/gfs_controld/main.c	2006/08/14 17:22:53	1.9
+++ cluster/group/gfs_controld/main.c	2006/08/15 17:17:47	1.10
@@ -419,8 +419,16 @@
 			}
 
 			if (pollfd[i].revents & POLLHUP) {
-				if (pollfd[i].fd == cman_fd)
+				if (pollfd[i].fd == cman_fd) {
+					log_error("cman connection died");
 					exit_cman();
+				} else if (pollfd[i].fd == groupd_fd) {
+					log_error("groupd connection died");
+					exit_cman();
+				} else if (pollfd[i].fd == cpg_fd) {
+					log_error("cpg connection died");
+					exit_cman();
+				}
 				close(pollfd[i].fd);
 			}
 		}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]