<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[15342] CalendarServer/trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.calendarserver.org//changeset/15342">15342</a></dd>
<dt>Author</dt> <dd>cdaboo@apple.com</dd>
<dt>Date</dt> <dd>2015-11-19 17:57:34 -0800 (Thu, 19 Nov 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>v5/v8 podding fixes.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#CalendarServertrunkrequirementscstxt">CalendarServer/trunk/requirements-cs.txt</a></li>
<li><a href="#CalendarServertrunktwistedcaldavsharingpy">CalendarServer/trunk/twistedcaldav/sharing.py</a></li>
<li><a href="#CalendarServertrunktxdavcaldavdatastoreschedulingischedulelocalserverspy">CalendarServer/trunk/txdav/caldav/datastore/scheduling/ischedule/localservers.py</a></li>
<li><a href="#CalendarServertrunktxdavcommondatastoresqlpy">CalendarServer/trunk/txdav/common/datastore/sql.py</a></li>
<li><a href="#CalendarServertrunktxdavwhodelegatespy">CalendarServer/trunk/txdav/who/delegates.py</a></li>
<li><a href="#CalendarServertrunktxdavwhogroupspy">CalendarServer/trunk/txdav/who/groups.py</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="CalendarServertrunkrequirementscstxt"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/requirements-cs.txt (15341 => 15342)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/requirements-cs.txt        2015-11-20 01:55:39 UTC (rev 15341)
+++ CalendarServer/trunk/requirements-cs.txt        2015-11-20 01:57:34 UTC (rev 15342)
</span><span class="lines">@@ -7,7 +7,7 @@
</span><span class="cx"> zope.interface==4.1.3
</span><span class="cx">          setuptools==18.5
</span><span class="cx">
</span><del>- --editable svn+http://svn.calendarserver.org/repository/calendarserver/twext/trunk@15335#egg=twextpy
</del><ins>+ --editable svn+http://svn.calendarserver.org/repository/calendarserver/twext/trunk@15341#egg=twextpy
</ins><span class="cx"> cffi==1.3.0
</span><span class="cx"> pycparser==2.14
</span><span class="cx"> #twisted
</span></span></pre></div>
<a id="CalendarServertrunktwistedcaldavsharingpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twistedcaldav/sharing.py (15341 => 15342)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twistedcaldav/sharing.py        2015-11-20 01:55:39 UTC (rev 15341)
+++ CalendarServer/trunk/twistedcaldav/sharing.py        2015-11-20 01:57:34 UTC (rev 15342)
</span><span class="lines">@@ -554,11 +554,15 @@
</span><span class="cx"> if sharee is None:
</span><span class="cx"> returnValue(False)
</span><span class="cx">
</span><del>- result = (yield self._newStoreObject.inviteUIDToShare(
- sharee.principalUID(),
- invitationBindModeFromXMLMap[type(ace)],
- summary,
- ))
</del><ins>+ try:
+ result = (yield self._newStoreObject.inviteUIDToShare(
+ sharee.principalUID(),
+ invitationBindModeFromXMLMap[type(ace)],
+ summary,
+ ))
+ except Exception as e:
+ self.log.error("Could not send sharing invite '{userid}': {ex}", userid=userid, ex=e)
+ result = None
</ins><span class="cx">
</span><span class="cx"> returnValue(result)
</span><span class="cx">
</span><span class="lines">@@ -577,7 +581,11 @@
</span><span class="cx"> else:
</span><span class="cx"> returnValue(False)
</span><span class="cx">
</span><del>- result = (yield self._newStoreObject.uninviteUIDFromShare(uid))
</del><ins>+ try:
+ result = (yield self._newStoreObject.uninviteUIDFromShare(uid))
+ except Exception as e:
+ self.log.error("Could not send sharing uninvite '{userid}': {ex}", userid=userid, ex=e)
+ result = None
</ins><span class="cx">
</span><span class="cx"> returnValue(result)
</span><span class="cx">
</span></span></pre></div>
<a id="CalendarServertrunktxdavcaldavdatastoreschedulingischedulelocalserverspy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/caldav/datastore/scheduling/ischedule/localservers.py (15341 => 15342)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/caldav/datastore/scheduling/ischedule/localservers.py        2015-11-20 01:55:39 UTC (rev 15341)
+++ CalendarServer/trunk/txdav/caldav/datastore/scheduling/ischedule/localservers.py        2015-11-20 01:57:34 UTC (rev 15342)
</span><span class="lines">@@ -105,8 +105,8 @@
</span><span class="cx"> return self._thisServer
</span><span class="cx">
</span><span class="cx">
</span><del>- def allServersExceptThis(self):
- return filter(lambda x: x != self._thisServer, self._servers.values())
</del><ins>+ def allServersExceptThis(self, filter_v5=False):
+ return filter(lambda x: x != self._thisServer and not (filter_v5 and x.v5), self._servers.values())
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> def installReverseProxies(self, maxClients):
</span></span></pre></div>
<a id="CalendarServertrunktxdavcommondatastoresqlpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/common/datastore/sql.py (15341 => 15342)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/common/datastore/sql.py        2015-11-20 01:55:39 UTC (rev 15341)
+++ CalendarServer/trunk/txdav/common/datastore/sql.py        2015-11-20 01:57:34 UTC (rev 15342)
</span><span class="lines">@@ -1951,9 +1951,11 @@
</span><span class="cx">
</span><span class="cx"> if status is None:
</span><span class="cx"> createStatus = _HOME_STATUS_NORMAL if record.thisServer() else _HOME_STATUS_EXTERNAL
</span><ins>+ if record.server() is not None and record.server().v5:
+ raise RecordNotAllowedError("Cannot create external home for user on v5 pod: {}".format(uid))
</ins><span class="cx"> elif status == _HOME_STATUS_MIGRATING:
</span><span class="cx"> if record.thisServer():
</span><del>- raise RecordNotAllowedError("Cannot migrate a user data for a user already hosted on this server")
</del><ins>+ raise RecordNotAllowedError("Cannot migrate user data for a user already hosted on this server")
</ins><span class="cx"> createStatus = status
</span><span class="cx"> elif status in (_HOME_STATUS_NORMAL, _HOME_STATUS_EXTERNAL,):
</span><span class="cx"> createStatus = status
</span></span></pre></div>
<a id="CalendarServertrunktxdavwhodelegatespy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/who/delegates.py (15341 => 15342)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/who/delegates.py        2015-11-20 01:55:39 UTC (rev 15341)
+++ CalendarServer/trunk/txdav/who/delegates.py        2015-11-20 01:57:34 UTC (rev 15342)
</span><span class="lines">@@ -568,7 +568,10 @@
</span><span class="cx"> @param readWrite: if True, read and write access is granted; read-only
</span><span class="cx"> access otherwise
</span><span class="cx"> """
</span><del>- return txn.store().conduit.send_set_delegates(txn, delegator, delegates, readWrite)
</del><ins>+ if delegator.server().v5:
+ return succeed(None)
+ else:
+ return txn.store().conduit.send_set_delegates(txn, delegator, delegates, readWrite)
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> def _podDelegates(self, txn, delegator, readWrite, expanded=False):
</span><span class="lines">@@ -584,7 +587,10 @@
</span><span class="cx"> """
</span><span class="cx">
</span><span class="cx"> log.debug("_podDelegates for: {uid} and read-write = {rw} and expanded = {expanded}", uid=delegator.uid, rw=readWrite, expanded=expanded)
</span><del>- return txn.store().conduit.send_get_delegates(txn, delegator, readWrite, expanded)
</del><ins>+ if delegator.server().v5:
+ return succeed(set())
+ else:
+ return txn.store().conduit.send_get_delegates(txn, delegator, readWrite, expanded)
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> @inlineCallbacks
</span><span class="lines">@@ -602,10 +608,14 @@
</span><span class="cx"> """
</span><span class="cx">
</span><span class="cx"> log.debug("_podDelegators for: {uid} and read-write = {rw}", uid=delegate.uid, rw=readWrite)
</span><del>- results = yield DeferredList([
- txn.store().conduit.send_get_delegators(txn, server, delegate, readWrite) for
- server in txn.directoryService().serversDB().allServersExceptThis()
- ], consumeErrors=True)
</del><ins>+ otherServers = txn.directoryService().serversDB().allServersExceptThis(filter_v5=True)
+ if len(otherServers) != 0:
+ results = yield DeferredList([
+ txn.store().conduit.send_get_delegators(txn, server, delegate, readWrite) for
+ server in txn.directoryService().serversDB().allServersExceptThis()
+ ], consumeErrors=True)
+ else:
+ results = []
</ins><span class="cx"> delegators = set()
</span><span class="cx"> for result in results:
</span><span class="cx"> if result and result[0]:
</span></span></pre></div>
<a id="CalendarServertrunktxdavwhogroupspy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/who/groups.py (15341 => 15342)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/who/groups.py        2015-11-20 01:55:39 UTC (rev 15341)
+++ CalendarServer/trunk/txdav/who/groups.py        2015-11-20 01:57:34 UTC (rev 15342)
</span><span class="lines">@@ -513,10 +513,13 @@
</span><span class="cx"> )
</span><span class="cx">
</span><span class="cx"> # Also get group delegates from other pods
</span><del>- if txn.directoryService().serversDB() is not None and len(txn.directoryService().serversDB().allServersExceptThis()) != 0:
</del><ins>+ if (
+ txn.directoryService().serversDB() is not None and
+ len(txn.directoryService().serversDB().allServersExceptThis(filter_v5=True)) != 0
+ ):
</ins><span class="cx"> results = yield DeferredList([
</span><span class="cx"> txn.store().conduit.send_all_group_delegates(txn, server) for
</span><del>- server in txn.directoryService().serversDB().allServersExceptThis()
</del><ins>+ server in txn.directoryService().serversDB().allServersExceptThis(filter_v5=True)
</ins><span class="cx"> ], consumeErrors=True)
</span><span class="cx"> for result in results:
</span><span class="cx"> if result and result[0]:
</span></span></pre>
</div>
</div>
</body>
</html>