Re: [CalendarServer-dev] Migrating from 5.1 to 8.0 --was: Re: Circular reference in 8.0 (cannot import name GroupCacherPollingWork)

2016-06-10 Thread Andre LaBranche

> On Jun 10, 2016, at 4:46 AM, Axel Rau  wrote:
> 
> 
>> Am 08.06.2016 um 02:29 schrieb Andre LaBranche :
>> 
>>> 
>>> After putting the users e-mail address into short-name, everyone can 
>>> configure his account by e-mail and pw. (-:
>> 
>> Yay!
> 
> I have prepared a README about upgrading from 5.1 to 8.0 for my port users.
> I just wrote down, what I did. Please review and comment.

Hi,

Looks pretty good. Some comments:

guid is optional. If specified, it must be a uuid.
uid can be any valid unicode, and doesn't have to be a uuid. It helps if it's a 
uuid, but usually only in retrospect ;)

If I define an account like this, with no guid:


admin
admin
admin
Super User
ad...@example.com


... then view this user's principal page 
http://whatever/principals/users/admin, I see the following under "Calendar 
user addresses":

mailto:ad...@example.com
urn:x-uid:admin

Notably, there is no CUA in urn:uuid form because this record has no  
attribute. CUAs in urn:uuid form must contain uuids, while urn:x-uid doesn't 
have that restriction. The CUA forms you have in 5.x don't include urn:x-uid, 
so if you had guid defined in 5.x as something other than a uuid (and possibly 
also if you DIDN'T have guid defined), there is work to do at upgrade time to 
fix this.

It is recommended to specify a guid record attribute that contains a UUID.

> Then edit the dump and replace all occurences of [old_uid] by [new_uid]


This step is potentially destructive if not done correctly. I suspect some 
users might not be aware of the perils of, say, substring-based find/replace 
when old_uid might exist as a substring of other old_uids. I would recommend at 
least mentioning this possibility, or maybe even offering a basic but safe find 
/ replace technique for people to use. Be especially mindful of instances of 
any such strings in icalendar body texts that might need to be replaced, as the 
line wrapping in there is ... something to be aware of :) It's possible that a 
formally correct solution would require 'extreme' measures like exporting 
calendar_object.icalendar_text from the DB separately and using a find / 
replace tool built around an iCalendar parser, to handle the details of the 
iCalendar format itself (un-wrapping the lines to get accurate matches and then 
maybe re-wrapping them to conform to the spec). If it comes to that, 
pycalendar.utils 

 should help.

Along the same lines, the steps as written will have the user edit the backup 
and then drop the DB from the server, leaving them with (maybe) only one backup 
that might have been incorrectly edited. Consider adding a suggestion to make a 
copy of the pg backup before editing it.

(if I seem overly cautious, that may be because freebsd users are not my 
primary audience in my day job ;)

Also, I note that you are opting to allow the server to upgrade itself instead 
of requiring manual invocation of calendarserver_upgrade. Is this done to avoid 
the circular import error?

Thx,
-dre___
calendarserver-dev mailing list
calendarserver-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/calendarserver-dev


Re: [CalendarServer-dev] Migrating from 5.1 to 8.0 --was: Re: Circular reference in 8.0 (cannot import name GroupCacherPollingWork)

2016-06-10 Thread Axel Rau

> Am 08.06.2016 um 02:29 schrieb Andre LaBranche :
> 
>> 
>> After putting the users e-mail address into short-name, everyone can 
>> configure his account by e-mail and pw. (-:
> 
> Yay!

I have prepared a README about upgrading from 5.1 to 8.0 for my port users.
I just wrote down, what I did. Please review and comment.

Axel
README for upgrading from 5.1 to 8.0, assuming, you are using XML directory
service. (in case of LDAP or OD, act accordingly)

1. accounts.xml has a new layout - see
/usr/local/share/examples/calendarserver/auth/accounts.xml

2. In that file,  and  must now be a valid UUID like
 FCB7BFFB-624D-4201-BA65-E133E439A661
is optional. If both are present uuids must be identical.
   
   Clients may be configured with uuid in server path so:
 /principals/__uids__/FCB7BFFB-624D-4201-BA65-E133E439A661
   At your users convinience you can enter her e-mail address into ,
   which may be used as user name instead of server path.
   The e-mail address must be unique.

3. Stop your server, fix accounts.xml and database.

   If you have accounts without correct uuids, take a note of the current uid,
[old_uid] before replacing it by a real uuid [new_uid].
Creating new uuids can be done with python so:

# python
Python 2.7.11 (default, Jun  5 2016, 06:09:57) 
[GCC 4.2.1 Compatible FreeBSD Clang 3.4.1 . . .
>>> import uuid
>>> str(uuid.uuid4()).upper()
'22F5BC05-8EDE-421E-99DD-CEDE1B814635'
>>> str(uuid.uuid4()).upper()
'A7211FE0-1D8F-474B-A5AB-262668EECE6C'

You must adjust your database as follows:
Take a backup of your db or schema in text form like:

/usr/local/bin/pg_dump --host=db1 --schema=caldavd development > \
/tmp/DB-backups/development_caldavd_2016-6-9.sql

Then edit the dump and replace all occurences of [old_uid] by [new_uid].

Drop the database or the schema and re-create it with edited backup.

4. Fix caldavd.plist
 Adjust AdminPrincipals if you changed the admin uid above.
 DatabaseConnection has a new format.
   For these and all other changes review your plist, using
 /usr/local/share/examples/calendarserver/caldav.plist
 
5. Start the server and follow server log. You should see messages about schema
 and data migration like
   Starting schema upgrade from version 24 to 60.
   Schema upgraded from version 24 to 60.
 These schould complete without errors.



Hints for reconfiguring clients

1.  Use  of accounts.xml in client account configuration as
  user name.
2.  If Account-URL or server path shows
.../principals/__uids__/
delete that entry completly and let client pick up new URL.

---
PGP-Key:29E99DD6  ☀  computing @ chaos claudius

___
calendarserver-dev mailing list
calendarserver-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/calendarserver-dev


Re: [CalendarServer-dev] Migrating from 5.1 to 8.0 --was: Re: Circular reference in 8.0 (cannot import name GroupCacherPollingWork)

2016-06-07 Thread Andre LaBranche

> On Jun 7, 2016, at 1:20 PM, Axel Rau  wrote:
> 
> 
>> Am 02.06.2016 um 19:42 schrieb Axel Rau :
>> 
>> Now I’m faced with:
>> 
>> [twext.enterprise.adbapi2#debug] ConnectionPool: txn busy 
>> 'jobqueue.workCheck': free=0, busy=1, waiting=0
>> [twext.enterprise.adbapi2#debug] ConnectionPool: txn free 
>> 'jobqueue.workCheck': free=1, busy=0, waiting=0
>> [directoryproxy] Usage: twistd [options]
>> [directoryproxy] Options:
> This has been resolved by upgrading twisted. )-;

Great! If you're not already looking at our requirements.txt files and trying 
to follow their guidance, I would suggest doing that. If you resolved this by 
upgrading to a version newer than what is stated in our requirements files, 
that would be good to know also.

> After setting uid to guid, I could connect to my test server.
> This should be stressed in the README!

Noted, thanks.

> After putting the users e-mail address into short-name, everyone can 
> configure his account by e-mail and pw. (-:

Yay!

> What drives me mad is this:
> - - -
> [caldav3:local/etc/caldavd] root# python 
> /usr/local/lib/python2.7/site-packages/calendarserver/tools/principals.py 
> --help
> Traceback (most recent call last):
>  File 
> "/usr/local/lib/python2.7/site-packages/calendarserver/tools/principals.py", 
> line 33, in 
>from calendarserver.tools.cmdline import utilityMain, WorkerService
>  File 
> "/usr/local/lib/python2.7/site-packages/calendarserver/tools/cmdline.py", 
> line 21, in 
>from calendarserver.tap.util import checkDirectories, getRootResource
>  File "/usr/local/lib/python2.7/site-packages/calendarserver/tap/util.py", 
> line 38, in 
>from calendarserver.tools.util import checkDirectory
>  File "/usr/local/lib/python2.7/site-packages/calendarserver/tools/util.py", 
> line 38, in 
>from twistedcaldav.stdconfig import DEFAULT_CONFIG_FILE
>  File "/usr/local/lib/python2.7/site-packages/twistedcaldav/stdconfig.py", 
> line 1831, in 
>config.update() 
>  File "/usr/local/lib/python2.7/site-packages/twistedcaldav/config.py", line 
> 262, in update
>hook(self._data, reloading=reloading)
>  File "/usr/local/lib/python2.7/site-packages/twistedcaldav/stdconfig.py", 
> line 1457, in _postUpdateResourceService
>from twistedcaldav.upgrade import upgradeResourcesXML
>  File "/usr/local/lib/python2.7/site-packages/twistedcaldav/upgrade.py", line 
> 67, in 
>from calendarserver.tap.util import getRootResource, FakeRequest
> ImportError: cannot import name getRootResource
> - - -
> All tools have this problem!
> What can I do to help resolving this?

Do you have anything at /var/db/caldavd? If so, what is there? The default path 
for ServerRoot is /var/db/caldavd. I think (with help from Cyrus :) what's 
happening here is that the CLI argument processing ends up reaching into our 
config object at a time when it hasn't been initialized beyond the defaults 
values found in twistedcaldavd/stdconfig.py. This is likely a bug in the 
server, which seems to be brought to the fore by the combination of having 
stuff at /var/db/caldavd and also using a config file that defines a different 
ServerRoot.

-dre
___
calendarserver-dev mailing list
calendarserver-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/calendarserver-dev


Re: [CalendarServer-dev] Migrating from 5.1 to 8.0 --was: Re: Circular reference in 8.0 (cannot import name GroupCacherPollingWork)

2016-06-07 Thread Axel Rau

> Am 02.06.2016 um 19:42 schrieb Axel Rau :
> 
> Now I’m faced with:
> 
> [twext.enterprise.adbapi2#debug] ConnectionPool: txn busy 
> 'jobqueue.workCheck': free=0, busy=1, waiting=0
> [twext.enterprise.adbapi2#debug] ConnectionPool: txn free 
> 'jobqueue.workCheck': free=1, busy=0, waiting=0
> [directoryproxy] Usage: twistd [options]
> [directoryproxy] Options:
This has been resolved by upgrading twisted. )-;

After setting uid to guid, I could connect to my test server.
This should be stressed in the README!

After putting the users e-mail address into short-name, everyone can configure 
his account by e-mail and pw. (-:

What drives me mad is this:
- - -
[caldav3:local/etc/caldavd] root# python 
/usr/local/lib/python2.7/site-packages/calendarserver/tools/principals.py --help
Traceback (most recent call last):
  File 
"/usr/local/lib/python2.7/site-packages/calendarserver/tools/principals.py", 
line 33, in 
from calendarserver.tools.cmdline import utilityMain, WorkerService
  File 
"/usr/local/lib/python2.7/site-packages/calendarserver/tools/cmdline.py", line 
21, in 
from calendarserver.tap.util import checkDirectories, getRootResource
  File "/usr/local/lib/python2.7/site-packages/calendarserver/tap/util.py", 
line 38, in 
from calendarserver.tools.util import checkDirectory
  File "/usr/local/lib/python2.7/site-packages/calendarserver/tools/util.py", 
line 38, in 
from twistedcaldav.stdconfig import DEFAULT_CONFIG_FILE
  File "/usr/local/lib/python2.7/site-packages/twistedcaldav/stdconfig.py", 
line 1831, in 
config.update() 
  File "/usr/local/lib/python2.7/site-packages/twistedcaldav/config.py", line 
262, in update
hook(self._data, reloading=reloading)
  File "/usr/local/lib/python2.7/site-packages/twistedcaldav/stdconfig.py", 
line 1457, in _postUpdateResourceService
from twistedcaldav.upgrade import upgradeResourcesXML
  File "/usr/local/lib/python2.7/site-packages/twistedcaldav/upgrade.py", line 
67, in 
from calendarserver.tap.util import getRootResource, FakeRequest
ImportError: cannot import name getRootResource
- - -
All tools have this problem!
What can I do to help resolving this?

Axel
---
PGP-Key:29E99DD6  ☀  computing @ chaos claudius

___
calendarserver-dev mailing list
calendarserver-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/calendarserver-dev


Re: [CalendarServer-dev] Migrating from 5.1 to 8.0 --was: Re: Circular reference in 8.0 (cannot import name GroupCacherPollingWork)

2016-06-02 Thread Andre LaBranche

> On May 31, 2016, at 5:09 AM, Axel Rau  wrote:
> 
> 
>> Am 30.05.2016 um 22:39 schrieb Axel Rau :
>> 
>>   connection.realConnection.py_types[postgres.six.text_type] = (705, 
>> postgres.core.FC_TEXT, my_text_out)
>> exceptions.AttributeError: ‚module' object has no attribute 'six‘
> I removed that line:
...
> pg8000.core.ProgrammingError: (u'ERROR', u'42P01', u'relation 
> "calendarserver" does not exist', u'19', u'parse_relation.c', u'986', 
> u'parserOpenTable', u'', u'')
> 2016-05-31T12:48:55+0200 [calendarserver.tap.util#critical] Step failure: 
> UpgradeDatabaseAddressBookDataStep
> - - -
> I have created an empty database and expected caldavd to create all the 
> necessary tables.
> Is this wrong?

Nope, that's a perfectly valid expectation. I'm pretty sure the 'six' module is 
actually required, however. It seems reasonable to guess that this might be yet 
another startup-time race condition around when a module is imported versus 
when it is used. Considering the attempt to fix this in a different place has 
already failed, more investigation is required... I don't have any immediate 
suggestions other than to maybe try to find a way to get the previously 
suggested patch to work, then apply the same technique in other areas as 
needed... not terribly clean, I know.

-dre

> 
> Axel
> ---
> PGP-Key:29E99DD6  ☀  computing @ chaos claudius
> 
> ___
> calendarserver-dev mailing list
> calendarserver-dev@lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/calendarserver-dev

___
calendarserver-dev mailing list
calendarserver-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/calendarserver-dev


Re: [CalendarServer-dev] Migrating from 5.1 to 8.0 --was: Re: Circular reference in 8.0 (cannot import name GroupCacherPollingWork)

2016-06-02 Thread Axel Rau

> Am 25.05.2016 um 18:15 schrieb Axel Rau :
> 
> I’m faced with „badly formed hexadecimal
> UUID strings“, which means, I must adjust my uid and guid records in 
> accounts.xml and in the DB.
> 
> I did not find a tool, which does the migration.
I did this manually by editing a DB backup.

Finally the server migrated the tables:


SchemaStep#warn] Schema upgraded from version 24 to 60.
SchemaStep#warn] Database schema check complete.
. . .
OtherStep#warn] Database other upgrades check complete.

Now I’m faced with:

[twext.enterprise.adbapi2#debug] ConnectionPool: txn busy 'jobqueue.workCheck': 
free=0, busy=1, waiting=0
[twext.enterprise.adbapi2#debug] ConnectionPool: txn free 'jobqueue.workCheck': 
free=1, busy=0, waiting=0
[directoryproxy] Usage: twistd [options]
[directoryproxy] Options:

Axel
---
PGP-Key:29E99DD6  ☀  computing @ chaos claudius

___
calendarserver-dev mailing list
calendarserver-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/calendarserver-dev


Re: [CalendarServer-dev] Migrating from 5.1 to 8.0 --was: Re: Circular reference in 8.0 (cannot import name GroupCacherPollingWork)

2016-06-02 Thread Axel Rau

> Am 31.05.2016 um 14:09 schrieb Axel Rau :
> 
>> 
>> Am 30.05.2016 um 22:39 schrieb Axel Rau :
>> 
>>   connection.realConnection.py_types[postgres.six.text_type] = (705, 
>> postgres.core.FC_TEXT, my_text_out)
>> exceptions.AttributeError: ‚module' object has no attribute 'six‘
> 
I have filed #940 on this.

Axel
---
PGP-Key:29E99DD6  ☀  computing @ chaos claudius

___
calendarserver-dev mailing list
calendarserver-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/calendarserver-dev


Re: [CalendarServer-dev] Migrating from 5.1 to 8.0 --was: Re: Circular reference in 8.0 (cannot import name GroupCacherPollingWork)

2016-05-31 Thread Axel Rau

> Am 30.05.2016 um 22:39 schrieb Axel Rau :
> 
>connection.realConnection.py_types[postgres.six.text_type] = (705, 
> postgres.core.FC_TEXT, my_text_out)
> exceptions.AttributeError: ‚module' object has no attribute 'six‘
I removed that line:
- - -
[build3:lib/python2.7/site-packages] root# diff -u 
txdav/base/datastore/dbapiclient.py.orig txdav/base/datastore/dbapiclient.py
--- txdav/base/datastore/dbapiclient.py.orig2016-05-31 13:59:47.0 
+0200
+++ txdav/base/datastore/dbapiclient.py 2016-05-31 13:24:24.0 +0200
@@ -427,7 +427,7 @@
 return v.encode("utf-8") if isinstance(v, unicode) else str(v)
 
 connection.realConnection.py_types[str] = (705, postgres.core.FC_TEXT, 
my_text_out)
-connection.realConnection.py_types[postgres.six.text_type] = (705, 
postgres.core.FC_TEXT, my_text_out)
+##connection.realConnection.py_types[postgres.six.text_type] = (705, 
postgres.core.FC_TEXT, my_text_out)
 
 def my_text_recv(data, offset, length):
 return str(data[offset: offset + length])
- - -
and reached this point:
- - -
2016-05-31T12:48:55+0200 [-] Log opened.
2016-05-31T12:48:55+0200 [-] twistd 15.2.1 (/usr/local/bin/python2.7 2.7.11) 
starting up.
2016-05-31T12:48:55+0200 [-] reactor class: 
twisted.internet.kqreactor.KQueueReactor.
2016-05-31T12:48:55+0200 [-] AMPPushNotifierFactory starting on 62311
2016-05-31T12:48:55+0200 [-] ControlSocket starting on 
'/var/db/caldavd/data/Logs/state/caldavd.sock'
2016-05-31T12:48:55+0200 [twistedcaldav.upgrade#warn] Upgrading to version 1
2016-05-31T12:48:55+0200 [twistedcaldav.sql#info] Initializing database 
/var/db/caldavd/data/Data/mailgatewaytokens.sqlite
2016-05-31T12:48:55+0200 [twistedcaldav.upgrade#warn] Upgraded to version 1
2016-05-31T12:48:55+0200 [twistedcaldav.upgrade#warn] Upgrading to version 2
2016-05-31T12:48:55+0200 [twistedcaldav.upgrade#warn] Upgraded to version 2
2016-05-31T12:48:55+0200 
[txdav.common.datastore.upgrade.sql.upgrade.UpgradeDatabaseSchemaStep#warn] 
Beginning database schema check.
2016-05-31T12:48:55+0200 
[txdav.common.datastore.upgrade.sql.upgrade.UpgradeDatabaseSchemaStep#warn] 
Required database key VERSION: 60.
2016-05-31T12:48:55+0200 [twext.enterprise.adbapi2#critical] Exception from 
execute() on first statement in transaction.  Possibly caused by a database 
server restart.  Automatically reconnecting now.

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/twext/internet/threadutils.py", 
line 51, in _run
while self._qpull():
  File "/usr/local/lib/python2.7/site-packages/twext/internet/threadutils.py", 
line 71, in _qpull
self._oneWorkUnit(*work)
  File "/usr/local/lib/python2.7/site-packages/twext/internet/threadutils.py", 
line 77, in _oneWorkUnit
result = instruction()
  File "/usr/local/lib/python2.7/site-packages/twext/enterprise/adbapi2.py", 
line 423, in 
lambda: self._reallyExecSQL(*args, **kw)
---  ---
  File "/usr/local/lib/python2.7/site-packages/twext/enterprise/adbapi2.py", 
line 256, in _reallyExecSQL
self._cursor.execute(sql, args)
  File 
"/usr/local/lib/python2.7/site-packages/txdav/base/datastore/dbapiclient.py", 
line 83, in execute
self.realCursor.execute(sql, args)
  File "/usr/local/lib/python2.7/site-packages/pg8000/core.py", line 907, in 
execute
self._c.execute(self, operation, args)
  File "/usr/local/lib/python2.7/site-packages/pg8000/core.py", line 1946, in 
execute
self.handle_messages(cursor)
  File "/usr/local/lib/python2.7/site-packages/pg8000/core.py", line 2094, in 
handle_messages
raise self.error
pg8000.core.ProgrammingError: (u'ERROR', u'42P01', u'relation "calendarserver" 
does not exist', u'19', u'parse_relation.c', u'986', u'parserOpenTable', u'', 
u'')
2016-05-31T12:48:55+0200 [calendarserver.tap.util#critical] Step failure: 
UpgradeDatabaseAddressBookDataStep
- - -
I have created an empty database and expected caldavd to create all the 
necessary tables.
Is this wrong?

Axel
---
PGP-Key:29E99DD6  ☀  computing @ chaos claudius

___
calendarserver-dev mailing list
calendarserver-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/calendarserver-dev


Re: [CalendarServer-dev] Migrating from 5.1 to 8.0 --was: Re: Circular reference in 8.0 (cannot import name GroupCacherPollingWork)

2016-05-30 Thread Axel Rau

> Am 25.05.2016 um 18:15 schrieb Axel Rau :
> 
> ImportError: cannot import name checkDirectory
I’m stuck here, so I try to setup a new server with the test configuration.

Server is starting but fails creating the tables:
- - -
2016-05-30T22:33:23+0200 [-] Log opened.
2016-05-30T22:33:23+0200 [-] twistd 15.2.1 (/usr/local/bin/python2.7 2.7.11) 
starting up.
2016-05-30T22:33:23+0200 [-] reactor class: 
twisted.internet.kqreactor.KQueueReactor.
2016-05-30T22:33:23+0200 [-] AMPPushNotifierFactory starting on 62311
2016-05-30T22:33:23+0200 [-] ControlSocket starting on 
'/var/db/caldavd/data/Logs/state/caldavd.sock'
2016-05-30T22:33:23+0200 [twext.enterprise.adbapi2#critical] Re-trying 
connection due to connection failure

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/twisted/python/context.py", line 
81, in callWithContext
return func(*args,**kw)
  File "/usr/local/lib/python2.7/site-packages/twext/internet/threadutils.py", 
line 51, in _run
while self._qpull():
  File "/usr/local/lib/python2.7/site-packages/twext/internet/threadutils.py", 
line 72, in _qpull
return True
  File "/usr/local/lib/python2.7/site-packages/twext/internet/threadutils.py", 
line 85, in _oneWorkUnit
self._reactor.callFromThread(deferred.callback, result)
---  ---
  File "/usr/local/lib/python2.7/site-packages/twext/internet/threadutils.py", 
line 77, in _oneWorkUnit
result = instruction()
  File "/usr/local/lib/python2.7/site-packages/twext/enterprise/adbapi2.py", 
line 1284, in initCursor
txn._connection = self.connectionFactory()
  File 
"/usr/local/lib/python2.7/site-packages/txdav/base/datastore/dbapiclient.py", 
line 253, in connect
self.preflight(w, **self.connectKw)
  File 
"/usr/local/lib/python2.7/site-packages/txdav/base/datastore/dbapiclient.py", 
line 430, in pg8000Preflight
connection.realConnection.py_types[postgres.six.text_type] = (705, 
postgres.core.FC_TEXT, my_text_out)
exceptions.AttributeError: ‚module' object has no attribute 'six'
- - -
Postgresql show client connection:
- - -
2016-05-30T22:34:04.346966+02:00 build3 postgres[28326]: [3-1] LOG:  connection 
received: host=[local]
2016-05-30T22:34:04.348914+02:00 build3 postgres[28326]: [4-1] LOG:  connection 
authorized: user=caldavd database=caldavd
2016-05-30T22:34:04.361283+02:00 build3 postgres[28307]: [5-1] DEBUG:  
unexpected EOF on client connection
2016-05-30T22:34:04.362111+02:00 build3 postgres[28310]: [5-1] DEBUG:  
unexpected EOF on client connection
- - -

pkg info | grep pg8000
py27-pg8000-1.10.5 Pure-Python Interface to the PostgreSQL Database

Axel
---
PGP-Key:29E99DD6  ☀  computing @ chaos claudius

___
calendarserver-dev mailing list
calendarserver-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/calendarserver-dev


Re: [CalendarServer-dev] Migrating from 5.1 to 8.0 --was: Re: Circular reference in 8.0 (cannot import name GroupCacherPollingWork)

2016-05-28 Thread Axel Rau

> Am 25.05.2016 um 18:15 schrieb Axel Rau :
> 
> [caldav3:lib/python2.7/site-packages] root# python 
> /usr/local/lib/python2.7/site-packages/calendarserver/tools/upgrade.py -s
> Traceback (most recent call last):
>  File 
> "/usr/local/lib/python2.7/site-packages/calendarserver/tools/upgrade.py", 
> line 27, in 
>from txdav.common.datastore.sql import CommonDataStore
>  File "/usr/local/lib/python2.7/site-packages/txdav/common/datastore/sql.py", 
> line 85, in 
>from calendarserver.tools.util import displayNameForCollection, 
> getEventDetails, agoString
>  File "/usr/local/lib/python2.7/site-packages/calendarserver/tools/util.py", 
> line 39, in 
>from twistedcaldav.stdconfig import DEFAULT_CONFIG_FILE
>  File "/usr/local/lib/python2.7/site-packages/twistedcaldav/stdconfig.py", 
> line 1831, in 
>config.update() 
>  File "/usr/local/lib/python2.7/site-packages/twistedcaldav/config.py", line 
> 262, in update
>hook(self._data, reloading=reloading)
>  File "/usr/local/lib/python2.7/site-packages/twistedcaldav/stdconfig.py", 
> line 1457, in _postUpdateResourceService
>from twistedcaldav.upgrade import upgradeResourcesXML
>  File "/usr/local/lib/python2.7/site-packages/twistedcaldav/upgrade.py", line 
> 67, in 
>from calendarserver.tap.util import getRootResource, FakeRequest
>  File "/usr/local/lib/python2.7/site-packages/calendarserver/tap/util.py", 
> line 38, in 
>from calendarserver.tools.util import checkDirectory
> ImportError: cannot import name checkDirectory
It seems it dies in config.update (your patch, r15635, in 
twistedcaldav/stdconfig.py):

[caldav3:lib/python2.7/site-packages] root# python 
/usr/local/lib/python2.7/site-packages/calendarserver/tools/upgrade.py -s
> /usr/local/lib/python2.7/site-packages/calendarserver/tools/util.py(41)()
-> from twistedcaldav.stdconfig import DEFAULT_CONFIG_FILE
(Pdb) b /usr/local/lib/python2.7/site-packages/twistedcaldav/stdconfig.py:1831
Breakpoint 1 at 
/usr/local/lib/python2.7/site-packages/twistedcaldav/stdconfig.py:1831
(Pdb) c
> /usr/local/lib/python2.7/site-packages/twistedcaldav/stdconfig.py(1831)()
-> config.update()
(Pdb) l
1826config.setProvider(PListConfigProvider(DEFAULT_CONFIG))
1827config.addPreUpdateHooks(PRE_UPDATE_HOOKS)
1828config.addPostUpdateHooks(POST_UPDATE_HOOKS)
1829
1830# Make sure the default config is loaded and updated early on to avoid 
race conditions during startup. (upstream: r15635)
1831B-> config.update() 
1832
1833def _preserveConfig(configDict):
1834"""
1835Preserve certain config keys across reset( ) because these can't be
1836re-fetched after the process has shed privileges
(Pdb) b 1833
Breakpoint 2 at 
/usr/local/lib/python2.7/site-packages/twistedcaldav/stdconfig.py:1833
(Pdb) c
Traceback (most recent call last):
  File 
"/usr/local/lib/python2.7/site-packages/calendarserver/tools/upgrade.py", line 
27, in 
from txdav.common.datastore.sql import CommonDataStore
  File "/usr/local/lib/python2.7/site-packages/txdav/common/datastore/sql.py", 
line 85, in 
from calendarserver.tools.util import displayNameForCollection, 
getEventDetails, agoString
  File "/usr/local/lib/python2.7/site-packages/calendarserver/tools/util.py", 
line 41, in 
from twistedcaldav.stdconfig import DEFAULT_CONFIG_FILE
  File "/usr/local/lib/python2.7/site-packages/twistedcaldav/stdconfig.py", 
line 1831, in 
config.update() 
  File "/usr/local/lib/python2.7/site-packages/twistedcaldav/config.py", line 
262, in update
hook(self._data, reloading=reloading)
  File "/usr/local/lib/python2.7/site-packages/twistedcaldav/stdconfig.py", 
line 1457, in _postUpdateResourceService
from twistedcaldav.upgrade import upgradeResourcesXML
  File "/usr/local/lib/python2.7/site-packages/twistedcaldav/upgrade.py", line 
67, in 
from calendarserver.tap.util import getRootResource, FakeRequest
  File "/usr/local/lib/python2.7/site-packages/calendarserver/tap/util.py", 
line 38, in 
from calendarserver.tools.util import checkDirectory
ImportError: cannot import name checkDirectory


Axel
---
PGP-Key:29E99DD6  ☀  computing @ chaos claudius

___
calendarserver-dev mailing list
calendarserver-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/calendarserver-dev