Skip to content

Commit

Permalink
Fixes for CI testing (#328)
Browse files Browse the repository at this point in the history
  • Loading branch information
grafnu authored Jul 10, 2021
1 parent 29e977f commit 6119be0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
8 changes: 6 additions & 2 deletions bin/run_controller
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ if [ "$1" == "no-test" ]; then
fi

if [ "$1" == "vxlan" ]; then
# Argument is target server for vxlan gRPC
# Argument is target server for vxlan gRPC, or localhost for docker container
vxlan=$2
shift 2
fi
Expand Down Expand Up @@ -120,7 +120,11 @@ docker_envs="--env RUN_MODE=$run_mode"

if [[ -n $vxlan ]]; then
# Extract the local src IP address that can be used as return address.
local_ip=$(ip route get $vxlan | sed -nr 's~.*src ([0-9.]+) .*~\1~p')
if [ $vxlan == localhost ]; then
local_ip=$(ip addr show docker0 | sed -nr 's~.*inet ([0-9.]+)/.*~\1~p')
else
local_ip=$(ip route get $vxlan | sed -nr 's~.*src ([0-9.]+) .*~\1~p')
fi
echo Using $local_ip/$vxlan as vxlan endpoints.
docker_envs+=" --env VXLAN_IP=$local_ip --env DTS_IP=$vxlan"
fi
Expand Down
4 changes: 3 additions & 1 deletion bin/setup_stack
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@ if [[ -n $dts ]]; then
if [[ $dts == localhost ]]; then
docker rm -f forch-dts || true
echo Running local DTS container...
DTS_CID=$(docker run -d --privileged --name forch-dts -v $ROOT/inst/forch-dts:/root/inst forch/dts)
VOLUMES="-v $ROOT/inst/forch-dts:/root/inst"
VOLUMES+=" -v $ROOT/daq/dts:/daq-config/"
DTS_CID=$(docker run -d --privileged --name forch-dts $VOLUMES forch/dts)
DTS_IP=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $DTS_CID)
vxlan="vxlan $DTS_IP"
sudo cp -a controller/site_config inst/forch-dts/
Expand Down
2 changes: 1 addition & 1 deletion etc/DAQ_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.10.22
1.10.23

0 comments on commit 6119be0

Please sign in to comment.