Skip to content

Commit

Permalink
Add a logic in rotation script, if check_login_nodes_stopped.sh doesn…
Browse files Browse the repository at this point in the history
…'t exist, jump the check
  • Loading branch information
hehe7318 committed Oct 5, 2023
1 parent 2da4232 commit d058718
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@ SHARED_DIRECTORY_COMPUTE="<%= @shared_directory_compute %>"
SHARED_DIRECTORY_LOGIN="<%= @shared_directory_login %>"
CHECK_LOGIN_NODES_SCRIPT_PATH="<%= node['cluster']['scripts_dir'] %>/slurm/check_login_nodes_stopped.sh"

# Check if login nodes are running
if ! $CHECK_LOGIN_NODES_SCRIPT_PATH; then
exit 1
# Check if the script exists
if [ -f "$CHECK_LOGIN_NODES_SCRIPT_PATH" ]; then
# Check if login nodes are running
if ! $CHECK_LOGIN_NODES_SCRIPT_PATH; then
exit 1
fi
fi

# Check compute fleet status
Expand Down

0 comments on commit d058718

Please sign in to comment.