Is there a way I can pull the current user’s email address to automatically populate a field in the form.yml and submit.yml files for an interactive vnc submit?
Ultimately, I would like to add the option to my form which will enable slurm to email the user when the current session is at 50,80,90, and 100% time limit. You have implemented a similar option with the “bc_email_on_started” option, and I would like to just pull the user’s email to add it into the submit.yml automatically based on the current user.
I’m not entirely sure to be honest. There is a previous thread around some questions about how the emailing works, with a suggestion of how to set headers with this information in the cluster config here:
Which is a bit older and was linked form another conversation around getting emails for jobs here:
In short, I’m not sure of a way to pull this to populate the form and submit unless you can glean something from those posts.
The /uufs/chpc.utah.edu/sys/bin/CHPCEmailLookup.sh is a script that matches the Linux user name with the e-mail address in our database. That is more robust than the previous setting we had:
email: <%= ENV[“USER”] %>@utah.edu
because some users use other e-mail addresses than our domain.
You could do the same thing in the form.yml.erb to display the e-mail address in the submission form.