OSC / ood-documentation

Documentation for Open OnDemand generated using Sphinx
https://osc.github.io/ood-documentation/latest/
MIT License
10 stars 52 forks source link

find_port $1 as host and not minimum port #944

Closed genericdata closed 7 months ago

genericdata commented 7 months ago

The instructions I see for find_port in documentation and in example interactive apps' template/before.sh.erb is

#   - find_port
#       Find available port in range [$1..$2]
#       Default: 2000 65535

But in the code, it's $2 and $3 are the minimum and maximum ports. https://github.com/OSC/ood_core/blob/41fec505f6f4616f2eed1510b78436501c0d927c/lib/ood_core/batch_connect/template.rb#L164-L172

Discovered when atttempting to set as the following only gave the sessions port 40000 or $2.

port=$(find_port 40000 50000 )

It looks to be working now when I set the line as

port=$(find_port $host 40000 50000 )
johrstrom commented 7 months ago

Hi, thanks for the issue. I've transfered it to the documentation repo as really it's an issue with documentation moreso than the code itself.

Thanks again!