Checking out branches from a shared repo results in 'No repository present' error

Bug #447229 reported by Stuart Colville
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
loggerhead
Fix Released
Medium
Unassigned

Bug Description

When running loggerhead if it's pointed at a directory containing branches within a shared repo (without trees) checking out the branches over http results in:

bzr: ERROR: Server sent an unexpected error: ('error', 'No repository present: "chroot-32111312:///"')

The only thing visible in the paste server log is:

DEBUG:paste.httpserver.ThreadPool:Added task (0 tasks queued)
INFO:loggerhead:127.0.0.1 - - [09/Oct/2009:14:44:40 +0100] "POST /tla/trunk/.bzr/smart HTTP/1.1" 200 5 "-" "bzr/2.0.0 (urllib)"
DEBUG:paste.httpserver.ThreadPool:Added task (0 tasks queued)
INFO:loggerhead:127.0.0.1 - - [09/Oct/2009:14:44:40 +0100] "POST /tla/trunk/.bzr/smart HTTP/1.1" 200 71 "-" "bzr/2.0.0 (urllib)"
DEBUG:paste.httpserver.ThreadPool:Added task (0 tasks queued)
INFO:loggerhead:127.0.0.1 - - [09/Oct/2009:14:44:40 +0100] "POST /tla/trunk/.bzr/smart HTTP/1.1" 200 120 "-" "bzr/2.0.0 (urllib)"

I'm running:

Ubuntu 8.04
bzr version is: 2.0.0

loggerhead trunk at r387

PasteDeploy-1.3.3 (From PyPi)
Paste-1.7.2 (from PyPi)
python-simpletal 4.1-6

Paste and PasteDeploy were originally packages but I since replaced them from pypi to see if that would make a difference. It didn't.

In contrast I have loggerhead pointing at a bunch of standalone branches under Jaunty and checking them out works just fine.
Clearly there's more differences here than just that my Jaunty loggerhead instance is pointing at standalone branches so it might not be that.

description: updated
Martin Albisetti (beuno)
Changed in loggerhead:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Stuart Colville (muffinresearch) wrote :

I've just reproduced this on my Jaunty desktop:

By creating a shared-repo with one dummy branch within it and running:

./serve-branches /path/to/shared-repo/

I get the same issue trying to check out the dummy branch over http:

$ bzr co http://127.0.0.1:8080/dummy/trunk
bzr: ERROR: Server sent an unexpected error: ('error', 'No repository present: "chroot-169910252:///"')

So this does seem to indicate that there's something around it being a shared-repo that causes it to break.

Revision history for this message
Martin Albisetti (beuno) wrote :

Thanks Stuart. Taking a quick glimps at the code gives me an idea of why this happens. I don't think the fix is very straightforward, but this is definitely something we should fix.

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 447229] Re: Checking out branches from a shared repo results in 'No repository present' error

The chroot created should be for the repo root, not the branch root.

-Rob

Changed in loggerhead:
importance: Low → Medium
Revision history for this message
SqUe (sque) wrote :

Hi. I am affected from this bug too. I have a shared repository served by loggerhead and I would like to use the http handler. Is it possible to create a pre-release patch to workaround this before the next release? Thanks

Revision history for this message
Matt Nordhoff (mnordhoff) wrote :

Has this been fixed? I can't reproduce it.

Revision history for this message
Brian Parma (bj0) wrote :

I am trying to get a loggerhead server setup with a shared repository and was getting this error with 1.17.

If I run from the latest trunk, I get the same behavior but a different error message:

bzr: ERROR: Server sent an unexpected error: ('error', "An attempt to access a url outside the server jail was made: 'chroot-41212304:///projects/'.")

Both server and client have bzr version 2.0.4

The shared repository is in /opt/repository, and I am trying to serve it with:

./serve-branches --port=N /opt/repository

Browsing via http://host:N/ works fine, but when i try to branch:
bzr branch http://host:N/projects/someproject

where the actual branch location is /opt/repository/projects/someproject, I get the error above.

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

I think you need to use a release from the bzr 2.1 series to have this work.

Revision history for this message
Brian Parma (bj0) wrote :

Ok, I installed the latest bzr from the bzr-nigtly-builds ppa (2.1.0dev5) on the server, along with the latest checkout of lp:loggerhead, and I am able to branch from loggerhead.

I am even using ProxyPass in apache2 and it works.

I only had to upgrade to 2.1 on the server, the client is still using 2.0.4

Changed in loggerhead:
importance: Medium → Low
importance: Low → Medium
Revision history for this message
Robert Collins (lifeless) wrote :

(fix appears to be 'use newer bzrlib')

Changed in loggerhead:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.