[Checkins] SVN: gocept.zeoraid/trunk/ - #484921: Further enhance logging output by also displaying the name of the

Christian Theune ct at gocept.com
Tue Nov 24 02:39:12 EST 2009


Log message for revision 105975:
  - #484921: Further enhance logging output by also displaying the name of the
    RAID storage involved.
  
  - Try forcing storages to close when they seemed to have failed opening. This
    is especially relevant for asynchronously connecting ZEO clients which
    otherwise continue to keep connecting but would never get picked up by
    ZEORaid.
  
  

Changed:
  U   gocept.zeoraid/trunk/CHANGES.txt
  U   gocept.zeoraid/trunk/src/gocept/zeoraid/storage.py

-=-
Modified: gocept.zeoraid/trunk/CHANGES.txt
===================================================================
--- gocept.zeoraid/trunk/CHANGES.txt	2009-11-23 23:02:19 UTC (rev 105974)
+++ gocept.zeoraid/trunk/CHANGES.txt	2009-11-24 07:39:11 UTC (rev 105975)
@@ -5,9 +5,15 @@
 1.0b8 (unreleased)
 ------------------
 
-- Nothing changed yet.
+- #484921: Further enhance logging output by also displaying the name of the
+  RAID storage involved.
 
+- Try forcing storages to close when they seemed to have failed opening. This
+  is especially relevant for asynchronously connecting ZEO clients which
+  otherwise continue to keep connecting but would never get picked up by
+  ZEORaid.
 
+
 1.0b7 (2009-11-21)
 ------------------
 

Modified: gocept.zeoraid/trunk/src/gocept/zeoraid/storage.py
===================================================================
--- gocept.zeoraid/trunk/src/gocept/zeoraid/storage.py	2009-11-23 23:02:19 UTC (rev 105974)
+++ gocept.zeoraid/trunk/src/gocept/zeoraid/storage.py	2009-11-24 07:39:11 UTC (rev 105975)
@@ -676,6 +676,7 @@
 
     def _open_storage(self, name):
         assert name not in self.storages, "Storage %s already opened" % name
+        storage = None
         try:
             storage = self.openers[name].open()
             assert hasattr(storage, 'supportsUndo') and storage.supportsUndo()
@@ -689,6 +690,11 @@
             self._degrade_storage(
                 name, reason='an error occured opening the storage',
                 fail=False)
+            if storage is not None:
+                try:
+                    storage.close()
+                except:
+                    pass
             return
         self.storages[name] = storage
 
@@ -706,7 +712,8 @@
         self._close_storage(name)
         self.storages_degraded.append(name)
         self.degrade_reasons[name] = reason
-        logger.critical('Storage %s degraded. Reason: %s' % (name, reason))
+        logger.critical('RAID %r degraded due failure of back-end %r. '
+                        'Reason: %s' % (self.__name__, name, reason))
         if not self.storages_optimal and fail:
             raise gocept.zeoraid.interfaces.RAIDError("No storages remain.")
 



More information about the checkins mailing list