CentOS 7: Want a functional loggerhead

Kevin R. Bulgrien kevin.bulgrien at freedomcte.com
Fri Sep 11 22:12:30 UTC 2015


> -----Original Message-----
> From: Richard Wilbur [mailto:richard.wilbur at gmail.com]
> Sent: Friday, September 11, 2015 3:02 PM
>
> Sorry for the misunderstanding on my part.  Thank you, Kevin, for
> explaining the situation in more detail.  It looks like I will need to
> grab a copy of loggerhead to beat on myself.

I realize "double posting" is taboo ... hopefully this doesn't count as a
double-post.  I found a prior CentOS question on Launchpad, so for reference,
I posted the following there (before getting a response here) since it might
help others when it is finally resolved:

  https://answers.launchpad.net/loggerhead/+question/271275

I had continued to troubleshoot after posting to the list, so it added some
information that I didn't know when I posted to the list:

When I tried to use the deprecated `start-loggerhead` and `stop loggerhead`
Scripts on CentOS 7, loggerhead still doesn't work serving branches, but
I don't get a 404 error!  I get an almost blank browser screen with only
"loggerhead branches" in the top-right corner.  I realize I don't know
that my start-loggerhead environment is setup correctly as I have not
replicated it anywhere else, so here I'll show a less edited sequence
of how I tested loggerhead by mirroring what I did in CentOS 7 on my
CentOS 6 box.

What follows demonstrates what I am trying to do on CentOS 7, but everything
below is done on CentOS 6 (where loggerhead already works) to prove the
sanity of my testing procedure on CentOS 7 and to help others
potentially replicate my CentOS 7 environment:

Remove CentOS/EPEL-supplied packages not supplied by CentOS 7/EPEL 7
$ yum remove loggerhead python-simpletal

Create a local home for python site-packages that does not conflict with the
distro site-packages and so I don't have to `python setup.py install` with
sudo or root.

$ sudo mkdir /home/app
$ sudo chown krb_adm.users /home/app
$ chmod 2750 /home/app
$ mkdir ~/pkg/launchpad.net
$ cd ~/pkg/launchpad.net
$ wget 
https://launchpad.net/loggerhead/1.18/1.18.1/+download/loggerhead-1.18.1.tar.gz
$ tar -xzf loggerhead-1.18.1.tar.gz
$ cd loggerhead-1.18.1
$ python setup.py install --prefix=/home/app
$ mkdir ~/pkg/owlfish.com
$ cd ~/pkg/owlfish.com
$ wget http://www.owlfish.com/software/simpleTAL/downloads/SimpleTAL-4.3.tar.gz
$ tar -xzf SimpleTAL-4.3.tar.gz
$ cd SimpleTAL-4.3
$ python setup.py install --prefix=/home/app

Test loggerhead in this configuration:

$ export PYTHONPATH=/home/app/lib/python2.6/site-packages
$ PATH=$PATH:/home/app/bin
$ cd ~/bzr
$ serve-branches blah
DEBUG:paste.httpserver.ThreadPool:Started new worker -1220445328: Initial worker 
pool
DEBUG:paste.httpserver.ThreadPool:Started new worker -1232077968: Initial worker 
pool
DEBUG:paste.httpserver.ThreadPool:Started new worker -1244660880: Initial worker 
pool
DEBUG:paste.httpserver.ThreadPool:Started new worker -1257243792: Initial worker 
pool
DEBUG:paste.httpserver.ThreadPool:Started new worker -1267733648: Initial worker 
pool
DEBUG:paste.httpserver.ThreadPool:Started new worker -1278223504: Initial worker 
pool
DEBUG:paste.httpserver.ThreadPool:Started new worker -1288713360: Initial worker 
pool
DEBUG:paste.httpserver.ThreadPool:Started new worker -1299203216: Initial worker 
pool
DEBUG:paste.httpserver.ThreadPool:Started new worker -1309693072: Initial worker 
pool
DEBUG:paste.httpserver.ThreadPool:Started new worker -1320182928: Initial worker 
pool
serving on 0.0.0.0:8080 view at http://127.0.0.1:8080
DEBUG:paste.httpserver.ThreadPool:Added task (0 tasks queued)
INFO:loggerhead:127.0.0.1 - - [11/Sep/2015:16:21:01 -0500] "GET / HTTP/1.0" 
301 - "-" "Lynx/2.8.6rel.5 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/1.0.0-fips"
DEBUG:paste.httpserver.ThreadPool:Added task (0 tasks queued)
INFO:loggerhead.blah:built revision graph cache: 0.012253046035766602 secs
INFO:loggerhead.blah:Getting information for ChangeLogUI: 0.25657796859741211 
secs
INFO:loggerhead:127.0.0.1 - - [11/Sep/2015:16:21:03 -0500] "GET /changes 
HTTP/1.0" 200 - "-" "Lynx/2.8.6rel.5 libwww-FM/2.14 SSL-MM/1.4.1 
OpenSSL/1.0.0-fips"
INFO:simpleTAL.XMLTemplateCompiler:Recieved skipped entity: nbsp
INFO:simpleTAL.XMLTemplateCompiler:Recieved skipped entity: laquo
INFO:simpleTAL.XMLTemplateCompiler:Recieved skipped entity: raquo
INFO:loggerhead.blah:Rendering ChangeLogUI: 0.2234799861907959 secs, 8195 bytes

In another terminal, see if the branches are published:

$ lynx http://127.0.0.1:8080

Yes, they are.  The serve-branches log above shows that it processes the blah
checkout.  The browser had the revisions listed.

Next, check the start-loggerhead, stop-loggerhead scripts just in case they
might work better on CentOS 7.  Not sure how to set it up properly, but
winging it:

$ mkdir loggerhead-files
$ cp -a /home/apps/bin/st*-loggerhead .
$ sudo vim /etc/loggerhead.conf

Create /etc/loggerhead.conf containing:

title = 'branches in loggerhead'
log.roll = 'weekly'

[debug]
    name = 'blah'
    cachepath = '/home/krb_adm/bzr/loggerhead-files'

    # if an auto_publish_folder is given, any bazaar branches discovered in
    # that folder will be published.  using each branch's 'branch.conf' to
    # provide optional descriptions and public urls is a nice way to avoid
    # having to do much configuration here.
    auto_publish_folder = '/home/krb_adm/bzr/blah'

    # if all of the branches under an auto_publish_folder are exported to
    # the same (base) public url, you can specify that url prefix here, and
    # each discovered branch's public url will be generated.
    url_prefix = 'http://127.0.0.1:8080'

I suppose that the above is NOT an appropriate loggerhead.conf setup as it
does not seem to work.

$ cd ~/bzr
$ ./start-loggerhead


WARNING!!! This script has been deprecated by serve-branches, and will be 
removed in the next release. Please migrate to serve-branches and report any 
missing features.



Launching loggerhead into the background.
PID file: /home/admin/krb_adm/bzr/loggerhead.pid

See who owns the loggerhead process:

$ ps -ef | grep `cat loggerhead.pid`
krb_adm   9217     1  1 17:00 ?        00:00:00 /usr/bin/python 
./start-loggerhead

$ lynx http://127.0.0.1:8080

This shows the same results as on CentOS 7 - a blank browser screen that
has `loggerhead branches` in the upper right corner.  So my info in the
launchpad question needs updating.  start-loggerhead results in a logs
directory being made in the CWD.

$ ls -lR logs
logs:
total 0
-rw-rw----. 1 krb_adm admin 0 Sep 11 17:03 access.log
-rw-rw----. 1 krb_adm admin 0 Sep 11 17:03 debug.log
-rw-rw----. 1 krb_adm admin 0 Sep 11 17:03 error.log

I guess that means I borked up the start-loggerhead setup - not that
that should be a distraction as it says its deprecated anyway.

$ ./stop-loggerhead

Shutting down previous server @ pid 8923.

I am able to do digging with guidance.  I've got a lot of system and
scripting XP, but not a lot of python or Bazaar specific XP.  I'm able
to run systems in VMs.  This CentOS 7 is virtualized.  I could provide
an ESXi OVF... or perhaps convert it to an open format VM image.  I
have a detailed log of what was done to stand the image up.

I'm open to continuing in either forum (list or loggerhead site on
launchpad).

Kevin R. Bulgrien






More information about the bazaar mailing list