severely lacking documentation + missing dependencies in ubuntu pacakge

Bug #1637796 reported by bob smith on 2016-10-30
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Two *critical* pieces of information are lacking, resulting in 3 lost hours that I'll never get back... hopefully it'll help someone else.

Both of these items result in the dreaded "404 The resource could not be found" which seems to date back many years.

If the python package "PasteDeploy" is not installed, "--prefix" is SILENTLY IGNORED in "serve-branches".
That is because in ./loggerhead/ you fall back to skipping the prefix middleware, WITHOUT WARNING.

It doesn't matter that you mention it in passing in your documentation.
It doesn't matter that the ubuntu pacakge *suggests* the 'python-pastedeploy' package.

What matters is: When a poor unsuspecting user does 'apt-get install loggerhead',
then creates "/etc/serve-branches.conf" based on *your example* which has "prefix",
and runs "service start loggerhead" - it won't work.

It also won't work without ANY warning/logging when running from the command line.

When trying to serve multiple repositories,
Without adding "--allow-writes", the 'serve-branches' adds some "readonly+" nonsense, again resulting in cryptic and unexplained "404 the resource could not be found" error.
The only way to even discover it is to resort to 'strace' - because useful logging is non-existing.

To demonstrate:

Start the program:

    strace -f -e open serve-branches --port=9999 /srv/bzr

From another terminal, try to access an existing bzr repo:


The resulting access is:

    [pid 4802] open("/home/ubuntu/readonly+/srv/bzr/.bzr/branch-format", O_RDONLY) = -1 ENOENT (No such file or directory)

And only if started with "--allow-writes", then directory is correct:

    [pid 5311] open("/srv/bzr/foobar/.bzr/branch-format", O_RDONLY) = 6

Perhaps this makes perfect sense to you, as you are experienced with bzr/loggerhead.
For for a new user - this is completely obscure as it is NEVER clear why "--allow-writes" should affect such a thing.

I see a "NEWS" entry about "allow-writes" bugfix for 1.17, but this issue still happens with 1.19~bzr479-3 from Ubuntu 14.04.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers