Commit 84e4d4c5 authored by Larkin Heintzman's avatar Larkin Heintzman

fixed ping deployment conflict

parents dbac465d 3b84ecc2
#!/bin/bash
endpoints="192.168.111.200"
filename="/home/llh/pingStats/pingStats.json"
downtime=1
gpstopic="/rossettiModem/dji_sdk/gps_position"
filename="/home/larkin/pingStats/pingStats.json"
downtime=5
gpstopic="/marioModem/dji_sdk/gps_position"
echo "pinging: $endpoints"
echo "save to: $filename"
......@@ -22,7 +22,7 @@ echo ping "${endpoints} every ${downtime:=1} sec, saving to ${filename}"
# done
while true; do
rawData=$(ping -c 3 -q -w 3 ${endpoints:=localhost})
rawData=$(ping -c 5 -q -w 5 ${endpoints:=localhost})
newPacketData=$(echo "$rawData" | grep -oP '\d+(?=% packet loss)')
newLatencyData=$(echo "$rawData" | tail -n 1)
......@@ -42,20 +42,6 @@ while true; do
num4="0"
fi
# debugging help
# echo "------------------"
# echo $num1
# echo $num2
# echo $num3
# echo $num4
# echo "------------------"
# echo "$rawData"
# echo "------------------"
# echo "$newPacketData"
# echo "------------------"
# echo "$newLatencyData"
# exit
if test -f "$filename"; then
false
else
......
#!/bin/bash
docker run --env endpoints=192.168.111.200 --env filename=/tmp/pingStats/pingStatsDocker.json --env gpstopic=/rossettiModem/dji_sdk/gps_position --env downtime=1 --env ROS_IP=192.168.111.202 --env ROS_MASTER_URI=http://192.168.111.200:11311 -v /home/larkin/pingStats:/tmp/pingStats/ doorbell:latest /ping.sh
docker run --env endpoints=192.168.111.200 --env filename=/tmp/pingStats/pingStatsDocker.json --env gpstopic=/marioModem/dji_sdk/gps_position --env downtime=5 --env ROS_IP=192.168.111.202 --env ROS_MASTER_URI=http://192.168.111.200:11311 -v /home/larkin/pingStats:/tmp/pingStats/ localhost:5000/doorbell:latest /ping.sh
......@@ -26,7 +26,7 @@ echo ping "${endpoints} every ${downtime:=1} sec, saving to ${filename}"
# done
while true; do
rawData=$(ping -c 3 -q -w 3 ${endpoints:=localhost})
rawData=$(ping -c 5 -q -w 5 ${endpoints:=localhost})
newPacketData=$(echo "$rawData" | grep -oP '\d+(?=% packet loss)')
newLatencyData=$(echo "$rawData" | tail -n 1)
......@@ -46,20 +46,6 @@ while true; do
num4="0"
fi
# debugging help
# echo "------------------"
# echo $num1
# echo $num2
# echo $num3
# echo $num4
# echo "------------------"
# echo "$rawData"
# echo "------------------"
# echo "$newPacketData"
# echo "------------------"
# echo "$newLatencyData"
# exit
if test -f "$filename"; then
false
else
......
......@@ -26,7 +26,7 @@ spec:
effect: "NoSchedule"
operator: "Exists"
- key: "node.kubernetes.io/disk-pressure"
effect: "PreferNoSchedule"
effect: "NoSchedule"
operator: "Exists"
volumes:
- name: ping-storage
......@@ -40,20 +40,17 @@ spec:
volumeMounts:
- name: ping-storage
mountPath: /tmp/pingStats
image: localhost:5000/doorbell:latest
image: doorbell
imagePullPolicy: IfNotPresent
command: ["/bin/bash"]
args: ["-c", "/ping.sh"]
env:
- name: endpoints
# value: "192.168.1.5"
value: "192.168.111.200"
- name: interface
value: "eth0" # not strictly necessary
- name: filename
value: "/tmp/pingStats/pingStatsKubernetes.json"
- name: downtime # time to wait between pings
value: "3"
value: "5"
- name: gpstopic
value: "/marioModem/dji_sdk/gps_position"
- name: ROS_IP
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment