New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
travis_start_sauce_connect invalid retries leading to travis_stop_sauce_connect killing an invalid PID, leading to tunnel not closing #7178
Comments
The current logic is like this: function travis_start_sauce_connect() {
⋮
sc … &
_SC_PID="$!"
echo "Waiting for Sauce Connect readyfile"
while test ! -f ${sc_readyfile} && ps -f $_SC_PID >&/dev/null; do
sleep .5
done
if test ! -f ${sc_readyfile}; then
echo "readyfile not created"
fi
popd
test -f ${sc_readyfile}
return $?
} The function results with the result whether or not |
Maybe the -e flag would be better then? |
Hi, encountered the same issue. @BanzaiMan: |
thanks @BanzaiMan |
@mangui Patience, young Padawan. We need to deploy it! :-D |
That was quick, though 🙃 |
hehe no issue ! |
Deployed now. Let us know how it goes for you! |
good 4 me, verified on https://travis-ci.org/dailymotion/hls.js/jobs/193452771 |
Sauce Connect fails to start everytime on OS X images. I can't figure out why. The The error seems to be
Do I have to upgrade OS X images or there is something to fix? Thanks, |
Hi there, we are using Travis/SauceLabs on https://github.com/dailymotion/hls.js, and
while investigating an issue with Travis Saucelabs tunnel not closing appropriately, although
travis_stop_sauce_connect
was called,I found out the following from Travis logs :https://travis-ci.org/dailymotion/hls.js/jobs/193023923
if you unfold Starting Sauce Connect
you could see that Tunnel is setup appropriately on first try. as we can see sc PID is 1941
I am not clear why, but although the tunnel seems to be setup properly, the script is retrying.
these retries are happening everytime (see all batches here for example)
The command "eval travis_start_sauce_connect" failed. Retrying, 2 of 3
...
The command "eval travis_start_sauce_connect" failed. Retrying, 3 of 3
the unit tests then work as the tunnel was setup correctly at first attempt.
the issue is that after test is finished, the tunnel is not destroyed on calling
travis_stop_sauce_connect
, which is trying tokill ${_SC_PID}
but at that time, ${_SC_PID} is not matching with the right sauce_connect process
/home/travis/build.sh: line 356: kill: (2073) - No such process
SC_PID is 2073 instead of 1941.
as we can see SC_PID is retrieved just after launching
sc
https://github.com/travis-ci/travis-build/blob/1e005eb00653b81bd8a4a64b76ed604c9ca52b94/lib/travis/build/addons/sauce_connect/templates/sauce_connect.sh#L60
=> SC_PID contains the PID value of the 3rd retry, not the one from the working tunnel
=> I guess SC_PID needs to be persisted only if sc command was successful.
=> second question is why did the retries happened...
from the code it seems that
travis_start_sauce_connect
returns failurealthough I don't see this line printed in the logs.
I am suspecting that the return value of
travis_start_sauce_connect
is not correct.any help to investigate and fix this problem would be greatly appreciated, thanks !
Guillaume aka mangui
The text was updated successfully, but these errors were encountered: