-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Agent connection to mpi regardless of NGINX Instance …
…status (#916) * chore: allow commander service to connect irrespective of nginx availability * chore: unit test * chore: integration test * chore: refactored * chore: remove extra code * chore: updated build target * chore: updating variables * chore: separated nginx less test from official agent testing
- Loading branch information
Showing
6 changed files
with
256 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
|
||
set -euxo pipefail | ||
|
||
handle_term() | ||
{ | ||
echo "received TERM signal" | ||
echo "stopping nginx-agent ..." | ||
kill -TERM "${agent_pid}" 2>/dev/null | ||
} | ||
|
||
trap 'handle_term' TERM | ||
|
||
cat /etc/nginx-agent/nginx-agent.conf; | ||
|
||
# start nginx-agent, pass args | ||
echo "starting nginx-agent ..." | ||
nginx-agent "$@" & | ||
|
||
agent_pid=$! | ||
|
||
if [ $? != 0 ]; then | ||
echo "couldn't start the agent, please check the log file" | ||
exit 1 | ||
fi | ||
|
||
wait_term() | ||
{ | ||
wait ${agent_pid} | ||
} | ||
|
||
wait_term | ||
|
||
echo "nginx-agent process has stopped, exiting." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.