Build failed in Jenkins: ovirt_master_system-tests #884

jenkins at jenkins.phx.ovirt.org jenkins at jenkins.phx.ovirt.org
Mon Dec 26 03:00:46 UTC 2016


See <http://jenkins.ovirt.org/job/ovirt_master_system-tests/884/changes>

Changes:

[Yaniv Kaul] Fixes and changes to storage tests

[Barak Korren] Fix report job

[Liron Aravot] ovirt-imageio_build-artifacts 4.1 explicit job info

[Gil Shinar] Fix some more issues with SDK jobs

------------------------------------------
[...truncated 886 lines...]
+ [[ -e <http://jenkins.ovirt.org/job/ovirt_master_system-tests/ws/ovirt-system-tests/deployment-basic-suite-master> ]]
+ echo '----------- Cleaning with lago'
----------- Cleaning with lago
+ lago --workdir <http://jenkins.ovirt.org/job/ovirt_master_system-tests/ws/ovirt-system-tests/deployment-basic-suite-master> destroy --yes --all-prefixes
+ echo '----------- Cleaning with lago done'
----------- Cleaning with lago done
+ [[ 0 != \0 ]]
+ echo '======== Cleanup done'
======== Cleanup done
+ exit 0
+ exit
Took 1758 seconds
===================================
##!
##! ERROR ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
##!########################################################
##########################################################
Build step 'Execute shell' marked build as failure
Performing Post build task...
Match found for :.* : True
Logical operation result is TRUE
Running script  : #!/bin/bash -xe
echo 'shell_scripts/system_tests.collect_logs.sh'

#
# Required jjb vars:
#    version
#
VERSION=master
SUITE_TYPE=

WORKSPACE="$PWD"
OVIRT_SUITE="$SUITE_TYPE_suite_$VERSION"
TESTS_LOGS="$WORKSPACE/ovirt-system-tests/exported-artifacts"

rm -rf "$WORKSPACE/exported-artifacts"
mkdir -p "$WORKSPACE/exported-artifacts"

if [[ -d "$TESTS_LOGS" ]]; then
    mv "$TESTS_LOGS/"* "$WORKSPACE/exported-artifacts/"
fi

[ovirt_master_system-tests] $ /bin/bash -xe /tmp/hudson7721598891199889367.sh
+ echo shell_scripts/system_tests.collect_logs.sh
shell_scripts/system_tests.collect_logs.sh
+ VERSION=master
+ SUITE_TYPE=
+ WORKSPACE=<http://jenkins.ovirt.org/job/ovirt_master_system-tests/ws/>
+ OVIRT_SUITE=master
+ TESTS_LOGS=<http://jenkins.ovirt.org/job/ovirt_master_system-tests/ws/ovirt-system-tests/exported-artifacts>
+ rm -rf <http://jenkins.ovirt.org/job/ovirt_master_system-tests/884/artifact/exported-artifacts>
+ mkdir -p <http://jenkins.ovirt.org/job/ovirt_master_system-tests/884/artifact/exported-artifacts>
+ [[ -d <http://jenkins.ovirt.org/job/ovirt_master_system-tests/ws/ovirt-system-tests/exported-artifacts> ]]
+ mv <http://jenkins.ovirt.org/job/ovirt_master_system-tests/ws/ovirt-system-tests/exported-artifacts/failure_msg.txt> <http://jenkins.ovirt.org/job/ovirt_master_system-tests/ws/ovirt-system-tests/exported-artifacts/lago_logs> <http://jenkins.ovirt.org/job/ovirt_master_system-tests/ws/ovirt-system-tests/exported-artifacts/nosetests-001_initialize_engine.py.xml> <http://jenkins.ovirt.org/job/ovirt_master_system-tests/ws/ovirt-system-tests/exported-artifacts/nosetests-002_bootstrap.py.xml> <http://jenkins.ovirt.org/job/ovirt_master_system-tests/ws/ovirt-system-tests/exported-artifacts/nosetests-003_basic_networking.py.xml> <http://jenkins.ovirt.org/job/ovirt_master_system-tests/ws/ovirt-system-tests/exported-artifacts/nosetests-004_basic_sanity.py.xml> <http://jenkins.ovirt.org/job/ovirt_master_system-tests/ws/ovirt-system-tests/exported-artifacts/test_logs> <http://jenkins.ovirt.org/job/ovirt_master_system-tests/884/artifact/exported-artifacts/>
POST BUILD TASK : SUCCESS
END OF POST BUILD TASK : 0
Match found for :.* : True
Logical operation result is TRUE
Running script  : #!/bin/bash -x
echo "shell-scripts/mock_cleanup.sh"
# Make clear this is the cleanup, helps reading the jenkins logs
cat <<EOC
_______________________________________________________________________
#######################################################################
#                                                                     #
#                               CLEANUP                               #
#                                                                     #
#######################################################################
EOC

shopt -s nullglob

WORKSPACE="${WORKSPACE:-$PWD}"
UMOUNT_RETRIES="${UMOUNT_RETRIES:-3}"
UMOUNT_RETRY_DELAY="${UMOUNT_RETRY_DELAY:-1s}"

safe_umount() {
    local mount="${1:?}"
    local attempt
    for ((attempt=0 ; attempt < $UMOUNT_RETRIES ; attempt++)); do
        # If this is not the 1st time through the loop, Sleep a while to let
        # the problem "solve itself"
        [[ attempt > 0 ]] && sleep "$UMOUNT_RETRY_DELAY"
        # Try to umount
        sudo umount --lazy "$mount" && return 0
        # See if the mount is already not there despite failing
        findmnt --kernel --first "$mount" > /dev/null && return 0
    done
    echo "ERROR:  Failed to umount $mount."
    return 1
}

# restore the permissions in the working dir, as sometimes it leaves files
# owned by root and then the 'cleanup workspace' from jenkins job fails to
# clean and breaks the jobs
sudo chown -R "$USER" "$WORKSPACE"

# Archive the logs, we want them anyway
logs=(
    ./*log
    ./*/logs
)

if [[ "$logs" ]]; then
    for log in "${logs[@]}"; do
        [[ "$log" = ./exported-artifacts/* ]] && continue
        echo "Copying ${log} to exported-artifacts"
        mv $log exported-artifacts/
    done
fi

# stop any processes running inside the chroot
failed=false
mock_confs=("$WORKSPACE"/*/mocker*)
# Clean current jobs mockroot if any
for mock_conf_file in "${mock_confs[@]}"; do
    [[ "$mock_conf_file" ]] || continue
    echo "Cleaning up mock $mock_conf"
    mock_root="${mock_conf_file##*/}"
    mock_root="${mock_root%.*}"
    my_mock="/usr/bin/mock"
    my_mock+=" --configdir=${mock_conf_file%/*}"
    my_mock+=" --root=${mock_root}"
    my_mock+=" --resultdir=$WORKSPACE"

    #TODO: investigate why mock --clean fails to umount certain dirs sometimes,
    #so we can use it instead of manually doing all this.
    echo "Killing all mock orphan processes, if any."
    $my_mock \
        --orphanskill \
    || {
        echo "ERROR:  Failed to kill orphans on $chroot."
        failed=true
    }

    mock_root="$(\
        grep \
            -Po "(?<=config_opts\['root'\] = ')[^']*" \
            "$mock_conf_file" \
    )" || :
    [[ "$mock_root" ]] || continue
    mounts=($(mount | awk '{print $3}' | grep "$mock_root")) || :
    if [[ "$mounts" ]]; then
        echo "Found mounted dirs inside the chroot $chroot. Trying to umount."
    fi
    for mount in "${mounts[@]}"; do
        safe_umount "$mount" || failed=true
    done
done

# Clean any leftover chroot from other jobs
for mock_root in /var/lib/mock/*; do
    this_chroot_failed=false
    mounts=($(cut -d\  -f2 /proc/mounts | grep "$mock_root" | sort -r)) || :
    if [[ "$mounts" ]]; then
        echo "Found mounted dirs inside the chroot $mock_root." \
             "Trying to umount."
    fi
    for mount in "${mounts[@]}"; do
        safe_umount "$mount" && continue
        # If we got here, we failed $UMOUNT_RETRIES attempts so we should make
        # noise
        failed=true
        this_chroot_failed=true
    done
    if ! $this_chroot_failed; then
        sudo rm -rf "$mock_root"
    fi
done

# remove mock caches that are older then 2 days:
find /var/cache/mock/ -mindepth 1 -maxdepth 1 -type d -mtime +2 -print0 | \
    xargs -0 -tr sudo rm -rf
# We make no effort to leave around caches that may still be in use because
# packages installed in them may go out of date, so may as well recreate them

# Drop all left over libvirt domains
for UUID in $(virsh list --all --uuid); do
  virsh destroy $UUID || :
  sleep 2
  virsh undefine --remove-all-storage --storage vda --snapshots-metadata $UUID || :
done

if $failed; then
    echo "Cleanup script failed, propegating failure to job"
    exit 1
fi

[ovirt_master_system-tests] $ /bin/bash -x /tmp/hudson2137599006384966187.sh
+ echo shell-scripts/mock_cleanup.sh
shell-scripts/mock_cleanup.sh
+ cat
_______________________________________________________________________
#######################################################################
#                                                                     #
#                               CLEANUP                               #
#                                                                     #
#######################################################################
+ shopt -s nullglob
+ WORKSPACE=<http://jenkins.ovirt.org/job/ovirt_master_system-tests/ws/>
+ UMOUNT_RETRIES=3
+ UMOUNT_RETRY_DELAY=1s
+ sudo chown -R jenkins <http://jenkins.ovirt.org/job/ovirt_master_system-tests/ws/>
+ logs=(./*log ./*/logs)
+ [[ -n ./ovirt-system-tests/logs ]]
+ for log in '"${logs[@]}"'
+ [[ ./ovirt-system-tests/logs = ./exported-artifacts/* ]]
+ echo 'Copying ./ovirt-system-tests/logs to exported-artifacts'
Copying ./ovirt-system-tests/logs to exported-artifacts
+ mv ./ovirt-system-tests/logs exported-artifacts/
+ failed=false
+ mock_confs=("$WORKSPACE"/*/mocker*)
+ for mock_conf_file in '"${mock_confs[@]}"'
+ [[ -n <http://jenkins.ovirt.org/job/ovirt_master_system-tests/ws/ovirt-system-tests/mocker-epel-7-x86_64.el7.cfg> ]]
+ echo 'Cleaning up mock '
Cleaning up mock 
+ mock_root=mocker-epel-7-x86_64.el7.cfg
+ mock_root=mocker-epel-7-x86_64.el7
+ my_mock=/usr/bin/mock
+ my_mock+=' --configdir=<http://jenkins.ovirt.org/job/ovirt_master_system-tests/ws/ovirt-system-tests'>
+ my_mock+=' --root=mocker-epel-7-x86_64.el7'
+ my_mock+=' --resultdir=<http://jenkins.ovirt.org/job/ovirt_master_system-tests/ws/'>
+ echo 'Killing all mock orphan processes, if any.'
Killing all mock orphan processes, if any.
+ /usr/bin/mock --configdir=<http://jenkins.ovirt.org/job/ovirt_master_system-tests/ws/ovirt-system-tests> --root=mocker-epel-7-x86_64.el7 --resultdir=<http://jenkins.ovirt.org/job/ovirt_master_system-tests/ws/> --orphanskill
WARNING: Could not find required logging config file: <http://jenkins.ovirt.org/job/ovirt_master_system-tests/ws/ovirt-system-tests/logging.ini.> Using default...
INFO: mock.py version 1.2.21 starting (python version = 3.5.1)...
Start: init plugins
INFO: selinux enabled
Finish: init plugins
Start: run
Finish: run
++ grep -Po '(?<=config_opts\['\''root'\''\] = '\'')[^'\'']*' <http://jenkins.ovirt.org/job/ovirt_master_system-tests/ws/ovirt-system-tests/mocker-epel-7-x86_64.el7.cfg>
+ mock_root=epel-7-x86_64-b8fbc97503d2f9478015768d3094ffe4
+ [[ -n epel-7-x86_64-b8fbc97503d2f9478015768d3094ffe4 ]]
+ mounts=($(mount | awk '{print $3}' | grep "$mock_root"))
++ mount
++ awk '{print $3}'
++ grep epel-7-x86_64-b8fbc97503d2f9478015768d3094ffe4
+ :
+ [[ -n '' ]]
+ find /var/cache/mock/ -mindepth 1 -maxdepth 1 -type d -mtime +2 -print0
+ xargs -0 -tr sudo rm -rf
++ virsh list --all --uuid
+ false
POST BUILD TASK : SUCCESS
END OF POST BUILD TASK : 1
Recording test results
Archiving artifacts


More information about the Infra mailing list