msmith - in flumotion/trunk: . flumotion/worker

flumotion-commit at lists.fluendo.com flumotion-commit at lists.fluendo.com
Tue Mar 20 17:21:46 CET 2007


Author: msmith
Date: Tue Mar 20 17:21:43 2007
New Revision: 4668

Modified:
   flumotion/trunk/ChangeLog
   flumotion/trunk/flumotion/worker/worker.py
Log:

        * flumotion/worker/worker.py:
          Because gstreamer now forks to regenerate the registry, this failure
          mode results in the error propagating as a RuntimeError, not a
          signal terminating our process. However, we must cope with it in the
          same way, otherwise an early failure to start can cause us to end up
          with an unstoppable component.
          Fixes #592.




Modified: flumotion/trunk/ChangeLog
==============================================================================
--- flumotion/trunk/ChangeLog	(original)
+++ flumotion/trunk/ChangeLog	Tue Mar 20 17:21:43 2007
@@ -1,3 +1,13 @@
+2007-03-20  Michael Smith  <msmith at fluendo.com>
+
+	* flumotion/worker/worker.py:
+	  Because gstreamer now forks to regenerate the registry, this failure
+	  mode results in the error propagating as a RuntimeError, not a
+	  signal terminating our process. However, we must cope with it in the
+	  same way, otherwise an early failure to start can cause us to end up
+	  with an unstoppable component.
+	  Fixes #592.
+
 2007-03-19  Zaheer Abbas Merali  <zaheerabbas at merali dot org>
 
 	* flumotion/component/base/admin_gtk.py:

Modified: flumotion/trunk/flumotion/worker/worker.py
==============================================================================
--- flumotion/trunk/flumotion/worker/worker.py	(original)
+++ flumotion/trunk/flumotion/worker/worker.py	Tue Mar 20 17:21:43 2007
@@ -341,18 +341,21 @@
 
         kg.removeKidByPid(self.pid)
 
-        if signum is not None:
-            # we need to trigger a failure on the create deferred 
-            # if the job received a signal before logging in to the worker;
-            # otherwise the manager still thinks it's starting up when it's
-            # dead.  If the job already attached to the worker however,
-            # the create deferred will already have callbacked.
-            if kg.brain.deferredCreateRegistered(self.avatarId):
-                text = "Component '%s' has received signal %d.  " \
-                       "This is sometimes triggered by a corrupt " \
-                       "GStreamer registry." % (self.avatarId, signum)
-                kg.brain.deferredCreateFailed(self.avatarId, 
-                    errors.ComponentCreateError(text))
+        # we need to trigger a failure on the create deferred 
+        # if the job failed before logging in to the worker;
+        # otherwise the manager still thinks it's starting up when it's
+        # dead.  If the job already attached to the worker however,
+        # the create deferred will already have callbacked.
+        if kg.brain.deferredCreateRegistered(self.avatarId):
+            if signum:
+                reason = "received signal %d" % signum
+            else:
+                reason = "unknown reason"
+            text = "Component '%s' has exited early (%s).  " \
+                   "This is sometimes triggered by a corrupt " \
+                   "GStreamer registry." % (self.avatarId, reason)
+            kg.brain.deferredCreateFailed(self.avatarId, 
+                errors.ComponentCreateError(text))
 
         kg.brain.jobHeaven.lostAvatar(self.avatarId)
         if kg.brain.deferredShutdownRegistered(self.avatarId):


More information about the flumotion-commit mailing list