[OpenStack-Infra] Issue with setup_workspace in safe-vm-gate-wrap.sh

Bob Hansen hansenb at us.ibm.com
Tue Dec 1 21:10:42 UTC 2015



This showed up today after I ran a job to  continue to test my 3rd party CI
system. It appears that the $2 argument is not being properly passed to
setup_workspace. The failure shows up when in the scirpt when the argument
is actuall used.

Here's snippets form the relevant log. In the jenkins console I see this, I
added a few trace statements. This all looks good to me, the command
invocation looks correct;  at lest on the tsfilter invocation;
setup_workspace $OVERRIDE_ZUUL_BRANCH $BASE/new, $BASE is set to /opt/stack

Setting up the workspace BASE is set to /opt/stack
+ echo '... this takes 3 - 5 minutes (logs at
logs/devstack-gate-setup-workspace-new.txt.gz)'
... this takes 3 - 5 minutes (logs at
logs/devstack-gate-setup-workspace-new.txt.gz)
++ date +%s
+ start=1448995816
++ run_command setup_workspace '$OVERRIDE_ZUUL_BRANCH' '$BASE/new'
++ local 'fn=setup_workspace $OVERRIDE_ZUUL_BRANCH $BASE/new'
++ local cmd=
++ read -r -d '' cmd
++ echo 'source
'\''/var/lib/jenkins/workspace/zvm-ci-test-slave/test_env.sh'\''
source
'\''/var/lib/jenkins/workspace/zvm-ci-test-slave/devstack-gate/functions.sh'\''

set -o errexit
tsfilter setup_workspace $OVERRIDE_ZUUL_BRANCH $BASE/new
executable=/bin/bash'
+ /tmp/ansible/bin/ansible all -f 5
-i /var/lib/jenkins/workspace/zvm-ci-test-slave/inventory -m shell -a
'source '\''/var/lib/jenkins/workspace/zvm-ci-test-slave/test_env.sh'\''
source
'\''/var/lib/jenkins/workspace/zvm-ci-test-slave/devstack-gate/functions.sh'\''

set -o errexit
tsfilter setup_workspace $OVERRIDE_ZUUL_BRANCH $BASE/new
executable=/bin/bash'
++ date +%s
+ end=1448995817
+ took=0
+ [[ 0 -gt 10 ]]

However, if I look the log file for the workspace setup, or
devstack-gate-setup-workspace-new.txt, (wtih a few more traces added as
well), I see that $2 is passed as being empty, I would have expected it to
be the value of $BASE/new as show in the tsfilter line above. $BASE should
be /opt/stack as show in the trace above.

localhost | FAILED | rc=1 >>
2015-12-01 20:48:10.373 | DEST is set to  or  In setup_workspace
2015-12-01 20:48:10.387 | BASE is set to /opt/stack is set globally.. In
setup_workspace
2015-12-01 20:48:10.398 | base_branch is set to /opt/stack/new
or /opt/stack/new

It fails when the script does the mkdir -p $BASE a few lines down in
functions.sh

function setup_workspace {
    local base_branch=$1
    local DEST=$2
    local xtrace=$(set +o | grep xtrace)
    local cache_dir=$BASE/cache/files/

    echo "DEST is set to $DEST or $2 In setup_workspace"
    echo "BASE is set to $BASE is set globally.. In setup_workspace"
    echo "base_branch is set to $base_branch or $1"

    DEST=$BASE/new

...

    sudo mkdir -p $DEST
    sudo chown -R $USER:$USER $DEST

The script looks like this



I'm at a loss as to what could be going on. I've had to hack the script to
make my gate jobs run, don't want to live with this, as this has been
running pretty well for me for a while now without the ahck.

Bob Hansen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-infra/attachments/20151201/de12e918/attachment.html>


More information about the OpenStack-Infra mailing list