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
This commit is contained in:
Emilien Macchi 2016-03-18 18:44:47 -04:00
parent 81cfaafa94
commit 5e6d1f863d

View File

@ -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