[CalendarServer-changes] [11848] CalendarServer/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Wed Mar 12 11:24:05 PDT 2014
Revision: 11848
http://trac.calendarserver.org//changeset/11848
Author: sagen at apple.com
Date: 2013-10-30 09:55:51 -0700 (Wed, 30 Oct 2013)
Log Message:
-----------
Stop the server if upgrade failed (and fix the message displayed by calendarserver_upgrade if it fails)
Modified Paths:
--------------
CalendarServer/trunk/calendarserver/tools/upgrade.py
CalendarServer/trunk/txdav/common/datastore/upgrade/sql/upgrade.py
Modified: CalendarServer/trunk/calendarserver/tools/upgrade.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/upgrade.py 2013-10-30 16:44:52 UTC (rev 11847)
+++ CalendarServer/trunk/calendarserver/tools/upgrade.py 2013-10-30 16:55:51 UTC (rev 11848)
@@ -142,11 +142,14 @@
"""
Immediately stop. The upgrade will have been run before this.
"""
- # If we get this far the database is OK
- if self.options["status"]:
- self.output.write("Database OK.\n")
+ if self.store is None:
+ self.output.write("Upgrade failed.\n")
else:
- self.output.write("Upgrade complete, shutting down.\n")
+ # If we get this far the database is OK
+ if self.options["status"]:
+ self.output.write("Database OK.\n")
+ else:
+ self.output.write("Upgrade complete, shutting down.\n")
UpgraderService.started = True
from twisted.internet import reactor
Modified: CalendarServer/trunk/txdav/common/datastore/upgrade/sql/upgrade.py
===================================================================
--- CalendarServer/trunk/txdav/common/datastore/upgrade/sql/upgrade.py 2013-10-30 16:44:52 UTC (rev 11847)
+++ CalendarServer/trunk/txdav/common/datastore/upgrade/sql/upgrade.py 2013-10-30 16:55:51 UTC (rev 11848)
@@ -73,12 +73,8 @@
yield sqlTxn.releaseUpgradeLock()
yield sqlTxn.commit()
+
- def stepWithFailure(self, failure):
- return self.stepWithResult(None)
-
-
-
class UpgradeDatabaseCoreStep(object):
"""
Base class for either schema or data upgrades on the database.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140312/f3396ec9/attachment.html>
More information about the calendarserver-changes
mailing list