15 Commits

Author SHA1 Message Date
Andreas Jaeger
1db085d5ec Wrap some overly long lines
To cut down on noise when running bashate, wrap some overlong lines.

Change-Id: I23dcffbae2539d3d6b11e5527f3d4cbf08a18064
2015-12-23 13:56:53 +01:00
Clark Boylan
5bf316794f Fix grab console log partial gets
The grab console log script started by cleaning out any existing console
log files with echo. Unfortunately echo appends a newline by default
which meant we ended up with a 1 byte file instead of a 0 byte file.
This resulted in grabbing the console log from byte offset 1 instead of
0 and jenkins is weird and prepended base64 content at the beginning of
the log file in this case.

Fix this by using echo -n to clear the file which results in a 0 byte
file.

Change-Id: I8bd7cbd0c19cd44067839b34e317248daad9f578
2015-11-11 14:36:27 -08:00
Rafael Folco
680f3c73b2 Prevent errors due to non-existing console.html
Grep and stat were producing the error "No such file or directory"
while the consoleLog was not available to download. Keeping an empty
/tmp/console.html resolves the problem. It's also possible to debug any
possible issues with curl and grep independently since curl would
report 404 for missing url and a new error message was introduced
for missing UUID after the max retries.

Change-Id: Icb28bfca96e5eaff725d2efcfb47c3399e3991c4
2015-10-24 20:02:57 -05:00
Clark Boylan
3d5a035197 Fix retries in grab_console_log.sh
We implemented retries of console log grabbing to workaround occasional
jenkins 502 errors, but this is running under set -e so curl returning a
non zero error message resulted in short circuiting the retries and
failed the jobs.

Fix this with a simple || true appendage to the curl command so that any
failed curls can error properly without affecting the error checking in
the script. We will then retry until we eventually give up.

Change-Id: I0a784aa45bff7de5b411372ccecc569ec148ecc5
2015-04-15 16:51:14 -07:00
Clark Boylan
8e979b2c95 Don't dump Jenkins proxy errors to console logs
When grabbing the console logs for jobs in order to upload these logs to
swift we may run into Jenkins proxy errors which then end up in our
console log file.

Avoid this by using curl --fail which will not output any data and
return 22 if the request fails.

While editing this curl command document the odd choice of flags given
as their necessity may not be very apparent.

Change-Id: I7e53e11882046282b95addd635d804fa29b0eb44
2015-03-18 10:22:14 -07:00
Clark Boylan
abc3f30174 Stop getting console.txt for swift logs
We are successfully downloading the console.html log and reuploading it
to swift now. Stop downloading the console.txt file which does not
include any timestamps and is not uploaded.

Change-Id: I63381a5a1ef305ecaff8fa2c0a4e6964291428f9
2015-01-30 17:22:39 -08:00
Clark Boylan
972a0b716e Jenkins uses POSTs to do sequential downloads
Rather than use GET and a range Jenkins uses POSTs with
start=beginningindex to do partial downloads of the console text and
console html files. Why? Who knows. Support this ridiculousness in our
grab console log script so that we can get entire logs.

Change-Id: Ie653f3d8980dbf8e8606e6584a9c0ab40d2485ca
2015-01-30 16:12:41 -08:00
Joshua Hesketh
fd20281bbf Do not use cache while fetching console logs
Change-Id: I48014207b8cee7f8e0d8febbce8f9cb177fa21f5
2015-01-30 10:49:13 +11:00
Joshua Hesketh
7cd93ec597 Fix bash if exit
Change-Id: I82fe3c2e702bbad9a8b3dc87e3317eb4dd4fc6c8
2015-01-27 16:47:17 +11:00
Joshua Hesketh
0f44961ec9 Put in a retry limit for fetching logs
Change-Id: Iaf82e449fa8d006d6d7c85a6774bb92fe68d1736
2015-01-27 15:47:52 +11:00
Joshua Hesketh
de61f924b1 Remove old log fetches in case of conflict
Since we are appending to logs we should make sure the fetch
destination is clean before downloading in case we are on a
non-ephemerial node.

Change-Id: I315fda50ab98de5dd243eec745c702877069c646
2015-01-27 13:27:13 +11:00
Joshua Hesketh
d7446cec39 Check logs are complete before uploading to swift
Add a UUID to the end of the logs that should exist before we're
satisifed enough to upload the logs. This should avoid truncating
the logs too early.

Change-Id: I00d36f71b9025b45eb680bbb7300270800514eb7
2015-01-27 11:54:02 +11:00
Joshua Hesketh
efcbcb1341 Still fetch the text version of the console
The jobs still require the text version of the console log.
Because we need to rebuild the images before we can update which
console log is being uploaded we still need to fetch console.txt

Change-Id: Ib16b5d730e7b4b10f5bd0b264526ba1c5dd149fd
2014-10-08 06:15:43 +11:00
Joshua Hesketh
ca9b73efba Grab the html version of console log
Currently we are only grabbing the text output from Jenkins. However,
this doesn't have timestamps which isn't ideal. We can use the
internal url that is used by Jenkins to generate its web page to
fetch the console logs with timestamps and formatting.

We need to surround the output in pre tags since os-loganlayze uses
that to determine whether to escape the html or not.

Change-Id: I7584ea37f84521d65f327f327ff5e47b096fa230
2014-10-07 20:07:25 +02:00
Anita Kuno
1d21cd635f Reorganizes project-config
This repo was created from filter branching the openstack-infra/
config repo. This process brought a lot of cruft with it in the
form of directories that we no longer need. This patch removes
that cruft so we begin with a tidier repo.

Change-Id: Ibffad1b11c0c5f84eedfb0365369f60c4961a0f3
2014-09-25 11:41:04 -04:00