[CalendarServer-changes] [6222] CalendarServer/trunk/txdav/base/datastore/subpostgres.py

source_changes at macosforge.org source_changes at macosforge.org
Tue Aug 31 16:02:44 PDT 2010


Revision: 6222
          http://trac.macosforge.org/projects/calendarserver/changeset/6222
Author:   sagen at apple.com
Date:     2010-08-31 16:02:43 -0700 (Tue, 31 Aug 2010)
Log Message:
-----------
If startup gets interrupted and the Database directory gets created but not the cluster subdirectory, the server won't ever try to initialize the cluster directory.  Now, instead we initialize again if the cluster subdirectory is not present.

Modified Paths:
--------------
    CalendarServer/trunk/txdav/base/datastore/subpostgres.py

Modified: CalendarServer/trunk/txdav/base/datastore/subpostgres.py
===================================================================
--- CalendarServer/trunk/txdav/base/datastore/subpostgres.py	2010-08-31 22:37:04 UTC (rev 6221)
+++ CalendarServer/trunk/txdav/base/datastore/subpostgres.py	2010-08-31 23:02:43 UTC (rev 6222)
@@ -403,11 +403,13 @@
             self.socketDir.createDirectory()
         if self.uid and self.gid:
             os.chown(self.socketDir.path, self.uid, self.gid)
-        if self.dataStoreDirectory.isdir():
+        if clusterDir.isdir():
             self.startDatabase()
         else:
-            self.dataStoreDirectory.createDirectory()
-            workingDir.createDirectory()
+            if not self.dataStoreDirectory.isdir():
+                self.dataStoreDirectory.createDirectory()
+            if not workingDir.isdir():
+                workingDir.createDirectory()
             if self.uid and self.gid:
                 os.chown(self.dataStoreDirectory.path, self.uid, self.gid)
                 os.chown(workingDir.path, self.uid, self.gid)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100831/29b46bfc/attachment.html>


More information about the calendarserver-changes mailing list