Commit Graph

24 Commits

Author SHA1 Message Date
Clark Boylan 86a69a5b4d Retire this repo
The opendev project has been moving away from puppet and this is one of
the puppet modules that is no longer used. To simplify things for us we
are taking the extra step of retiring this repo.

Change-Id: I46ccab87f063c51dd3236757dbb0567738803fae
2022-02-17 12:46:57 -08:00
Clark Boylan 23425ea940 Use mod_expires to set cache headers for log files
Our CI jobs' logserver wasn't setting cache headers so browsers were
always downloading the log files on each request. Reduce load on the
logserver and improve performance by users via the setting of a 2 week
ttl on log data.

This should be safe because each job writes to a uuid identified dir and
that data doesn't get overwritten. Once written the data is static.

Change-Id: Ic99df4e4e64a6bf64e68e6f1bc297c91134ab716
2019-04-05 14:09:00 -07:00
Tristan Cacqueray 20ae86a8f4 logserver: set CORS header
This change enables cross request to fetch job logs artifacts.

Change-Id: I88ef4d559bb9b8fa3b67b51ec750bf9136a62ffb
2019-01-02 00:11:41 +00:00
Colleen Murphy 47a1005731 Fix template variables
Fix the scope for the template variables for the httpd vhost, and fix
the ServerAlias value when serveraliases is undefined.

Depends-On: https://review.openstack.org/578559

Change-Id: Ia0f9b704d95facd4668d972a66f94f741a99bca2
2018-07-12 09:27:03 +02:00
Zuul f3f7b47cb4 Merge "Fix scope of vhost template variables" 2018-06-05 22:27:05 +00:00
Colleen Murphy ef5e2f1034 Fix scope of vhost template variables
Dynamic scoping for variables in ERB templates was removed in puppet
4[1] which means that the variables defined in the
openstackci::logserver class cannot be found when it is referenced in
the httpd::vhost defined type and will be evaluated as nil when
puppet runs. Use scope.lookupvar instead to be explicit about the
variable's source.

[1] https://puppet.com/docs/puppet/4.10/lang_updating_manifests.html#dynamic-scoping-in-erb

Change-Id: Iea37fb14bc332cbf2d598b908bce997786814924
2018-04-27 19:16:46 +02:00
David Moreau Simard 5cc7d0afff Enable tuned WSGI settings for logs.openstack.org
After being tested in the parent patch, this will improve the
performance of the logs and ara report browsing.

Change-Id: Ib0dd51e24e7e4cc0d4308639d27a2aba18a9e96c
2018-04-04 15:48:05 +00:00
David Moreau Simard 8a826a0fd4
Promote /ara-report/ middleware redirection to logs.openstack.org
We've successfully tested the ARA sqlite middleware on logs-dev.o.o.
We're ready to use this on logs.openstack.org.

Change-Id: I88c06366b8d5837ad6fc50163e5d58fe1b5eaa8f
2018-03-29 15:33:13 -04:00
Ian Wienand 3eacddb2d7 Allow viewing of .log.gz files
I'm not sure why, but previously we have not passed .log.gz files
through to the htmlify web-app.  This means clicking on it in the
browser prompts to download the file.  This is unlikley to be what
devlopers investigating logs interactively want.

Traditionally in devstack-gate there's been a bunch of renaming
log->log.txt that happens to make the files presentable [1].  With
zuulv3 native jobs this happens less and everyone has to be aware of
this behaviour (e.g. Ia7415d2fbbb320f8eddc4e46c3a055414df5f997 is a
good example of raw .log files being added).  I think it is fine to
assume a .log file is text that is safe to pass through os-loganalyze.

From my reading of os-loganalyze [2], a .log.gz file would get mached
by util.use_passthrough_view and by default be filtered via a HTMLView
-- thus the file_conditions.yaml update is perhaps unnecessary, but
provided just to keep things in sync with .txt which has always been
there (I9cda9c05f42c5658d1c1dde8aa2efbc0abcc48a2)

[1] https://git.openstack.org/cgit/openstack-infra/devstack-gate/tree/functions.sh#n869
[2] https://git.openstack.org/cgit/openstack-infra/os-loganalyze/tree/os_loganalyze/view.py#n237

Change-Id: I72e4f752713e7947bd66dfe8164976f0a4e3af24
2018-02-12 10:05:15 +11:00
Emilien Macchi 5fe1f3d2d5 Iterate readmes as an hash
- In vhosts templates, iterates each key/value from the hash
  by using the proper Ruby syntax: https://ruby-doc.org/core-2.2.0/Hash.html
- In logserver.pp, default readmes to an empty hash instead of an empty
  array.

Change-Id: Ib1c70cfd9254bb4da9b6f7477baa48918de16cc2
2017-07-31 21:59:30 -07:00
Emilien Macchi fdc4e9cc04 logserver: add legacy parameter
Add legacy parameter for logserver class, to install logserver resources
specific to OpenStack Infra only when needed (true by default for
backward compatibility).

Change-Id: I65e8ecf39130377c088c053e5623212f7db60f7a
2017-07-25 22:00:17 +00:00
Clark Boylan 524d236b80 Set json.gz mimetype properly
This sets the json.gz files' mimetype to application/json so that we can
compress stackviz report data and still have it render properly in your
browser. This will allow us to save space on the log server.

Change-Id: I42d7d607e5864a81d52e72ff695331eb2d67d2c0
2017-05-25 15:08:57 -07:00
David Moreau-Simard 04c64a7068 Allow logs.o.o to server gzipped svg files
We tested an addition to the logs-dev.o.o vhost in
https://review.openstack.org/#/c/435566/ in order to properly
detect and serve .svg.gz files and it works well.

Let's do it on logs.o.o.

Change-Id: I1305f7e1c4fe02269eccd60fe8d49419d8372b59
2017-03-03 09:14:01 -05:00
David Moreau-Simard 9345873ac2 Improve handling of gzipped built html/web applications
In I5e5d2da0ef3c385f836507e69a686821aba925a1 we applied new
rewrite rules and mimetypes on logs-dev.o.o to try and make
sure that rich html content (css/js/fonts) would work either
when gzipped prior to initial log upload or when automatically
gzipped after some time.

This brings the change from logs-dev.o.o to logs.o.o.

Change-Id: I20db0aa12eda8157d68a7b27dbbfe3ca729347c7
2016-11-15 09:31:39 -05:00
Jenkins 57f6321817 Merge "Order periodic job results by date" 2016-11-14 23:58:53 +00:00
Monty Taylor cf3a462a5f
Treat yaml files as plain text
We have a vars.yaml file that is output as part of jobs. It's useful to
be able to browse its content in the web.

Change-Id: I618b25cde4118ae3eadfdf88ad4e7f2f004d6b71
2016-10-20 14:08:50 -05:00
James E. Blair 33b2428e9a Logs: serve .log and .sh files as text/plain
Change-Id: Ic3692a3c9fa8269afa2073b212d739015acced9f
2016-06-15 10:48:27 -07:00
Sergey Skripnick 68390bd535 Force *.css files to text/css
Sometimes mod_mime_magic is passing css files as asm sources.

Change-Id: I38858b9e8c4aca27fd9ccb80f94dcb7c9281c81f
2016-04-08 16:54:14 +02:00
Ian Wienand 7733eec973 Order periodic job results by date
When someone looks at the logs for a periodic job, they are almost
certainly looking for the results of the latest run.  Order the
listing by date descending so that is right up the top, and you don't
have to search through all the entries to find the latest one.

Change-Id: Ie37343728a90a805b20b2b125e17cd3b11dc6b40
2016-04-06 10:42:49 +10:00
Clark Boylan bc6fd551ac Revert "Handle all requests through os-loganalyze"
This reverts commit fededacaf0.

Reverting because os-loganalyze doesn't list file sizes from disk. This
is an important piece of info for people debugging failures.

Change-Id: Ibecc3372c3040432db03056bd681dec182dd2d03
2015-10-07 12:44:51 -07:00
Joshua Hesketh fededacaf0 Handle all requests through os-loganalyze
os-loganalyze now has the ability to provide indexes for both on
disk and in swift files. Handle all requests through osloganalyze
so that paths containing both disk and swift files can have all
of their assets listed.

Change-Id: I495ce20d56b04fdc5c2051f2bbcb834049ac6bda
2015-09-30 11:42:04 +10:00
Jeremy Stanley 73dc45da35 Clean up logserver vhost templates
Remove some old path patterns which are a year past their expiration
date, and also sync up the logs-dev template comments to match the
production version (for ease of diffing).

Change-Id: Ibfd4fc1b16c3eac2c6093f1b031bf7ae237eaf04
2015-07-17 14:26:17 +00:00
Fabien Boucher de50cfa7bd Fix variables access warning in logs.vhost template
Use @varname to supress warnings

Change-Id: Iffd343c3f227f3797b1c42e2fb36ac0518bcc529
2015-07-13 10:19:59 +00:00
Ramy Asselin e8106a86e6 Create a log server like http://logs.openstack.org
Copy the log server templates & files used in:
https://git.openstack.org/cgit/openstack-infra/system-config/tree/modules/openstack_project

Refactor the log server portion out of:
https://git.openstack.org/cgit/openstack-infra/system-config/tree/modules/openstack_project/manifests/static.pp

Additional modifications:
1. Add protections for portions that are likely to conflict.
2. Update os_loganalyzer install to use pip instead of python

Related system-config change: I390f6ea8aaace276d211d55a0e17f25dd6ae26b5

Change-Id: Ib8476df83b7c5491158fa3cab588213be60fa2ab
2015-05-04 16:30:18 -07:00