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
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
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
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
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
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
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
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
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
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
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