msmith - in flumotion/trunk: . flumotion/worker

flumotion-commit at lists.fluendo.com flumotion-commit at lists.fluendo.com
Wed Feb 21 15:15:19 CET 2007


Author: msmith
Date: Wed Feb 21 15:15:16 2007
New Revision: 4507

Modified:
   flumotion/trunk/ChangeLog
   flumotion/trunk/flumotion/worker/worker.py
Log:
        * flumotion/worker/worker.py:
          If we have previously successfully logged in to the manager, an
          authentication failure should be non-fatal; it's probably a
          transient fault.



Modified: flumotion/trunk/ChangeLog
==============================================================================
--- flumotion/trunk/ChangeLog	(original)
+++ flumotion/trunk/ChangeLog	Wed Feb 21 15:15:16 2007
@@ -1,3 +1,10 @@
+2007-02-21  Michael Smith  <msmith at fluendo.com>
+
+	* flumotion/worker/worker.py:
+	  If we have previously successfully logged in to the manager, an
+	  authentication failure should be non-fatal; it's probably a
+	  transient fault.
+
 2007-02-20  Andy Wingo  <wingo at pobox.com>
 
 	* flumotion/common/common.py (daemonizeHelper): Install a

Modified: flumotion/trunk/flumotion/worker/worker.py
==============================================================================
--- flumotion/trunk/flumotion/worker/worker.py	(original)
+++ flumotion/trunk/flumotion/worker/worker.py	Wed Feb 21 15:15:16 2007
@@ -65,6 +65,8 @@
         factoryClass.__init__(self)
         # maximum 10 second delay for workers to attempt to log in again
         self.maxDelay = 10
+        # Authentication errors are fatal unless this is true
+        self._previously_connected = False
         
     def clientConnectionFailed(self, connector, reason):
         """
@@ -90,6 +92,7 @@
         def loginCallback(reference):
             self.info("Logged in to manager")
             self.debug("remote reference %r" % reference)
+            self._previously_connected = True
            
             self.medium.setRemoteReference(reference)
             reference.notifyOnDisconnect(remoteDisconnected)
@@ -131,6 +134,9 @@
             
     # override log.Loggable method so we don't traceback
     def error(self, message):
+        if self._previously_connected:
+            return log.Loggable.error(self, message)
+            
         self.warning('Shutting down worker because of error:')
         self.warning(message)
         print >> sys.stderr, 'ERROR: %s' % message


More information about the flumotion-commit mailing list