Lucid upgrade switch to serve-branches.conf without providing one

Bug #563118 reported by Lionel Dricot
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
loggerhead (Ubuntu)
Won't Fix
Undecided
Unassigned
Nominated for Lucid by Lionel Dricot

Bug Description

Binary package hint: loggerhead

From Karmic to Lucid, loggerdhead switches from /etc/loggerhead.conf to /etc/serve-branches.conf.

Problem is that the user is not informed about this change and that no serve-branches.conf is provided.
More : loggerhead refuses to start if there is no serve-branches.conf file.

So, in every case, upgrading to Lucid will break loggerhead. Loggerhead will simply be not runned anymore and the admin will only discover it the day an user try to access loggerhead. At that point, the admin will have to read the /etc/init.d/ script to understantd that a new config fil is required.

Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

Current workaround : keeping the Karmic package.

Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote :

Maybe Loggerhead ought to still look for Loggerhead.conf if server-branch.conf is not there?

Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

Ian > it might not be trivial because it looks like format are differents. So far, I was unable to find any example of serve-branches.conf to write my own. I have no idea of what is expected.

By reading the script, I figured out that it should be a simple bash script that assigns some local variables.

Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote :

Lionel,

I'd like to get this sorted ASAP but I'm pretty new to the loggerhead code base. Looking through the code, I can't see where the name of the config file is set or where the settings are loaded. Maybe I'm blind or maybe it's a packaging issue? Can you explain how you've configured Loggerhead and how you tracked down the problem?

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

I guess we could do something in the packaging so that you at least know that something has changed -- but /etc/loggerhead.conf and /etc/serve-branches.conf are not in (remotely) the same format, and indeed they are interpreted by different end points.

We could perhaps try to convert them in common cases, but I think that would be hard.

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 563118] Re: Lucid upgrade switch to serve-branches.conf without providing one

If it's a bash script it's probably added in the packaging.

- Martin

On 16/04/2010 11:50 AM, "Ian Clatworthy" <email address hidden>
wrote:

Lionel,

I'd like to get this sorted ASAP but I'm pretty new to the loggerhead
code base. Looking through the code, I can't see where the name of the
config file is set or where the settings are loaded. Maybe I'm blind or
maybe it's a packaging issue? Can you explain how you've configured
Loggerhead and how you tracked down the problem?

--
Lucid upgrade switch to serve-branches.conf without providing one
https://bugs.launchpad.net/bu...

Revision history for this message
Martin Pool (mbp) wrote :

On 16 April 2010 11:50, Michael Hudson <email address hidden> wrote:
> I guess we could do something in the packaging so that you at least know
> that something has changed -- but /etc/loggerhead.conf and /etc/serve-
> branches.conf are not in (remotely) the same format, and indeed they are
> interpreted by different end points.
>
> We could perhaps try to convert them in common cases, but I think that
> would be hard.

Other packages seem to handle this by displaying a dpkg-config warning
about it so at least you have some warning, and/or making the init
script tell you.

--
Martin <http://launchpad.net/~mbp/>

Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

the serve-branches.conf is called in /etc/init.d/loggerdhaed.

Loggerhead should at least proposes a default serve-branches.conf.

Revision history for this message
Redge (redgetrek) wrote :

Saving the following as /etc/serve-branches.conf will at least allow the loggerhead daemon to start:

served_branches=<path to repository root>
prefix=
port=8080

Changed in loggerhead (Ubuntu):
status: New → Confirmed
Revision history for this message
Russel Winder (russel) wrote :

Redge, Your proposed minimal /etc/serve-branches.conf file fails to work for me:

|> sudo sh -x /etc/init.d/loggerhead start
+ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+ DESC=Loggerhead Bazaar Branch Browser
+ NAME=loggerhead
+ PIDFILE=/var/run/loggerhead.pid
+ SCRIPTNAME=/etc/init.d/loggerhead
+ [ -x /usr/bin/serve-branches ]
+ [ ! -f /etc/serve-branches.conf ]
+ . /etc/serve-branches.conf
+ served_branches = /home/www/www.russel.org.uk/html/Bazaar
/etc/serve-branches.conf: 1: served_branches: not found
+ prefix =
/etc/serve-branches.conf: 1: prefix: not found
+ port = 8080
/etc/serve-branches.conf: 1: port: not found
+ echo -n Starting Loggerhead Bazaar Branch Browser: loggerhead
Starting Loggerhead Bazaar Branch Browser: loggerhead+ d_start
+ start-stop-daemon -p /var/run/loggerhead.pid -S --startas /usr/bin/serve-branches --chuid loggerhead --make-pidfile --background --chdir -- --prefix= --port= --log-folder /var/log/loggerhead
+ echo .
.
+ exit 0

Is there any documentation anywhere about Loggerhead?

Revision history for this message
Russel Winder (russel) wrote :

Oh, I see, you can't have space around the =. This is irritating. At least the server now starts. Sadly it just says "Internal Server Error"

Revision history for this message
Russel Winder (russel) wrote :

OK the problem appears to be that Loggerhead now runs as user loggerhead which is incomptible with user www-data that is used by Apache. This make dealing with permissions irritating. I guess I will add loggerhead to the www-data group.

Revision history for this message
Russel Winder (russel) wrote :

Is there any way of setting the front page titles and headers with the new configuration file structures?

Revision history for this message
Redge (redgetrek) wrote :

When last I looked in to it, which was about a year ago, there was not. I doubt support has been added in the mean time.

Sadly, loggerhead documentation is minimal and hard to find.

Revision history for this message
Matt Nordhoff (mnordhoff) wrote : Re: [Bug 563118] Re: Lucid upgrade switch to serve-branches.conf without providing one

Correct, it's not currently possible.

Revision history for this message
Russel Winder (russel) wrote :

The loss of functionality caused by the change of server and/or configuration file format/use strikes me as being a retrograde step. Unless I am missing something.

Revision history for this message
Joachim Nilsson (troglobit) wrote :

I just discovered the same thing. Repositories served through loggerhead had stopped working when I upgraded the server in June. Sadly I had nobody inform me until I found bug reports linking to fixes in my (now stale) repositories.

I got it working again by creating a /etc/serve-branches.conf looking like this:
served_branches=/pub/bzr
port=1337
prefix=/loggerhead

I serve branches through / so I had to add the /loggerhead prefix. The end result looks like this: http://bzr.vmlinux.org/loggerhead/

Hope this helps other people!

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Marking this as "won't fix"; karmic support was dropped a long time ago, so it's too late to worry about this upgrade path now.

Changed in loggerhead (Ubuntu):
status: Confirmed → Won't Fix
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.