[omd-commits] OMD Git: omd: shinken: fix a bug in livestatus (*_url_expandex). Add missing python debs to Makefile.DEBIAN

git version control git at mathias-kettner.de
Thu Dec 23 21:51:07 CET 2010


Module: omd
Branch: master
Commit: 42de90357365b281b377f42001006d86c841ed80
URL:    http://omdistro.org/projects/omd/repository/revisions/42de90357365b281b377f42001006d86c841ed80

Author: Gerhard Lausser <gerhard.lausser at consol.de>
Date:   Thu Dec 23 20:38:30 2010 +0000

shinken: fix a bug in livestatus (*_url_expandex). Add missing python debs to Makefile.DEBIAN

---

 distros/Makefile.DEBIAN_5.0                        |    2 +-
 packages/shinken/Makefile                          |    8 ++--
 ...g-in-livestatus.-Catch-the-exception-if-a-p.dif |   30 ++++++++++++++++++++
 packages/shinken/shinken-0.4.1.tar.gz              |  Bin 28260981 -> 4863765 bytes
 4 files changed, 35 insertions(+), 5 deletions(-)

diff --git a/distros/Makefile.DEBIAN_5.0 b/distros/Makefile.DEBIAN_5.0
index 4a147ae..45eb9c4 100644
--- a/distros/Makefile.DEBIAN_5.0
+++ b/distros/Makefile.DEBIAN_5.0
@@ -1,6 +1,6 @@
 DISTRO_CODE       = lenny
 BUILD_PACKAGES    = build-essential libcairo2-dev libpango1.0-dev libxml2-dev patch libmcrypt-dev libperl-dev libssl-dev libgd2-xpm-dev libglib2.0-dev libgnutls-dev libldap2-dev libmcrypt-dev libmysqlclient15-dev libperl-dev dpatch git-buildpackage snmp libreadline5-dev
-OS_PACKAGES       = xinetd libltdl3 libdbi0 libpango1.0-0 libapache2-mod-php5 libapache2-mod-python libapache2-mod-fcgid libapache2-mod-proxy-html xinetd php5-gd php5-sqlite php5-mcrypt graphviz snmp libgd2-xpm dnsutils fping mysql-server php-pear php5 php5-cli unzip libnet-snmp-perl libsnmp-perl rsync dialog curl patch libreadline5
+OS_PACKAGES       = xinetd libltdl3 libdbi0 libpango1.0-0 libapache2-mod-php5 libapache2-mod-python libapache2-mod-fcgid libapache2-mod-proxy-html xinetd php5-gd php5-sqlite php5-mcrypt graphviz snmp libgd2-xpm dnsutils fping mysql-server php-pear php5 php5-cli unzip libnet-snmp-perl libsnmp-perl rsync dialog curl patch libreadline5 python-multiprocessing pyro
 USERADD_OPTIONS   = 
 ADD_USER_TO_GROUP = gpasswd -a %(user)s %(group)s
 PACKAGE_INSTALL   = aptitude -y update ; aptitude -y install
diff --git a/packages/shinken/Makefile b/packages/shinken/Makefile
index 18c0ad3..fc70a03 100644
--- a/packages/shinken/Makefile
+++ b/packages/shinken/Makefile
@@ -6,10 +6,10 @@ DIR = $(NAME)-$(VERSION)
 
 build:
 	tar xzf $(DIR).tar.gz
-	#set -e ; for p in patches/*.dif ; do \
-	#    echo "applying $$p..." ; \
-	#    ( cd $(DIR) ; patch -p1 -b ) < $$p ; \
-	#done
+	set -e ; for p in patches/*.dif ; do \
+	    echo "applying $$p..." ; \
+	    ( cd $(DIR) ; patch -p1 -b ) < $$p ; \
+	done
 
 
 install:
diff --git a/packages/shinken/patches/0001--Fix-a-bug-in-livestatus.-Catch-the-exception-if-a-p.dif b/packages/shinken/patches/0001--Fix-a-bug-in-livestatus.-Catch-the-exception-if-a-p.dif
new file mode 100644
index 0000000..b830b85
--- /dev/null
+++ b/packages/shinken/patches/0001--Fix-a-bug-in-livestatus.-Catch-the-exception-if-a-p.dif
@@ -0,0 +1,30 @@
+From 2df646b228f960984a6726598aa2cbe2f9a9745c Mon Sep 17 00:00:00 2001
+From: Gerhard Lausser <gerhard.lausser at consol.de>
+Date: Thu, 23 Dec 2010 21:31:10 +0100
+Subject: [PATCH] *Fix a bug in livestatus. Catch the exception if a peer is not listening for the response
+
+---
+ .../modules/livestatus_broker/livestatus_broker.py |    7 ++++++-
+ 1 files changed, 6 insertions(+), 1 deletions(-)
+
+diff --git a/shinken/modules/livestatus_broker/livestatus_broker.py b/shinken/modules/livestatus_broker/livestatus_broker.py
+index 8a5f821..4448463 100644
+--- a/shinken/modules/livestatus_broker/livestatus_broker.py
++++ b/shinken/modules/livestatus_broker/livestatus_broker.py
+@@ -857,7 +857,12 @@ class Livestatus_broker:
+     
+                         if handle_it:
+                             response, keepalive = self.livestatus.handle_request(open_connections[socketid]['buffer'].rstrip())
+-                            s.send(response)
++                            try:
++                                s.send(response)
++                            except:
++                                # Maybe the request was an external command and
++                                # the peer is not interested in a response at all
++                                pass
+ 
+                             # Write request/response in a tracefile
+ #                            if os.path.exists('/tmp/shinken.modules.livestatus.trace'):
+-- 
+1.5.5.6
+
diff --git a/packages/shinken/shinken-0.4.1.tar.gz b/packages/shinken/shinken-0.4.1.tar.gz
index f8a1671..68415ad 100644
Binary files a/packages/shinken/shinken-0.4.1.tar.gz and b/packages/shinken/shinken-0.4.1.tar.gz differ



More information about the omd-commits mailing list