)]}'
{"test-log-collect.sh":[{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"d55dae9656d3afd0f62409fdb2699fd363dcac80","unresolved":false,"context_lines":[{"line_number":203,"context_line":"    fi"},{"line_number":204,"context_line":"done"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"# Compress the files gathered so that they do not take up too much space."},{"line_number":207,"context_line":"# We use \u0027command\u0027 to ensure that we\u0027re not executing with some sort of alias."},{"line_number":208,"context_line":"command gzip --force --best --recursive \"${WORKING_DIR}/logs/\""},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"echo \"#### END LOG COLLECTION ###\""}],"source_content_type":"text/x-sh","patch_set":1,"id":"df87a7cf_ae2dec95","side":"PARENT","line":208,"range":{"start_line":206,"start_character":0,"end_line":208,"end_character":62},"updated":"2017-12-20 11:02:24.000000000","message":"Here we compress them. So the question Markos has raised is appropriate - what removed the file? Did we somehow copy a symlink - if so, we should adjust the copy to make sure we don\u0027t.","commit_id":"4bb840d2deec944c9add2858fcdb4b083edd7bde"},{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"d55dae9656d3afd0f62409fdb2699fd363dcac80","unresolved":false,"context_lines":[{"line_number":115,"context_line":""},{"line_number":116,"context_line":"mkdir -vp \"${WORKING_DIR}/logs\""},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"# Gather basic logs"},{"line_number":119,"context_line":"store_artifacts /openstack/log/ansible-logging/ \"${WORKING_DIR}/logs/ansible\""},{"line_number":120,"context_line":"store_artifacts /openstack/log/ \"${WORKING_DIR}/logs/openstack\""},{"line_number":121,"context_line":"store_artifacts /var/log/ \"${WORKING_DIR}/logs/host\""},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"# Get the ara sqlite database"},{"line_number":124,"context_line":"store_artifacts \"${TESTING_HOME}/.ara/ansible.sqlite\" \"${WORKING_DIR}/logs/ara/\""},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"# Gather host etc artifacts"},{"line_number":127,"context_line":"for service in ${COMMON_ETC_LOG_NAMES}; do"},{"line_number":128,"context_line":"    store_artifacts \"/etc/${service}\" \"${WORKING_DIR}/logs/etc/host/\""},{"line_number":129,"context_line":"done"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"# Gather container etc artifacts"},{"line_number":132,"context_line":"if which lxc-ls \u0026\u003e /dev/null; then"},{"line_number":133,"context_line":" for CONTAINER_NAME in $(sudo lxc-ls -1); do"},{"line_number":134,"context_line":"   CONTAINER_PID\u003d$(sudo lxc-info -p -n ${CONTAINER_NAME} | awk \u0027{print $2}\u0027)"},{"line_number":135,"context_line":"   ETC_DIR\u003d\"/proc/${CONTAINER_PID}/root/etc\""},{"line_number":136,"context_line":"   LOG_DIR\u003d\"/proc/${CONTAINER_PID}/root/var/log\""},{"line_number":137,"context_line":"   repo_information ${CONTAINER_NAME}"},{"line_number":138,"context_line":"   for service in ${COMMON_ETC_LOG_NAMES}; do"},{"line_number":139,"context_line":"      store_artifacts ${ETC_DIR}/${service} \"${WORKING_DIR}/logs/etc/openstack/${CONTAINER_NAME}/\""},{"line_number":140,"context_line":"      store_artifacts ${LOG_DIR}/${service} \"${WORKING_DIR}/logs/openstack/${CONTAINER_NAME}/\""},{"line_number":141,"context_line":"   done"},{"line_number":142,"context_line":" done"},{"line_number":143,"context_line":"fi"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"# NOTE(mhayden): All of the files must be world-readable so that the log"},{"line_number":146,"context_line":"# pickup jobs will work properly. Without this, you get a \"File not found\""}],"source_content_type":"text/x-sh","patch_set":1,"id":"df87a7cf_2e10fc4d","line":143,"range":{"start_line":118,"start_character":0,"end_line":143,"end_character":2},"updated":"2017-12-20 11:02:24.000000000","message":"Here we gather all the logs from the original place to the logs folder.","commit_id":"9092c1f5fe0cc5f28e646be7257e30d8b28c828d"},{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"d55dae9656d3afd0f62409fdb2699fd363dcac80","unresolved":false,"context_lines":[{"line_number":142,"context_line":" done"},{"line_number":143,"context_line":"fi"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"# NOTE(mhayden): All of the files must be world-readable so that the log"},{"line_number":146,"context_line":"# pickup jobs will work properly. Without this, you get a \"File not found\""},{"line_number":147,"context_line":"# when trying to read the files in the job results."},{"line_number":148,"context_line":"# NOTE(odyssey4me): Using \u0027--chown $(whoami) --chmod\u003dugo+rX\u0027 in the rsync"},{"line_number":149,"context_line":"# CMD to achieve this would be optimal, but the CentOS version of rsync"},{"line_number":150,"context_line":"# (3.0.x) does not support that option."},{"line_number":151,"context_line":"sudo chmod -R ugo+rX \"${WORKING_DIR}/logs/\""},{"line_number":152,"context_line":"sudo chown -R $(whoami) \"${WORKING_DIR}/logs/\""},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"# Rename all files gathered to have a .txt suffix so that the compressed"},{"line_number":155,"context_line":"# files are viewable via a web browser in OpenStack-CI."},{"line_number":156,"context_line":"find \"${WORKING_DIR}/logs/\" -type f ! -name \u0027*.html\u0027 -exec mv {} {}.txt \\;"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"# Figure out the correct path for ARA"},{"line_number":159,"context_line":"# As this script is not run through tox, and the tox envs are all"}],"source_content_type":"text/x-sh","patch_set":1,"id":"df87a7cf_4e1ea05f","line":156,"range":{"start_line":145,"start_character":0,"end_line":156,"end_character":74},"updated":"2017-12-20 11:02:24.000000000","message":"Here we adjust those files to suit being served by a web server.","commit_id":"9092c1f5fe0cc5f28e646be7257e30d8b28c828d"}]}
