Store the func test config and logs in the func gate result

Change-Id: Id0f59e47ad1241aab802da11838e8ca8adb1543d
This commit is contained in:
Kota Tsuyuzaki 2018-02-13 19:24:25 +09:00
parent 633c7b9e48
commit b059cec4f5
3 changed files with 21 additions and 2 deletions

View File

@ -28,11 +28,11 @@ rvalue=$?
cd -
# dump log into VIRTUAL_ENV_DIR when this func test call via tox
if [ ! -z "${VIRTUAL_ENV+x}" ]; then
log_dir="${VIRTUAL_ENV}/log"
log_dir="${VIRTUAL_ENV}/logs"
mkdir -p ${log_dir}
echo "grep syslog from /etc/log/syslog to ${log_file}"
for log_name in "account-server" "container-server" "object-server" "proxy-server" "ansible" "storlets-daemon" "daemon-factory"; do
log_file="${log_dir}/${log_name}.log"
echo "grep syslog from /var/log/syslog to ${log_file}"
sudo egrep "${log_name}" /var/log/syslog > ${log_file}
sudo chown ${USER}.${USER} ${log_file}
done

View File

@ -10,4 +10,5 @@
name: storlets-functional
pre-run: playbooks/storlets-functional/pre.yaml
run: playbooks/storlets-functional/run.yaml
post-run: playbooks/storlets-functional/post.yaml
timeout: 2400

View File

@ -0,0 +1,18 @@
- hosts: all
tasks:
- name: Copy logs from worker nodes to executor node
synchronize:
# TODO: make it sort of tox_envdir
src: '{{ zuul.project.src_dir }}/.tox/func/logs'
dest: '{{ zuul.executor.log_root }}'
mode: pull
copy_links: true
verify_host: true
- name: Copy conf files from worker nodes to executor node
synchronize:
src: '/etc/swift'
dest: '{{ zuul.executor.log_root }}'
mode: pull
copy_links: true
verify_host: true