From 0790a87914e7a9560b9bbe584860f30f6dcb5fc2 Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Wed, 29 Nov 2017 10:01:29 -0500 Subject: [PATCH] Add collection of IPA failure logs Sometimes we need to troubleshoot CI a little more, So lets preserve IPA failure logs so we can investigate further. Change-Id: I47e7f45e65997a61e41c73e072e3c8c31ef9a244 --- scripts/collect-test-info.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/collect-test-info.sh b/scripts/collect-test-info.sh index e033f2527..baba9f57e 100755 --- a/scripts/collect-test-info.sh +++ b/scripts/collect-test-info.sh @@ -40,10 +40,13 @@ else sudo cp /var/log/upstart/ironic-api.log ${LOG_LOCATION}/ sudo cp /var/log/upstart/ironic-conductor.log ${LOG_LOCATION}/ fi -sudo chown $USER ${LOG_LOCATION}/ironic-api.log -sudo chown $USER ${LOG_LOCATION}/ironic-conductor.log + +if [ -d "/var/log/ironic" ]; then + cp -a "/var/log/ironic" ${LOG_LOCATION}/ipa-logs +fi + +sudo chown -R $USER ${LOG_LOCATION} # In CI scenarios, we want other users to be able to read the logs. -sudo chmod o+r ${LOG_LOCATION}/ironic-api.log -sudo chmod o+r ${LOG_LOCATION}/ironic-conductor.log +sudo chmod -R o+r ${LOG_LOCATION} exit 0