Title: [opsview-base] [274] Immediately finish a job if timeout occurs, to avoid waiting for it to finish.
Revision
274
Author
tvoon
Date
2013-06-11 01:49:35 +0100 (Tue, 11 Jun 2013)

Log Message

Immediately finish a job if timeout occurs, to avoid waiting for it to finish. Two other 
small patches

Modified Paths

Added Paths

Modified: trunk/Makefile
===================================================================
--- trunk/Makefile	2013-06-07 11:08:45 UTC (rev 273)
+++ trunk/Makefile	2013-06-11 00:49:35 UTC (rev 274)
@@ -640,6 +640,9 @@
 	cd ${NAGIOS} && patch -p1 < ../patches/nagios_bugfix_2748_2749.patch
 	cd ${NAGIOS} && patch -p1 < ../patches/nagios_bugfix_2755.patch
 	cd ${NAGIOS} && patch -p1 < ../patches/nagios_output_limit_16k.patch
+	cd ${NAGIOS} && patch -p1 < ../patches/nagios_worker_finish_timeout_commands_immediately.patch
+	cd ${NAGIOS} && patch -p1 < ../patches/nagios_disable_nagios_updates.patch
+	cd ${NAGIOS} && patch -p1 < ../patches/nagios_missing_host_variable_reset.patch
 	if [ $(KERNEL_NAME) = Linux ] ; then \
 		cd ${NAGIOS} && CFLAGS="${CFLAGS}" ./configure --with-nagios-user=$(NAGIOS_USER) --with-nagios-group=$(NAGIOS_GROUP) --with-command-group=$(NAGIOS_GROUP) --with-cgiurl=/cgi-bin --with-htmurl=/ --enable-libtap ; \
 	elif [ $(KERNEL_NAME) = Darwin ] ; then \

Added: trunk/patches/nagios_disable_nagios_updates.patch
===================================================================
--- trunk/patches/nagios_disable_nagios_updates.patch	                        (rev 0)
+++ trunk/patches/nagios_disable_nagios_updates.patch	2013-06-11 00:49:35 UTC (rev 274)
@@ -0,0 +1,14 @@
+diff -ur nagios-4.0.20130107.original//base/utils.c nagios-4.0.20130107/base/utils.c
+--- nagios-4.0.20130107.original//base/utils.c	2013-06-10 10:20:21.000000000 +0000
++++ nagios-4.0.20130107/base/utils.c	2013-06-10 22:05:35.000000000 +0000
+@@ -2964,6 +2964,10 @@
+ 
+ /* check for new releases of Nagios */
+ int check_for_nagios_updates(int force, int reschedule) {
++
++	// Opsview patch
++	return OK;
++
+ 	time_t current_time;
+ 	int result = OK;
+ 	int api_result = OK;

Added: trunk/patches/nagios_missing_host_variable_reset.patch
===================================================================
--- trunk/patches/nagios_missing_host_variable_reset.patch	                        (rev 0)
+++ trunk/patches/nagios_missing_host_variable_reset.patch	2013-06-11 00:49:35 UTC (rev 274)
@@ -0,0 +1,11 @@
+diff -ur nagios-4.0.20130107.original//base/utils.c nagios-4.0.20130107/base/utils.c
+--- nagios-4.0.20130107.original//base/utils.c	2013-06-10 10:20:21.000000000 +0000
++++ nagios-4.0.20130107/base/utils.c	2013-06-10 22:05:35.000000000 +0000
+@@ -3399,6 +3403,7 @@
+ 
+ 	max_parallel_service_checks = DEFAULT_MAX_PARALLEL_SERVICE_CHECKS;
+ 	currently_running_service_checks = 0;
++	currently_running_host_checks = 0;
+ 
+ 	enable_notifications = TRUE;
+ 	execute_service_checks = TRUE;

Added: trunk/patches/nagios_worker_finish_timeout_commands_immediately.patch
===================================================================
--- trunk/patches/nagios_worker_finish_timeout_commands_immediately.patch	                        (rev 0)
+++ trunk/patches/nagios_worker_finish_timeout_commands_immediately.patch	2013-06-11 00:49:35 UTC (rev 274)
@@ -0,0 +1,17 @@
+diff -ur nagios-4.0.20130107.original//lib/worker.c nagios-4.0.20130107/lib/worker.c
+--- nagios-4.0.20130107.original//lib/worker.c	2013-06-10 10:20:21.000000000 +0000
++++ nagios-4.0.20130107/lib/worker.c	2013-06-11 00:30:01.000000000 +0000
+@@ -220,11 +220,11 @@
+ 
+ 	/* get rid of still open filedescriptors */
+ 	if (cp->outstd.fd != -1) {
+-		gather_output(cp, &cp->outstd, 1);
++		if (!reason) gather_output(cp, &cp->outstd, 1);		// Opsview patch: if we try to gather output, worker will block on read() until process actually stops
+ 		iobroker_close(iobs, cp->outstd.fd);
+ 	}
+ 	if (cp->outerr.fd != -1) {
+-		gather_output(cp, &cp->outerr, 1);
++		if (!reason) gather_output(cp, &cp->outerr, 1);
+ 		iobroker_close(iobs, cp->outerr.fd);
+ 	}
+ 

_______________________________________________
Opsview-checkins mailing list
Opsview-checkins@lists.opsview.org
http://lists.opsview.org/lists/listinfo/opsview-checkins

Reply via email to