[CalendarServer-changes] [11110] CalendarServer/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Fri Apr 26 20:39:21 PDT 2013
Revision: 11110
http://trac.calendarserver.org//changeset/11110
Author: sagen at apple.com
Date: 2013-04-26 20:39:21 -0700 (Fri, 26 Apr 2013)
Log Message:
-----------
Rather than making ServerRoot absolute (which causes problem for the stats socket when you have deeply nested directories), make postgres logfile path absolute prior to calling pg_ctl
Modified Paths:
--------------
CalendarServer/trunk/calendarserver/tap/test/test_util.py
CalendarServer/trunk/twistedcaldav/stdconfig.py
CalendarServer/trunk/twistedcaldav/test/test_stdconfig.py
CalendarServer/trunk/txdav/base/datastore/subpostgres.py
Modified: CalendarServer/trunk/calendarserver/tap/test/test_util.py
===================================================================
--- CalendarServer/trunk/calendarserver/tap/test/test_util.py 2013-04-27 03:20:20 UTC (rev 11109)
+++ CalendarServer/trunk/calendarserver/tap/test/test_util.py 2013-04-27 03:39:21 UTC (rev 11110)
@@ -182,9 +182,6 @@
successValue = "four success"
errorValue = "four failure"
- # def stepWithFailure(self, failure):
- # Step.stepWithFailure(self, failure)
- # return succeed(None)
class StepperTestCase(TestCase):
Modified: CalendarServer/trunk/twistedcaldav/stdconfig.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/stdconfig.py 2013-04-27 03:20:20 UTC (rev 11109)
+++ CalendarServer/trunk/twistedcaldav/stdconfig.py 2013-04-27 03:39:21 UTC (rev 11110)
@@ -1089,7 +1089,6 @@
# Remove possible trailing slash from ServerRoot
try:
configDict["ServerRoot"] = configDict["ServerRoot"].rstrip("/")
- configDict["ServerRoot"] = os.path.abspath(configDict["ServerRoot"])
except KeyError:
pass
Modified: CalendarServer/trunk/twistedcaldav/test/test_stdconfig.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/test_stdconfig.py 2013-04-27 03:20:20 UTC (rev 11109)
+++ CalendarServer/trunk/twistedcaldav/test/test_stdconfig.py 2013-04-27 03:39:21 UTC (rev 11110)
@@ -15,7 +15,6 @@
# limitations under the License.
##
-import os
from cStringIO import StringIO
from twext.python.filepath import CachingFilePath as FilePath
@@ -152,11 +151,6 @@
_updateDataStore(configDict)
self.assertEquals(configDict["ServerRoot"], "/a/b/c")
- configDict = {
- "ServerRoot" : "./a",
- }
- _updateDataStore(configDict)
- self.assertEquals(configDict["ServerRoot"], os.path.join(os.getcwd(), "a"))
def test_updateMultiProcess(self):
def stubProcessCount(*args):
Modified: CalendarServer/trunk/txdav/base/datastore/subpostgres.py
===================================================================
--- CalendarServer/trunk/txdav/base/datastore/subpostgres.py 2013-04-27 03:20:20 UTC (rev 11109)
+++ CalendarServer/trunk/txdav/base/datastore/subpostgres.py 2013-04-27 03:39:21 UTC (rev 11110)
@@ -205,7 +205,9 @@
# Options from config
self.databaseName = databaseName
- self.logFile = logFile
+ # Make logFile absolute in case the working directory of postgres is
+ # elsewhere:
+ self.logFile = os.path.abspath(logFile)
if listenAddresses:
self.socketDir = None
self.host, self.port = listenAddresses[0].split(":") if ":" in listenAddresses[0] else (listenAddresses[0], None,)
@@ -510,6 +512,7 @@
if self.shouldStopDatabase:
monitor = _PostgresMonitor()
pgCtl = self.pgCtl()
+ # FIXME: why is this 'logfile' and not self.logfile?
self.reactor.spawnProcess(monitor, pgCtl,
[pgCtl, '-l', 'logfile', 'stop'],
env=self.env, path=self.workingDir.path,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130426/68dc1425/attachment.html>
More information about the calendarserver-changes
mailing list