[omd-commits] OMD Git: omd: shinken: update to 0.6.4 solves a big memory problem

git version control git at mathias-kettner.de
Fri May 20 16:09:37 CEST 2011


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

Author:   Gerhard Lausser <gerhard.lausser at consol.de>
Date:     Fri May 20 15:57:37 2011 +0200
Commiter: Gerhard Lausser <gerhard.lausser at consol.de>
Date:     Fri May 20 15:57:37 2011 +0200

shinken: update to 0.6.4 solves a big memory problem

---

 packages/shinken/Makefile                          |   10 +-
 ...tatus-with-multiple-instance-now-clean-in.patch |  109 --------------------
 ...-a-sys.exit-more-cleanly-affects-python-2.patch |   27 -----
 packages/shinken/shinken-0.6.3.tar.gz              |  Bin 5143569 -> 0 bytes
 packages/shinken/shinken-0.6.4.tar.gz              |  Bin 0 -> 5158852 bytes
 packages/shinken/shinken-0.6.tar.gz                |  Bin 5003364 -> 0 bytes
 6 files changed, 5 insertions(+), 141 deletions(-)

diff --git a/packages/shinken/Makefile b/packages/shinken/Makefile
index fe64699..5922f13 100644
--- a/packages/shinken/Makefile
+++ b/packages/shinken/Makefile
@@ -1,7 +1,7 @@
 include ../../Makefile.omd
 
 
-SHINKEN=shinken-0.6.3
+SHINKEN=shinken-0.6.4
 SHINKEN_FILE=$(SHINKEN).tar.gz
 SHINKEN_URL=http://shinken-monitoring.org/pub/$(SHINKEN).tar.gz
 #
@@ -51,10 +51,10 @@ export PYTHONPATH
 build:
 	test -f ${SHINKEN_FILE} || wget $(SHINKEN_URL)
 	tar xzf $(SHINKEN_FILE)
-	set -e ; for p in patches/*.patch ; do \
-	    echo "applying $$p..." ; \
-	    ( cd $(SHINKEN) ; patch -p1 -b ) < $$p ; \
-	done
+	#set -e ; for p in patches/*.patch ; do \
+	#    echo "applying $$p..." ; \
+	#    ( cd $(SHINKEN) ; patch -p1 -b ) < $$p ; \
+	#done
 	test -f $(PYRO_FILE) || wget $(PYRO_URL)
 	tar xzf $(PYRO_FILE)
 	test -f $(MP_FILE) || wget $(MP_URL)
diff --git a/packages/shinken/patches/1779-Fix-livestatus-with-multiple-instance-now-clean-in.patch b/packages/shinken/patches/1779-Fix-livestatus-with-multiple-instance-now-clean-in.patch
deleted file mode 100644
index eaa1530..0000000
--- a/packages/shinken/patches/1779-Fix-livestatus-with-multiple-instance-now-clean-in.patch
+++ /dev/null
@@ -1,109 +0,0 @@
-From f62d263532c98ef7f22e54c30842bce72dafb3ba Mon Sep 17 00:00:00 2001
-From: naparuba <naparuba at users.sourceforge.net>
-Date: Thu, 19 May 2011 15:58:38 +0200
-Subject: [PATCH] Fix: livestatus with multiple instance now clean in a good way services.
-
----
- .../modules/livestatus_broker/livestatus_broker.py |   60 +++++++++++++++-----
- 1 files changed, 45 insertions(+), 15 deletions(-)
-
-diff --git a/shinken/modules/livestatus_broker/livestatus_broker.py b/shinken/modules/livestatus_broker/livestatus_broker.py
-index 166b5ad..5a5cd8c 100644
---- a/shinken/modules/livestatus_broker/livestatus_broker.py
-+++ b/shinken/modules/livestatus_broker/livestatus_broker.py
-@@ -142,24 +142,40 @@ class Livestatus_broker(BaseModule):
-         # We should clean all previously added hosts and services
-         inst_id = data['instance_id']
-         to_del = []
-+        to_del_srv = []
-         for h in self.hosts.values():
-             # If the host was in this instance, del it
-             if h.instance_id == inst_id:
--                for s in h.services:
--                    s_id = s.id
--                    try:
--                        del self.servicename_lookup_table[s.host_name + s.service_description]
--                    except: # not found? not a crime
--                        pass
--                    try:
--                        del self.services[s_id]
--                    except: #maybe the hsot is deleted before we got it's service?
--                        print "Debug warning : host service deleted but not found!"
--                    try:
--                        del self.hostname_lookup_table[h.host_name]
--                    except KeyError: # maybe it was not inserted in a good way, pass it
--                        pass
--                    to_del.append(h.id)
-+                try:
-+                    del self.hostname_lookup_table[h.host_name]
-+                except KeyError: # maybe it was not inserted in a good way, pass it
-+                    pass
-+                to_del.append(h.id)
-+
-+                
-+        for s in self.services.values():
-+            if s.instance_id == inst_id:
-+                s_id = s.id
-+                try:
-+                    del self.servicename_lookup_table[s.host_name + s.service_description]
-+                except: # not found? not a crime
-+                    pass
-+                try:
-+                    del self.services[s_id]
-+                except: #maybe the hsot is deleted before we got it's service?
-+                    print "Debug warning : host service deleted but not found!"
-+                to_del_srv.append(s_id)
-+
-+        # Now clean hostgroups too
-+        for hg in self.hostgroups.values():
-+            print "Len before exclude", len(hg.members)
-+            # Exclude from members the hosts with this inst_id
-+            hg.members = [h for h in hg.members if h.instance_id != inst_id]
-+            print "Len after", len(hg.members)
-+
-+        # Now clean service groups
-+        for sg in self.servicegroups.values():
-+            sg.members = [s for s in sg.members if s.instance_id != inst_id]
- 
-         # Ok, really clean the hosts
-         for i in to_del:
-@@ -168,6 +184,14 @@ class Livestatus_broker(BaseModule):
-             except KeyError: # maybe it was not inserted in a good way, pass it
-                 pass
- 
-+        # And services
-+        for i in to_del_srv:
-+            try:
-+                del self.services[i]
-+            except KeyError: # maybe it was not inserted in a good way, pass it
-+                pass
-+
-+
- 
-     def manage_update_program_status_brok(self, b):
-         data = b.data
-@@ -266,8 +290,13 @@ class Livestatus_broker(BaseModule):
-     def manage_initial_service_status_brok(self, b):
-         data = b.data
-         s_id = data['id']
-+
-+        inst_id = data['instance_id']
-+        
-         #print "Creating Service:", s_id, data
-         s = Service({})
-+        s.instance_id = inst_id
-+
-         self.update_element(s, data)
-         self.set_schedulingitem_values(s)
-         
-@@ -285,6 +314,7 @@ class Livestatus_broker(BaseModule):
-         self.servicename_lookup_table[s.host_name + s.service_description] = s_id
-         self.number_of_objects += 1
- 
-+
-     #In fact, an update of a service is like a check return
-     def manage_update_service_status_brok(self, b):
-         self.manage_service_check_result_brok(b)
--- 
-1.5.5.6
-
diff --git a/packages/shinken/patches/1780--handle-a-sys.exit-more-cleanly-affects-python-2.patch b/packages/shinken/patches/1780--handle-a-sys.exit-more-cleanly-affects-python-2.patch
deleted file mode 100644
index c5ac726..0000000
--- a/packages/shinken/patches/1780--handle-a-sys.exit-more-cleanly-affects-python-2.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 00bc226eddde3fdcb4e5be756531b133fba35f80 Mon Sep 17 00:00:00 2001
-From: Gerhard Lausser <gerhard.lausser at consol.de>
-Date: Thu, 19 May 2011 16:01:33 +0200
-Subject: [PATCH] *handle a sys.exit() more cleanly (affects python 2.4) when calling the arbiter with -v
-
----
- shinken/daemons/arbiterdaemon.py |    4 ++++
- 1 files changed, 4 insertions(+), 0 deletions(-)
-
-diff --git a/shinken/daemons/arbiterdaemon.py b/shinken/daemons/arbiterdaemon.py
-index 2806eb7..710e739 100644
---- a/shinken/daemons/arbiterdaemon.py
-+++ b/shinken/daemons/arbiterdaemon.py
-@@ -418,6 +418,10 @@ class Arbiter(Daemon):
- 
-             ## And go for the main loop
-             self.do_mainloop()
-+        except SystemExit, exp:
-+            # With a 2.4 interpreter the sys.exit() in load_config_file
-+            # ends up here and must be handled.
-+            sys.exit(exp.code)
-         except Exception, exp:
-             logger.log("CRITICAL ERROR : I got an non recovarable error. I must exit")
-             logger.log("You can log a bug ticket at https://sourceforge.net/apps/trac/shinken/newticket for geting help")
--- 
-1.5.5.6
-
diff --git a/packages/shinken/shinken-0.6.3.tar.gz b/packages/shinken/shinken-0.6.3.tar.gz
deleted file mode 100644
index 170eb52..0000000
Binary files a/packages/shinken/shinken-0.6.3.tar.gz and /dev/null differ
diff --git a/packages/shinken/shinken-0.6.4.tar.gz b/packages/shinken/shinken-0.6.4.tar.gz
new file mode 100644
index 0000000..3b4aa2d
Binary files /dev/null and b/packages/shinken/shinken-0.6.4.tar.gz differ
diff --git a/packages/shinken/shinken-0.6.tar.gz b/packages/shinken/shinken-0.6.tar.gz
deleted file mode 100644
index 05c0eae..0000000
Binary files a/packages/shinken/shinken-0.6.tar.gz and /dev/null differ



More information about the omd-commits mailing list