From 5e6d1f863d18c6d8bc9043659086d4cf04ebedd2 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Fri, 18 Mar 2016 18:44:47 -0400 Subject: [PATCH] copy_puppet_logs: do not keep symlinks before upload The problem with symlinks is that source files can have restrictive permissions that would prevent jenkins user to scp logs/config to log servers. For history, it was causing an issue with /etc/neutron/plugin.ini on centos7 jobs. Change-Id: I55c29d18794b19b16931e9abd08fa9a96a4e8a4d --- jenkins/scripts/copy_puppet_logs.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/jenkins/scripts/copy_puppet_logs.sh b/jenkins/scripts/copy_puppet_logs.sh index ecb0a77cc5..4eb1b93122 100755 --- a/jenkins/scripts/copy_puppet_logs.sh +++ b/jenkins/scripts/copy_puppet_logs.sh @@ -168,6 +168,10 @@ ps -eo user,pid,ppid,lwp,%cpu,%mem,size,rss,cmd > $LOG_DIR/ps.txt sudo find $LOG_DIR -type d -execdir sudo chmod 755 '{}' \; sudo find $LOG_DIR -type f -execdir sudo chmod 644 '{}' \; +# do not try to save symlinks because source files might not have +# the right permissions to let jenkins user to upload them on log servers. +sudo find $LOG_DIR -type l -execdir sudo rm -f '{}' \; + # rename files to .txt; this is so that when displayed via # logs.openstack.org clicking results in the browser shows the # files, rather than trying to send it to another app or make you