This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "ABE".
The branch, bernie/benchmarking has been updated via 6a6a471995dbe92169873881c96b28a2c1769c33 (commit) from 7779401eb9c54ca170928452892cd8424edfff6e (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 6a6a471995dbe92169873881c96b28a2c1769c33 Author: Bernard Ogden bernie.ogden@linaro.org Date: Thu Jul 9 10:51:40 2015 +0200
Remove private network check
Change-Id: Ic4518b8e5c161733ba6fd21f1a3b17f6aed5770d
diff --git a/scripts/benchmark.sh b/scripts/benchmark.sh index 67f875f..a4d696b 100755 --- a/scripts/benchmark.sh +++ b/scripts/benchmark.sh @@ -78,13 +78,6 @@ if test "$((`umask` & 077))" -ne 63; then exit 1 fi fi - -#TODO: Really, this check should operate on the route from the git server to localhost -. "${topdir}/scripts/benchutil.sh" -if ! check_private_route localhost; then - echo "Do not appear to be on private network, conservatively aborting" 1>&2 - exit 1 -fi #End sanity checks
tag="" diff --git a/scripts/benchutil.sh b/scripts/benchutil.sh index 7111542..66a6c6d 100644 --- a/scripts/benchutil.sh +++ b/scripts/benchutil.sh @@ -156,59 +156,3 @@ function bgread return 0 }
-#Use ping to perform a traceroute-like check of route to some target -#It's probably not guaranteed that other protocols (or even future pings) will -#take the same route, this is just a conservative sanity check. -function check_private_route -{ - local myaddr - local pingout - local ttl - local retry - - if test x"${1:-}" = x; then - echo "check_private_route requires a parameter" 1>&2 - return 1 - fi - - #Extended regexps (use grep -E) - local block24='10.[[:digit:]]+.[[:digit:]]+.[[:digit:]]+' - local block20='172.(1[6-9]|2[0-9]|3[0-1]).[[:digit:]]+.[[:digit:]]+' - local block16='192.168.[[:digit:]]+.[[:digit:]]+' - - myaddr="`get_addr`" - if test $? -ne 0; then - echo "Cannot get a usable IP address to check route" 1>&2 - return 1 - fi - - #Check we're on something in a private network to start with - if ! echo "${myaddr}" | grep -Eq "^(${block24}|${block20}|${block16})$"; then - echo "Own IP address ${myaddr} does not match any known private network range" 1>&2 - return 1 - fi - - #Check every stop along the way to target. DO NOT check target itself - assume - #that we don't hop off our network even if its IP appears to be non-private. - #This is a crude, but generic and unprivileged, way of doing traceroute - what - #we really want is the routing tables, I think. - for ttl in {1..10}; do - #This thing sometimes fails spuriously - I can't fathom why, so we retry - #a few times. Sigh. - for retry in {1..5}; do - pingout="`ping -n -t ${ttl} -c 1 $1`" - if test $? -eq 0; then - return 0 #We've reached the target - fi - echo "${pingout}" | grep -Eq "^From (${block24}|${block20}|${block16}) icmp_seq=1 Time to live exceeded$" - if test $? -eq 0; then - continue 2 - fi - done - echo "Surprising stop on hop ${ttl} on route to benchmark target: '${pingout}'" 1>&2 - return 1 - done - - echo "Failed to reach benchmark target within ${ttl} hops" 1>&2 - return 1 -} diff --git a/scripts/runbenchmark.sh b/scripts/runbenchmark.sh index 003ed64..e966952 100755 --- a/scripts/runbenchmark.sh +++ b/scripts/runbenchmark.sh @@ -180,12 +180,6 @@ if test $? -eq 0; then gateway=lab.validation.linaro.org ssh_opts="${ssh_opts} ProxyCommand='ssh ${lava_user}@${gateway} nc -q0 %h %p'" establish_listener_opts="-f 10.0.0.10:${lava_user}@${gateway}" - - #LAVA targets need to boot - do an early check that the route to the gateway is private, so that we can fail fast - if ! check_private_route "${gateway}"; then - echo "Failed to confirm that route to target is private, conservatively aborting" 1>&2 - exit 1 - fi esac fi lava_target="${ip}" @@ -269,10 +263,6 @@ if test $? -ne 0; then echo "Unable to get tmpdir on target" 1>&2 exit 1 fi -if ! check_private_route "${gateway}"; then - echo "Failed to confirm that route to target is private, conservatively aborting" 1>&2 - exit 1 -fi for thing in "${buildtar}" "${topdir}/scripts/controlledrun.sh" "${confdir}/${device}.services"; do (. "${topdir}"/lib/common.sh; remote_upload -r 3 "${ip}" "${thing}" "${target_dir}/`basename ${thing}`" ${ssh_opts}) if test $? -ne 0; then @@ -399,11 +389,6 @@ if test ${error} -ne 0; then error=1 fi
-#Several days might have passed, re-check the route -if ! check_private_route "${gateway}"; then - echo "Failed to confirm that route to target is private, conservatively aborting" 1>&2 - exit 1 -fi for log in ../stdout ../stderr linarobenchlog ${benchlog}; do mkdir -p "${logdir}/${benchmark}.git/`dirname ${log}`" (. "${topdir}"/lib/common.sh; remote_download -r 3 "${ip}" "${target_dir}/${benchmark}.git/${log}" "${logdir}/${benchmark}.git/${log}" ${ssh_opts})
-----------------------------------------------------------------------
Summary of changes: scripts/benchmark.sh | 7 ------- scripts/benchutil.sh | 56 ------------------------------------------------- scripts/runbenchmark.sh | 15 ------------- 3 files changed, 78 deletions(-)
hooks/post-receive