Skip to content

Commit 9251284

Browse files
Merge pull request #19180 from danwinship/extended-network-test-logs
Store logs uncompressed in the networking test artifacts
2 parents b272eb7 + 30f5247 commit 9251284

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

test/extended/networking.sh

+7-8
Original file line numberDiff line numberDiff line change
@@ -55,27 +55,26 @@ function copy-container-files() {
5555

5656
function save-container-logs() {
5757
local base_dest_dir=$1
58-
local output_to_stdout=${2:-}
58+
local deployment_failed=${2:-}
5959

6060
os::log::info "Saving container logs"
6161

62-
local container_log_file="/tmp/systemd.log.gz"
62+
local container_log_file="/tmp/systemd.log"
6363

6464
for container_name in "${CONTAINER_NAMES[@]}"; do
6565
local dest_dir="${base_dest_dir}/${container_name}"
6666
if [[ ! -d "${dest_dir}" ]]; then
6767
mkdir -p "${dest_dir}"
6868
fi
69-
sudo docker exec -t "${container_name}" bash -c "journalctl | \
70-
gzip > ${container_log_file}"
69+
sudo docker exec -t "${container_name}" bash -c "journalctl > ${container_log_file}"
7170
sudo docker cp "${container_name}:${container_log_file}" "${dest_dir}"
72-
# Output container logs to stdout to ensure that jenkins has
73-
# detail to classify the failure cause.
74-
if [[ -n "${output_to_stdout}" ]]; then
71+
if [[ -n "${deployment_failed}" ]]; then
72+
# Output container logs to stdout to ensure that jenkins has
73+
# detail to classify the failure cause.
7574
local msg="System logs for container ${container_name}"
7675
os::log::info "< ${msg} >"
7776
os::log::info "***************************************************"
78-
gunzip --stdout "${dest_dir}/$(basename "${container_log_file}")"
77+
cat "${dest_dir}/$(basename "${container_log_file}")"
7978
os::log::info "***************************************************"
8079
os::log::info "</ ${msg} >"
8180
fi

0 commit comments

Comments
 (0)