3 Commits

Author SHA1 Message Date
Jeremy Stanley
7e480c6c18 Additional path patterns for log readme files.
* modules/openstack_project/templates/logs-dev.vhost.erb
* modules/openstack_project/templates/logs.vhost.erb: With the
recent advent of an additional parent node in the job log path, the
ReadmeName was no longer being applied to new log directories. This
corrects it by adding duplicate Directory blocks for them with the
new pattern. Note that ReadmeName does not work inside regular
expression blocks like DirectoryMatch, but the old Directory blocks
can be removed when those logs expire in about 6 months time. Also
added patterns to provide readme files for equivalent periodic jobs.

Change-Id: Ib12f1d6f033b8129af38d694f7b221bea9614ecd
2013-07-29 18:02:37 +00:00
Sean Dague
c7a2bf51b7 updated htmlifier for safety and features
ensure that path of the file we're going to open is actually
inside our log root. If not return a 400.

escape dates in the regex so they are easier to pass around,
unencoded spaces kind of suck for that.

catch the possible IOError of openning a file that doesn't exist,
be nice and give people a 404 in that case.

move the content negotiation into a function, for readability

Change-Id: I334e1ac0419cd140c6af35c78634a2d7c05dcf01
2013-07-24 20:15:01 -04:00
Sean Dague
fcc4dd4995 add utility to htmlify screen logs for devstack runs
this adds a wsgi application which processes all the txt.gz log
files and htmlifies them on the fly before sending them to the
user. It uses content negotiation to only do this if the client
says it Accepts text/html, otherwise it just dumps them back out
as text/plain.

In either case the content is compressed with mod_deflate, which
provides a 15x-20x bandwidth savings vs. if we left it
uncompressed on the wire.

Should get more testing before general deployment, but this is
getting close to the approach I think we want to use.

This enables the functionality on a new logs-dev.openstack.org
vhost so that we can do live testing that this works before
switching over the main site to it.

Change-Id: I12a06c4b55be05fb8060b76f5aea9ebc801c0537
2013-07-23 15:27:37 -04:00