[CalendarServer-changes] [6627] CalendarServer/trunk

source_changes at macosforge.org source_changes at macosforge.org
Fri Nov 12 11:03:25 PST 2010


Revision: 6627
          http://trac.macosforge.org/projects/calendarserver/changeset/6627
Author:   cdaboo at apple.com
Date:     2010-11-12 11:03:22 -0800 (Fri, 12 Nov 2010)
Log Message:
-----------
Fix some startup sequencing issues and also report on any initdb fatal errors.

Modified Paths:
--------------
    CalendarServer/trunk/calendarserver/tap/caldav.py
    CalendarServer/trunk/calendarserver/tap/util.py
    CalendarServer/trunk/txdav/base/datastore/subpostgres.py

Modified: CalendarServer/trunk/calendarserver/tap/caldav.py
===================================================================
--- CalendarServer/trunk/calendarserver/tap/caldav.py	2010-11-12 00:32:19 UTC (rev 6626)
+++ CalendarServer/trunk/calendarserver/tap/caldav.py	2010-11-12 19:03:22 UTC (rev 6627)
@@ -67,6 +67,7 @@
 from twistedcaldav.directory.calendaruserproxyloader import XMLCalendarUserProxyLoader
 from twistedcaldav.localization import processLocalizationFiles
 from twistedcaldav.mail import IMIPReplyInboxResource
+from twistedcaldav import memcachepool
 from twistedcaldav.stdconfig import DEFAULT_CONFIG, DEFAULT_CONFIG_FILE
 from twistedcaldav.upgrade import upgradeData
 
@@ -526,6 +527,14 @@
             )
         else:
 
+            #
+            # Configure Memcached Client Pool
+            #
+            memcachepool.installPools(
+                config.Memcached.Pools,
+                config.Memcached.MaxClients,
+            )
+
             if config.ProcessType in ('Combined', 'Single'):
 
                 # Memcached is not needed for the "master" process
@@ -880,7 +889,7 @@
                     postgresGID = None
                 pgserv = pgServiceFromConfig(
                     config,
-                    self.subServiceFactoryFactory(postgresUID, postgresGID),
+                    self.subServiceFactoryFactory(createMainService, postgresUID, postgresGID),
                     postgresUID, postgresGID
                 )
                 return pgserv

Modified: CalendarServer/trunk/calendarserver/tap/util.py
===================================================================
--- CalendarServer/trunk/calendarserver/tap/util.py	2010-11-12 00:32:19 UTC (rev 6626)
+++ CalendarServer/trunk/calendarserver/tap/util.py	2010-11-12 19:03:22 UTC (rev 6627)
@@ -326,14 +326,6 @@
         raise
 
     #
-    # Configure Memcached Client Pool
-    #
-    memcachepool.installPools(
-        config.Memcached.Pools,
-        config.Memcached.MaxClients,
-    )
-
-    #
     # Configure the Site and Wrappers
     #
     credentialFactories = []

Modified: CalendarServer/trunk/txdav/base/datastore/subpostgres.py
===================================================================
--- CalendarServer/trunk/txdav/base/datastore/subpostgres.py	2010-11-12 00:32:19 UTC (rev 6626)
+++ CalendarServer/trunk/txdav/base/datastore/subpostgres.py	2010-11-12 19:03:22 UTC (rev 6627)
@@ -402,6 +402,9 @@
                 uid=self.uid, gid=self.gid,
             )
             def doCreate(result):
+                if result.find("FATAL:") != -1:
+                    log.error(result)
+                    raise RuntimeError("Unable to initialize postgres database: %s" % (result,))
                 self.startDatabase()
             dbInited.addCallback(doCreate)
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20101112/6520b275/attachment.html>


More information about the calendarserver-changes mailing list