In some of the interactive server apps (RStudio, Jupyter, etc.) which use
batch_connect there are several helper functions, such as:
Can someone tell me where these are defined and loaded from?
I’ve tried searching the code, but cannot find any reference to them, other than their invocations in the template scripts. This page in the docs references a couple of these functions, but doesn’t say where they’re defined.
You can can also find all these functions in the
job_script_content.sh script in a given jobs’ output directory. That’s where they are during runtime.
They’re come from deep in our Ruby libraries. Here’s what there is for the basic batch connect template and here’s additions for vnc templates just for reference.
Those three functions are all bash scripts defined in the ondemand runtime bits in /opt/ood/…, you can find the templates via
egrep -lr ‘(create_passwd|find_port|wait_until_port_used) ()’ /opt/ood
if you’ve installed ood in the default location. On my system, this comes out to
Do NOT modify that file, It is RPM controlled, and will be replaced in the next update.