Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HPCasCode
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hpc-team
HPCasCode
Commits
d574c60f
Commit
d574c60f
authored
6 years ago
by
Simon Michnowicz
Browse files
Options
Downloads
Patches
Plain Diff
templates the external address to ping
Former-commit-id:
7ceade21
parent
1ffb1780
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
roles/nhc/templates/check_nat.nhc.j2
+21
-0
21 additions, 0 deletions
roles/nhc/templates/check_nat.nhc.j2
with
21 additions
and
0 deletions
roles/nhc/templates/check_nat.nhc.j2
0 → 100644
+
21
−
0
View file @
d574c60f
#!/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
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment