Skip to content

Commit

Permalink
handle find_port error codes (#812)
Browse files Browse the repository at this point in the history
if `find_port` fails to find a free port, we give up and cleanup.
Updating vnc/vnc_container accordingly.
  • Loading branch information
utkarshayachit committed Jul 31, 2023
1 parent cd3faaf commit e003521
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/ood_core/batch_connect/templates/vnc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ def after_script
# Launch websockify websocket server
echo "Starting websocket server..."
websocket=$(find_port)
[ $? -eq 0 ] || clean_up 1 # give up if port not found
#{websockify_cmd} -D ${websocket} localhost:${port}
# Set up background process that scans the log file for successful
Expand Down
1 change: 1 addition & 0 deletions lib/ood_core/batch_connect/templates/vnc_container.rb
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ def after_script
module load #{container_module}
echo "Starting websocket server..."
websocket=$(find_port)
[ $? -eq 0 ] || clean_up 1 # give up if port not found
#{container_command} exec instance://#{@instance_name} #{websockify_cmd} -D ${websocket} localhost:${port}
# Set up background process that scans the log file for successful
Expand Down

0 comments on commit e003521

Please sign in to comment.