Hi there,
I’m not sure whether it’s the fact that I don’t really know Ruby, or whether the documentation is a little thin on this part if you’re starting fresh (or both), but I’m having trouble understanding well how forms/submit files work.
- I basically understand, from the note at the bottom of this page:
https://osc.github.io/ood-documentation/latest/app-development/interactive/submit.html
…that if you’re using one of the predefined attributes, you don’t have to muck around with “script:” in the submit.yml.erb
, and that that list is here:
But it says that listed here are the most common attributes. Is that all of them, or is there a longer list someplace?
On this page:
https://osc.github.io/ood-documentation/latest/enable-desktops/custom-job-submission.html
…there’s a mention that you should avoid native:
where possible, and use these instead of resorting to that, if possible:
http://www.rubydoc.info/gems/ood_core/OodCore/Job/Script
I’ve managed to figure out that, for example, if I want to add a “Reservation” field for an app, I should do:
form:
- reservation_id
…and then in submit.yml.erb
, do:
script:
reservation_id: "<%= reservation_id %>"
But is that correct? It just seems a little redundant.
- Additionally, I’d like to able to have a freeform text field that would allow a user to specify other Slurm options without having to set up attributes for every one of them (most of which wouldn’t be used that often). However, I’d like it to be possible to leave that blank, as I imagine it would be most of the time. So I did something like this in
form.yml
:
form:
- extra_slurm_options
…and in submit.yml.erb
:
script:
native:
- "<%- unless extra_slurm_options.empty? -%><%= extra_slurm_options %><%- end -%>"
…but when I hit the launch button, I get:
Failed to submit session with the following error:
sbatch: error: Unable to open file
From looking in the /var/log/ondemand-nginx/$USER/error.log
, I can see that it is resulting in this batch line:
App 2517 output: [2021-12-07 22:12:01 -0500 ] INFO "execve = [{\"SLURM_CONF\"=>\"/etc/slurm/slurm.conf\"}, \"/usr/bin/sbatch\", \"-D\", \"/home/novosirj/ondemand/data/sys/dashboard/batch_connect/sys/bc_desktop/amarel/output/45b81c12-8e8e-4690-acf2-30a8efee90c3\", \"-J\", \"sys/dashboard/sys/bc_desktop/amarel\", \"-o\", \"/home/novosirj/ondemand/data/sys/dashboard/batch_connect/sys/bc_desktop/amarel/output/45b81c12-8e8e-4690-acf2-30a8efee90c3/output.log\", \"--reservation\", \"OOD_test\", \"-p\", \"main\", \"-t\", \"01:00:00\", \"--export\", \"NONE\", \"-c\", \"1\", \"--mem=1G\", \"\", \"--parsable\", \"-M\", \"amarel\"]"
Which it apparently does not like. Is there some other form of check for emptiness I need to be doing there, or specifying something different when the value is empty?
Also, if I want someone to be able to specify a few options, would I need multiple blanks, or is there a better way to do this? I guess I envisioned being able to add whichever additional options as they would on an sbatch
command line. This is functionality on our existing setup, but we’re completely redoing that as the person who built it mucked around with a lot of the app files in /var
vs. configuring them via /etc
, and their method of doing this had multiple blanks but didn’t allow you to leave any of them blank (suggesting that you repeat options if you only needed one of them).
- This is pretty neat stuff, being able to specify a cluster as a wildcard (BTW, this page seems to be somewhat out of date as it specifies you’ll need an app for each cluster when you don’t anymore necessarily: 2. Add a Cluster — Open OnDemand 3.0.3 documentation), which is documented here:
…which will generate a select widget. There’s also information about how to rename the options. I’m assuming when one specifies cluster: "*"
that what it’s pulling from is /etc/ood/config/clusters.d/*.yml
. Is there a simple way to get it, instead of having to define vanity names here manually, to use the title:
field under metadata:
from the applicable cluster definition?
- I assume contributions to the documentation are welcomed/encouraged? What’s the best way to do that, just edits via GitHub? There are some parts of this where it seems like the information that you’d need to create a given workflow are in a few different places, and there are some references to preferring to do one thing over another but no example of how to do that thing (related to some of the questions above).