[CalendarServer-changes] [11146] CalendarServer/branches/users/gaya/sharedgroups-3

source_changes at macosforge.org source_changes at macosforge.org
Tue May 7 19:24:33 PDT 2013


Revision: 11146
          http://trac.calendarserver.org//changeset/11146
Author:   gaya at apple.com
Date:     2013-05-07 19:24:33 -0700 (Tue, 07 May 2013)
Log Message:
-----------
merge up to 11138

Modified Paths:
--------------
    CalendarServer/branches/users/gaya/sharedgroups-3/calendarserver/tap/util.py
    CalendarServer/branches/users/gaya/sharedgroups-3/calendarserver/tools/test/gateway/caldavd.plist
    CalendarServer/branches/users/gaya/sharedgroups-3/calendarserver/tools/test/principals/caldavd.plist
    CalendarServer/branches/users/gaya/sharedgroups-3/calendarserver/tools/test/test_gateway.py
    CalendarServer/branches/users/gaya/sharedgroups-3/calendarserver/tools/test/test_principals.py
    CalendarServer/branches/users/gaya/sharedgroups-3/conf/caldavd-apple.plist
    CalendarServer/branches/users/gaya/sharedgroups-3/contrib/launchd/calendarserver.plist
    CalendarServer/branches/users/gaya/sharedgroups-3/twistedcaldav/stdconfig.py
    CalendarServer/branches/users/gaya/sharedgroups-3/txdav/base/datastore/subpostgres.py

Property Changed:
----------------
    CalendarServer/branches/users/gaya/sharedgroups-3/


Property changes on: CalendarServer/branches/users/gaya/sharedgroups-3
___________________________________________________________________
Modified: svn:mergeinfo
   - /CalendarServer/branches/config-separation:4379-4443
/CalendarServer/branches/egg-info-351:4589-4625
/CalendarServer/branches/generic-sqlstore:6167-6191
/CalendarServer/branches/new-store:5594-5934
/CalendarServer/branches/new-store-no-caldavfile:5911-5935
/CalendarServer/branches/new-store-no-caldavfile-2:5936-5981
/CalendarServer/branches/release/CalendarServer-4.3-dev:10180-10190,10192
/CalendarServer/branches/users/cdaboo/batchupload-6699:6700-7198
/CalendarServer/branches/users/cdaboo/cached-subscription-calendars-5692:5693-5702
/CalendarServer/branches/users/cdaboo/component-set-fixes:8130-8346
/CalendarServer/branches/users/cdaboo/directory-cache-on-demand-3627:3628-3644
/CalendarServer/branches/users/cdaboo/implicituidrace:8137-8141
/CalendarServer/branches/users/cdaboo/ischedule-dkim:9747-9979
/CalendarServer/branches/users/cdaboo/managed-attachments:9985-10145
/CalendarServer/branches/users/cdaboo/more-sharing-5591:5592-5601
/CalendarServer/branches/users/cdaboo/partition-4464:4465-4957
/CalendarServer/branches/users/cdaboo/pods:7297-7377
/CalendarServer/branches/users/cdaboo/pycalendar:7085-7206
/CalendarServer/branches/users/cdaboo/pycard:7227-7237
/CalendarServer/branches/users/cdaboo/queued-attendee-refreshes:7740-8287
/CalendarServer/branches/users/cdaboo/relative-config-paths-5070:5071-5105
/CalendarServer/branches/users/cdaboo/shared-calendars-5187:5188-5440
/CalendarServer/branches/users/cdaboo/timezones:7443-7699
/CalendarServer/branches/users/cdaboo/txn-debugging:8730-8743
/CalendarServer/branches/users/glyph/always-abort-txn-on-error:9958-9969
/CalendarServer/branches/users/glyph/case-insensitive-uid:8772-8805
/CalendarServer/branches/users/glyph/conn-limit:6574-6577
/CalendarServer/branches/users/glyph/contacts-server-merge:4971-5080
/CalendarServer/branches/users/glyph/dalify:6932-7023
/CalendarServer/branches/users/glyph/db-reconnect:6824-6876
/CalendarServer/branches/users/glyph/deploybuild:7563-7572
/CalendarServer/branches/users/glyph/digest-auth-redux:10624-10635
/CalendarServer/branches/users/glyph/disable-quota:7718-7727
/CalendarServer/branches/users/glyph/dont-start-postgres:6592-6614
/CalendarServer/branches/users/glyph/imip-and-admin-html:7866-7984
/CalendarServer/branches/users/glyph/ipv6-client:9054-9105
/CalendarServer/branches/users/glyph/linux-tests:6893-6900
/CalendarServer/branches/users/glyph/migrate-merge:8690-8713
/CalendarServer/branches/users/glyph/misc-portability-fixes:7365-7374
/CalendarServer/branches/users/glyph/more-deferreds-6:6322-6368
/CalendarServer/branches/users/glyph/more-deferreds-7:6369-6445
/CalendarServer/branches/users/glyph/multiget-delete:8321-8330
/CalendarServer/branches/users/glyph/new-export:7444-7485
/CalendarServer/branches/users/glyph/one-home-list-api:10048-10073
/CalendarServer/branches/users/glyph/oracle:7106-7155
/CalendarServer/branches/users/glyph/oracle-nulls:7340-7351
/CalendarServer/branches/users/glyph/other-html:8062-8091
/CalendarServer/branches/users/glyph/parallel-sim:8240-8251
/CalendarServer/branches/users/glyph/parallel-upgrade:8376-8400
/CalendarServer/branches/users/glyph/parallel-upgrade_to_1:8571-8583
/CalendarServer/branches/users/glyph/q:9560-9688
/CalendarServer/branches/users/glyph/queue-locking-and-timing:10204-10289
/CalendarServer/branches/users/glyph/quota:7604-7637
/CalendarServer/branches/users/glyph/sendfdport:5388-5424
/CalendarServer/branches/users/glyph/shared-pool-fixes:8436-8443
/CalendarServer/branches/users/glyph/shared-pool-take2:8155-8174
/CalendarServer/branches/users/glyph/sharedpool:6490-6550
/CalendarServer/branches/users/glyph/sharing-api:9192-9205
/CalendarServer/branches/users/glyph/skip-lonely-vtimezones:8524-8535
/CalendarServer/branches/users/glyph/sql-store:5929-6073
/CalendarServer/branches/users/glyph/start-service-start-loop:11060-11065
/CalendarServer/branches/users/glyph/subtransactions:7248-7258
/CalendarServer/branches/users/glyph/table-alias:8651-8664
/CalendarServer/branches/users/glyph/uidexport:7673-7676
/CalendarServer/branches/users/glyph/unshare-when-access-revoked:10562-10595
/CalendarServer/branches/users/glyph/use-system-twisted:5084-5149
/CalendarServer/branches/users/glyph/uuid-normalize:9268-9296
/CalendarServer/branches/users/glyph/xattrs-from-files:7757-7769
/CalendarServer/branches/users/sagen/applepush:8126-8184
/CalendarServer/branches/users/sagen/inboxitems:7380-7381
/CalendarServer/branches/users/sagen/locations-resources:5032-5051
/CalendarServer/branches/users/sagen/locations-resources-2:5052-5061
/CalendarServer/branches/users/sagen/purge_old_events:6735-6746
/CalendarServer/branches/users/sagen/resource-delegates-4038:4040-4067
/CalendarServer/branches/users/sagen/resource-delegates-4066:4068-4075
/CalendarServer/branches/users/sagen/resources-2:5084-5093
/CalendarServer/branches/users/sagen/testing:10827-10851,10853-10855
/CalendarServer/branches/users/wsanchez/transations:5515-5593
/CalendarServer/trunk:11090-11095,11097-11111
   + /CalendarServer/branches/config-separation:4379-4443
/CalendarServer/branches/egg-info-351:4589-4625
/CalendarServer/branches/generic-sqlstore:6167-6191
/CalendarServer/branches/new-store:5594-5934
/CalendarServer/branches/new-store-no-caldavfile:5911-5935
/CalendarServer/branches/new-store-no-caldavfile-2:5936-5981
/CalendarServer/branches/release/CalendarServer-4.3-dev:10180-10190,10192
/CalendarServer/branches/users/cdaboo/batchupload-6699:6700-7198
/CalendarServer/branches/users/cdaboo/cached-subscription-calendars-5692:5693-5702
/CalendarServer/branches/users/cdaboo/component-set-fixes:8130-8346
/CalendarServer/branches/users/cdaboo/directory-cache-on-demand-3627:3628-3644
/CalendarServer/branches/users/cdaboo/implicituidrace:8137-8141
/CalendarServer/branches/users/cdaboo/ischedule-dkim:9747-9979
/CalendarServer/branches/users/cdaboo/managed-attachments:9985-10145
/CalendarServer/branches/users/cdaboo/more-sharing-5591:5592-5601
/CalendarServer/branches/users/cdaboo/partition-4464:4465-4957
/CalendarServer/branches/users/cdaboo/pods:7297-7377
/CalendarServer/branches/users/cdaboo/pycalendar:7085-7206
/CalendarServer/branches/users/cdaboo/pycard:7227-7237
/CalendarServer/branches/users/cdaboo/queued-attendee-refreshes:7740-8287
/CalendarServer/branches/users/cdaboo/relative-config-paths-5070:5071-5105
/CalendarServer/branches/users/cdaboo/shared-calendars-5187:5188-5440
/CalendarServer/branches/users/cdaboo/timezones:7443-7699
/CalendarServer/branches/users/cdaboo/txn-debugging:8730-8743
/CalendarServer/branches/users/glyph/always-abort-txn-on-error:9958-9969
/CalendarServer/branches/users/glyph/case-insensitive-uid:8772-8805
/CalendarServer/branches/users/glyph/conn-limit:6574-6577
/CalendarServer/branches/users/glyph/contacts-server-merge:4971-5080
/CalendarServer/branches/users/glyph/dalify:6932-7023
/CalendarServer/branches/users/glyph/db-reconnect:6824-6876
/CalendarServer/branches/users/glyph/deploybuild:7563-7572
/CalendarServer/branches/users/glyph/digest-auth-redux:10624-10635
/CalendarServer/branches/users/glyph/disable-quota:7718-7727
/CalendarServer/branches/users/glyph/dont-start-postgres:6592-6614
/CalendarServer/branches/users/glyph/imip-and-admin-html:7866-7984
/CalendarServer/branches/users/glyph/ipv6-client:9054-9105
/CalendarServer/branches/users/glyph/linux-tests:6893-6900
/CalendarServer/branches/users/glyph/migrate-merge:8690-8713
/CalendarServer/branches/users/glyph/misc-portability-fixes:7365-7374
/CalendarServer/branches/users/glyph/more-deferreds-6:6322-6368
/CalendarServer/branches/users/glyph/more-deferreds-7:6369-6445
/CalendarServer/branches/users/glyph/multiget-delete:8321-8330
/CalendarServer/branches/users/glyph/new-export:7444-7485
/CalendarServer/branches/users/glyph/one-home-list-api:10048-10073
/CalendarServer/branches/users/glyph/oracle:7106-7155
/CalendarServer/branches/users/glyph/oracle-nulls:7340-7351
/CalendarServer/branches/users/glyph/other-html:8062-8091
/CalendarServer/branches/users/glyph/parallel-sim:8240-8251
/CalendarServer/branches/users/glyph/parallel-upgrade:8376-8400
/CalendarServer/branches/users/glyph/parallel-upgrade_to_1:8571-8583
/CalendarServer/branches/users/glyph/q:9560-9688
/CalendarServer/branches/users/glyph/queue-locking-and-timing:10204-10289
/CalendarServer/branches/users/glyph/quota:7604-7637
/CalendarServer/branches/users/glyph/sendfdport:5388-5424
/CalendarServer/branches/users/glyph/shared-pool-fixes:8436-8443
/CalendarServer/branches/users/glyph/shared-pool-take2:8155-8174
/CalendarServer/branches/users/glyph/sharedpool:6490-6550
/CalendarServer/branches/users/glyph/sharing-api:9192-9205
/CalendarServer/branches/users/glyph/skip-lonely-vtimezones:8524-8535
/CalendarServer/branches/users/glyph/sql-store:5929-6073
/CalendarServer/branches/users/glyph/start-service-start-loop:11060-11065
/CalendarServer/branches/users/glyph/subtransactions:7248-7258
/CalendarServer/branches/users/glyph/table-alias:8651-8664
/CalendarServer/branches/users/glyph/uidexport:7673-7676
/CalendarServer/branches/users/glyph/unshare-when-access-revoked:10562-10595
/CalendarServer/branches/users/glyph/use-system-twisted:5084-5149
/CalendarServer/branches/users/glyph/uuid-normalize:9268-9296
/CalendarServer/branches/users/glyph/xattrs-from-files:7757-7769
/CalendarServer/branches/users/sagen/applepush:8126-8184
/CalendarServer/branches/users/sagen/inboxitems:7380-7381
/CalendarServer/branches/users/sagen/locations-resources:5032-5051
/CalendarServer/branches/users/sagen/locations-resources-2:5052-5061
/CalendarServer/branches/users/sagen/purge_old_events:6735-6746
/CalendarServer/branches/users/sagen/resource-delegates-4038:4040-4067
/CalendarServer/branches/users/sagen/resource-delegates-4066:4068-4075
/CalendarServer/branches/users/sagen/resources-2:5084-5093
/CalendarServer/branches/users/sagen/testing:10827-10851,10853-10855
/CalendarServer/branches/users/wsanchez/transations:5515-5593
/CalendarServer/trunk:11090-11095,11097-11111,11115-11138

Modified: CalendarServer/branches/users/gaya/sharedgroups-3/calendarserver/tap/util.py
===================================================================
--- CalendarServer/branches/users/gaya/sharedgroups-3/calendarserver/tap/util.py	2013-05-07 18:28:24 UTC (rev 11145)
+++ CalendarServer/branches/users/gaya/sharedgroups-3/calendarserver/tap/util.py	2013-05-08 02:24:33 UTC (rev 11146)
@@ -125,6 +125,7 @@
     return PostgresService(
         dbRoot, subServiceFactory, current_sql_schema,
         databaseName=config.Postgres.DatabaseName,
+        clusterName=config.Postgres.ClusterName,
         logFile=config.Postgres.LogFile,
         socketDir=config.RunRoot,
         listenAddresses=config.Postgres.ListenAddresses,

Modified: CalendarServer/branches/users/gaya/sharedgroups-3/calendarserver/tools/test/gateway/caldavd.plist
===================================================================
--- CalendarServer/branches/users/gaya/sharedgroups-3/calendarserver/tools/test/gateway/caldavd.plist	2013-05-07 18:28:24 UTC (rev 11145)
+++ CalendarServer/branches/users/gaya/sharedgroups-3/calendarserver/tools/test/gateway/caldavd.plist	2013-05-08 02:24:33 UTC (rev 11146)
@@ -85,6 +85,10 @@
     <key>ServerRoot</key>
     <string>%(ServerRoot)s</string>
 
+    <!-- Database root -->
+    <key>DatabaseRoot</key>
+    <string>%(DatabaseRoot)s</string>
+
     <!-- Data root -->
     <key>DataRoot</key>
     <string>Data</string>

Modified: CalendarServer/branches/users/gaya/sharedgroups-3/calendarserver/tools/test/principals/caldavd.plist
===================================================================
--- CalendarServer/branches/users/gaya/sharedgroups-3/calendarserver/tools/test/principals/caldavd.plist	2013-05-07 18:28:24 UTC (rev 11145)
+++ CalendarServer/branches/users/gaya/sharedgroups-3/calendarserver/tools/test/principals/caldavd.plist	2013-05-08 02:24:33 UTC (rev 11146)
@@ -81,6 +81,10 @@
     <key>DataRoot</key>
     <string>%(DataRoot)s</string>
 
+    <!-- Database root -->
+    <key>DatabaseRoot</key>
+    <string>%(DatabaseRoot)s</string>
+
     <!-- Document root -->
     <key>DocumentRoot</key>
     <string>%(DocumentRoot)s</string>

Modified: CalendarServer/branches/users/gaya/sharedgroups-3/calendarserver/tools/test/test_gateway.py
===================================================================
--- CalendarServer/branches/users/gaya/sharedgroups-3/calendarserver/tools/test/test_gateway.py	2013-05-07 18:28:24 UTC (rev 11145)
+++ CalendarServer/branches/users/gaya/sharedgroups-3/calendarserver/tools/test/test_gateway.py	2013-05-08 02:24:33 UTC (rev 11146)
@@ -27,6 +27,7 @@
 from twistedcaldav.config import config
 from twistedcaldav.test.util import TestCase, CapturingProcessProtocol
 from calendarserver.tools.util import getDirectory
+from txdav.common.datastore.test.util import SQLStoreBuilder
 
 
 class RunCommandTestCase(TestCase):
@@ -40,8 +41,11 @@
         template = templateFile.read()
         templateFile.close()
 
+        # Use the same DatabaseRoot as the SQLStoreBuilder
+        databaseRoot = os.path.abspath(SQLStoreBuilder.SHARED_DB_PATH)
         newConfig = template % {
             "ServerRoot" : os.path.abspath(config.ServerRoot),
+            "DatabaseRoot" : databaseRoot,
             "WritablePlist" : os.path.join(os.path.abspath(config.ConfigRoot), "caldavd-writable.plist"),
         }
         configFilePath = FilePath(os.path.join(config.ConfigRoot, "caldavd.plist"))

Modified: CalendarServer/branches/users/gaya/sharedgroups-3/calendarserver/tools/test/test_principals.py
===================================================================
--- CalendarServer/branches/users/gaya/sharedgroups-3/calendarserver/tools/test/test_principals.py	2013-05-07 18:28:24 UTC (rev 11145)
+++ CalendarServer/branches/users/gaya/sharedgroups-3/calendarserver/tools/test/test_principals.py	2013-05-08 02:24:33 UTC (rev 11146)
@@ -31,6 +31,7 @@
 from calendarserver.tap.util import directoryFromConfig
 from calendarserver.tools.principals import (parseCreationArgs, matchStrings,
     updateRecord, principalForPrincipalID, getProxies, setProxies)
+from txdav.common.datastore.test.util import SQLStoreBuilder
 
 
 class ManagePrincipalsTestCase(TestCase):
@@ -49,9 +50,13 @@
         template = templateFile.read()
         templateFile.close()
 
+        # Use the same DatabaseRoot as the SQLStoreBuilder
+        databaseRoot = os.path.abspath(SQLStoreBuilder.SHARED_DB_PATH)
+
         newConfig = template % {
             "ServerRoot" : os.path.abspath(config.ServerRoot),
             "DataRoot" : os.path.abspath(config.DataRoot),
+            "DatabaseRoot" : databaseRoot,
             "DocumentRoot" : os.path.abspath(config.DocumentRoot),
             "LogRoot" : os.path.abspath(config.LogRoot),
         }

Modified: CalendarServer/branches/users/gaya/sharedgroups-3/conf/caldavd-apple.plist
===================================================================
--- CalendarServer/branches/users/gaya/sharedgroups-3/conf/caldavd-apple.plist	2013-05-07 18:28:24 UTC (rev 11145)
+++ CalendarServer/branches/users/gaya/sharedgroups-3/conf/caldavd-apple.plist	2013-05-08 02:24:33 UTC (rev 11146)
@@ -114,12 +114,18 @@
         </array>
         <key>ExtraConnections</key>
         <integer>20</integer>
+        <key>ClusterName</key>
+        <string>cluster.pg</string>
     </dict>
 
     <!-- Data root -->
     <key>DataRoot</key>
     <string>Data</string>
 
+    <!-- Database root -->
+    <key>DatabaseRoot</key>
+    <string>Database.xpg</string>
+
     <!-- Document root -->
     <key>DocumentRoot</key>
     <string>Documents</string>

Modified: CalendarServer/branches/users/gaya/sharedgroups-3/contrib/launchd/calendarserver.plist
===================================================================
--- CalendarServer/branches/users/gaya/sharedgroups-3/contrib/launchd/calendarserver.plist	2013-05-07 18:28:24 UTC (rev 11145)
+++ CalendarServer/branches/users/gaya/sharedgroups-3/contrib/launchd/calendarserver.plist	2013-05-08 02:24:33 UTC (rev 11146)
@@ -57,6 +57,12 @@
 
   <key>PreventsSleep</key>
   <true/>
+  
+  <key>StandardOutPath</key>
+  <string>/var/log/caldavd/error.log</string>
 
+  <key>StandardErrorPath</key>
+  <string>/var/log/caldavd/error.log</string>
+
 </dict>
 </plist>

Modified: CalendarServer/branches/users/gaya/sharedgroups-3/twistedcaldav/stdconfig.py
===================================================================
--- CalendarServer/branches/users/gaya/sharedgroups-3/twistedcaldav/stdconfig.py	2013-05-07 18:28:24 UTC (rev 11145)
+++ CalendarServer/branches/users/gaya/sharedgroups-3/twistedcaldav/stdconfig.py	2013-05-08 02:24:33 UTC (rev 11146)
@@ -909,6 +909,7 @@
 
     "Postgres": {
         "DatabaseName": "caldav",
+        "ClusterName": "cluster",
         "LogFile": "postgres.log",
         "ListenAddresses": [],
         "SharedBuffers": 0, # BuffersToConnectionsRatio * MaxConnections

Modified: CalendarServer/branches/users/gaya/sharedgroups-3/txdav/base/datastore/subpostgres.py
===================================================================
--- CalendarServer/branches/users/gaya/sharedgroups-3/txdav/base/datastore/subpostgres.py	2013-05-07 18:28:24 UTC (rev 11145)
+++ CalendarServer/branches/users/gaya/sharedgroups-3/txdav/base/datastore/subpostgres.py	2013-05-08 02:24:33 UTC (rev 11146)
@@ -75,17 +75,17 @@
 
 
     def outReceived(self, out):
-        log.msg("received postgres stdout %r" % (out,))
+        log.warn("received postgres stdout %r" % (out,))
         # self.lineReceiver.dataReceived(out)
 
 
     def errReceived(self, err):
-        log.msg("received postgres stderr %r" % (err,))
+        log.warn("received postgres stderr %r" % (err,))
         self.lineReceiver.dataReceived(err)
 
 
     def processEnded(self, reason):
-        log.msg("postgres process ended %r" % (reason,))
+        log.warn("postgres process ended %r" % (reason,))
         result = (reason.value.status == 0)
         self.lineReceiver.connectionLost(reason)
         self.completionDeferred.callback(result)
@@ -158,6 +158,7 @@
 
     def __init__(self, dataStoreDirectory, subServiceFactory,
                  schema, resetSchema=False, databaseName='subpostgres',
+                 clusterName="cluster",
                  logFile="postgres.log", socketDir="/tmp",
                  listenAddresses=[], sharedBuffers=30,
                  maxConnections=20, options=[],
@@ -205,6 +206,7 @@
 
         # Options from config
         self.databaseName = databaseName
+        self.clusterName = clusterName
         # Make logFile absolute in case the working directory of postgres is
         # elsewhere:
         self.logFile = os.path.abspath(logFile)
@@ -426,6 +428,7 @@
         options.append("-c standard_conforming_strings=on")
         options.extend(self.options)
 
+        log.warn("Requesting postgres start via %s" % (pgCtl,))
         self.reactor.spawnProcess(
             monitor, pgCtl,
             [
@@ -443,6 +446,7 @@
         )
         self.monitor = monitor
         def gotReady(result):
+            log.warn("%s successful" % (pgCtl,))
             self.shouldStopDatabase = result
             self.ready(*createConnection())
             self.deactivateDelayedShutdown()
@@ -457,7 +461,7 @@
     def startService(self):
         MultiService.startService(self)
         self.activateDelayedShutdown()
-        clusterDir = self.dataStoreDirectory.child("cluster")
+        clusterDir = self.dataStoreDirectory.child(self.clusterName)
         env = self.env = os.environ.copy()
         env.update(PGDATA=clusterDir.path,
                    PGHOST=self.host,
@@ -468,11 +472,10 @@
                 self.socketDir.createDirectory()
             if self.uid and self.gid:
                 os.chown(self.socketDir.path, self.uid, self.gid)
-        if clusterDir.isdir():
+        if self.dataStoreDirectory.isdir():
             self.startDatabase()
         else:
-            if not self.dataStoreDirectory.isdir():
-                self.dataStoreDirectory.createDirectory()
+            self.dataStoreDirectory.createDirectory()
             if not self.workingDir.isdir():
                 self.workingDir.createDirectory()
             if self.uid and self.gid:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130507/6f8e79ee/attachment-0001.html>


More information about the calendarserver-changes mailing list