Skip to content
Snippets Groups Projects
Commit 7ceade21 authored by Simon Michnowicz's avatar Simon Michnowicz
Browse files

templates the external address to ping

parent 8bc5be0b
No related branches found
No related tags found
1 merge request!202check to see if NAT is working by pinging hpc-lic0
#!/bin/bash
#checks that NAT is working by pinging an external address from a compute node
function check_nat() {
#echo ">>> Checking NAT on Compute Nodes Works >>>>>>>>>>>>>>>>>>>>>>>>>"
#test NAT by pinging an external IP ADDRESS
PING_EXTERNAL="ping -c 2 {{ EXTERNAL_IP_ADDRESS }}"
$PING_EXTERNAL
RESULT=$?
if [ $RESULT -ne 0 ]; then
die 1 " $FUNCNAME ERROR on node. Can not ping external address. Command is ' ${PING_EXTERNAL} ' Please check NAT is working, or route on node is valid"
return 1
fi
return 0
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment