Global email setting

feature-request

#1

Trying to setup email on start/terminate for jobs. Seems that emails are sent by default to user@ondemand.host. I saw a post suggesting the following per app setting in submit.yml.erb:

script:
  email: <%= ENV["USER"] %>@my.domain

Is there a way to set this globally rather than in each app?


#2

To verify, the goal is to set the email argument for each user, for each interactive app, in a single place.

What resource manager are you using?

Out of the box we don’t support this, but we have discussed adding support for this type of thing, as we would find it very useful as well. These are some related issues we have currently opened up:

I’ll add a reference to this from the first issue mentioned.

There may be some work around’s that might be sufficient for you. For example, in a custom Rails initializer you could add some code that sets default value, using monkey patching. But this is not necessarily reliable to work between versions of OnDemand.


#3

I’d like the ability to set a global email domain that applies to any user when the ‘email_on_started’ is indicated in an app. Currently it assigns the OnDemand host as email domain by default. The only issue I can see is if you support federated login with multiple domains.

I am using Torque.

Thanks for the issues links and suggestions.


#4

In the cluster config, you can add this section:

  batch_connect:
    basic:
      header: "#SBATCH --mail-user=$USER@my.domain"
    vnc:
      header: "#SBATCH --mail-user=$USER@my.domain"

That would add this line above all the scripts submitted when submitting interactive apps. However, my guess is that Slurm will not interpolate the string “$USER”. If we made the cluster configs render-able via erb when the user’s dashboard process loads it, then this could be an option. I’ll update the issue with this insight.