desktopcouch-service crashed with PreconditionFailed in request(): ('file_exists', 'The database could not be created, the file already exists.')
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
desktopcouch |
Fix Released
|
Critical
|
Chad Miller | ||
desktopcouch (Ubuntu) |
Fix Released
|
Critical
|
Chad Miller | ||
Natty |
Fix Released
|
Critical
|
Chad Miller |
Bug Description
Binary package hint: desktopcouch
Trying to sync my existing account. The Gui asked for desktopcouch to be installed which I did. Soon after I had this message.
ProblemType: Crash
DistroRelease: Ubuntu 11.04
Package: desktopcouch 1.0.5-0ubuntu1
ProcVersionSign
Uname: Linux 2.6.37-12-generic i686
Architecture: i386
Date: Tue Jan 25 09:31:24 2011
ExecutablePath: /usr/lib/
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Alpha i386 (20101202)
InterpreterPath: /usr/bin/python2.7
PackageArchitec
ProcCmdline: /usr/bin/python /usr/lib/
ProcEnviron:
SHELL=/bin/bash
LC_MESSAGES=
LANGUAGE=en_GB:en
LANG=en_US.UTF-8
PythonArgs: ['/usr/
SourcePackage: desktopcouch
Title: desktopcouch-
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
Related branches
- Roberto Alsina (community): Approve
- Eric Casteleijn (community): Approve
-
Diff: 170 lines (+104/-15)2 files modifieddesktopcouch/records/database.py (+14/-10)
desktopcouch/records/tests/test_mocked_server.py (+90/-5)
tags: | removed: need-duplicate-check |
tags: | added: bugpattern-needed |
Changed in desktopcouch (Ubuntu): | |
assignee: | nobody → Eric Casteleijn (thisfred) |
importance: | Undecided → Critical |
status: | New → Triaged |
Changed in desktopcouch (Ubuntu): | |
assignee: | Eric Casteleijn (thisfred) → Chad Miller (cmiller) |
visibility: | private → public |
tags: | added: iso-testing |
tags: |
added: bugpattern-written removed: bugpattern-needed |
Changed in desktopcouch (Ubuntu Natty): | |
milestone: | none → ubuntu-11.04-beta-2 |
Changed in desktopcouch: | |
status: | New → In Progress |
assignee: | nobody → Chad Miller (cmiller) |
importance: | Undecided → Critical |
Changed in desktopcouch: | |
status: | In Progress → Fix Committed |
Changed in desktopcouch (Ubuntu Natty): | |
status: | Triaged → In Progress |
Changed in desktopcouch: | |
milestone: | none → 1.0.7 |
Changed in desktopcouch: | |
status: | Fix Committed → Fix Released |
Chad, I can't really see what's going on here, if you can guide me, I'd be happy to work on this, but I don't know where to start.
It seems that we (potentially) create a database after reconnecting. This seems very wrong to me. (reconnection should not ever have such side effects I think.) The obvious kludge fix of silently trapping the PreconditionFailed exception (on the assumption that the db must already be there then) seems like it wouldn't work, since the code does check for the presence of the db first. It looks like there's a mismatch between what python-couchdb knows, and what the actual state of the couchdb is.
Also I don't understand why the __init__ of Database calls _reconnect, before we have even detected that there is any problem.
I've not been able to reproduce this locally, but as you can see from the number of duplicates, it's hardly a rare problem.