From ddb3965d30454485a47513070bd102de2d576411 Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Mon, 27 Jun 2016 09:01:19 -0400 Subject: [PATCH] Fix testing script permission settings for logs Somewhere along the way we lost the ability to read the conductor, api, and baremetal log files that we retained for storage as CI test results. This revision resets the permissions so any user can read the file since we can't make assumptions about the webserver user. Change-Id: Idc36f736f9e54a69348045988483559b88e51980 --- scripts/collect-test-info.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/collect-test-info.sh b/scripts/collect-test-info.sh index 90d07a795..a43fc3b33 100755 --- a/scripts/collect-test-info.sh +++ b/scripts/collect-test-info.sh @@ -14,6 +14,7 @@ echo "Making logs directory and collecting logs." [ -d ${LOG_LOCATION} ] || mkdir -p ${LOG_LOCATION} sudo cp /var/log/libvirt/baremetal_logs/testvm[[:digit:]]_console.log ${LOG_LOCATION} sudo chown $USER ${LOG_LOCATION}/testvm[[:digit:]]_console.log +sudo chmod o+r ${LOG_LOCATION}/testvm[[:digit:]]_console.log dmesg &> ${LOG_LOCATION}/dmesg.log # NOTE(TheJulia): Netstat exits with error code 5 when --version is used. sudo netstat -apn &> ${LOG_LOCATION}/netstat.log @@ -32,3 +33,6 @@ else fi sudo chown $USER ${LOG_LOCATION}/ironic-api.log sudo chown $USER ${LOG_LOCATION}/ironic-conductor.log +# 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