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

fixed ping deployment conflict

parents dbac465d 3b84ecc2
#!/bin/bash #!/bin/bash
endpoints="192.168.111.200" endpoints="192.168.111.200"
filename="/home/llh/pingStats/pingStats.json" filename="/home/larkin/pingStats/pingStats.json"
downtime=1 downtime=5
gpstopic="/rossettiModem/dji_sdk/gps_position" gpstopic="/marioModem/dji_sdk/gps_position"
echo "pinging: $endpoints" echo "pinging: $endpoints"
echo "save to: $filename" echo "save to: $filename"
...@@ -22,7 +22,7 @@ echo ping "${endpoints} every ${downtime:=1} sec, saving to ${filename}" ...@@ -22,7 +22,7 @@ echo ping "${endpoints} every ${downtime:=1} sec, saving to ${filename}"
# done # done
while true; do 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)') newPacketData=$(echo "$rawData" | grep -oP '\d+(?=% packet loss)')
newLatencyData=$(echo "$rawData" | tail -n 1) newLatencyData=$(echo "$rawData" | tail -n 1)
...@@ -42,20 +42,6 @@ while true; do ...@@ -42,20 +42,6 @@ while true; do
num4="0" num4="0"
fi 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 if test -f "$filename"; then
false false
else else
......
#!/bin/bash #!/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}" ...@@ -26,7 +26,7 @@ echo ping "${endpoints} every ${downtime:=1} sec, saving to ${filename}"
# done # done
while true; do 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)') newPacketData=$(echo "$rawData" | grep -oP '\d+(?=% packet loss)')
newLatencyData=$(echo "$rawData" | tail -n 1) newLatencyData=$(echo "$rawData" | tail -n 1)
...@@ -46,20 +46,6 @@ while true; do ...@@ -46,20 +46,6 @@ while true; do
num4="0" num4="0"
fi 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 if test -f "$filename"; then
false false
else else
......
...@@ -26,7 +26,7 @@ spec: ...@@ -26,7 +26,7 @@ spec:
effect: "NoSchedule" effect: "NoSchedule"
operator: "Exists" operator: "Exists"
- key: "node.kubernetes.io/disk-pressure" - key: "node.kubernetes.io/disk-pressure"
effect: "PreferNoSchedule" effect: "NoSchedule"
operator: "Exists" operator: "Exists"
volumes: volumes:
- name: ping-storage - name: ping-storage
...@@ -40,20 +40,17 @@ spec: ...@@ -40,20 +40,17 @@ spec:
volumeMounts: volumeMounts:
- name: ping-storage - name: ping-storage
mountPath: /tmp/pingStats mountPath: /tmp/pingStats
image: localhost:5000/doorbell:latest image: doorbell
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
command: ["/bin/bash"] command: ["/bin/bash"]
args: ["-c", "/ping.sh"] args: ["-c", "/ping.sh"]
env: env:
- name: endpoints - name: endpoints
# value: "192.168.1.5"
value: "192.168.111.200" value: "192.168.111.200"
- name: interface
value: "eth0" # not strictly necessary
- name: filename - name: filename
value: "/tmp/pingStats/pingStatsKubernetes.json" value: "/tmp/pingStats/pingStatsKubernetes.json"
- name: downtime # time to wait between pings - name: downtime # time to wait between pings
value: "3" value: "5"
- name: gpstopic - name: gpstopic
value: "/marioModem/dji_sdk/gps_position" value: "/marioModem/dji_sdk/gps_position"
- name: ROS_IP - 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