Changes to file structure after update to 1.7

We updated to 1.7.10-2 in our development setup and found that files we had previously modified are no longer there. We use QOS and needed to add that into some of the ruby files for the slurm adapter. We previously edited:




Sorry for the dumb question just not able to find anything like these on the system.


The gems have been moved to a central shared location:


Though every time a new ondemand version installs, the new gemset will be included. For example at OSC since we have installed every patch version of 1.7 while doing development, we have these older directories:

/opt/ood/ondemand/root/usr/share/gems/2.5/ondemand/1.7.1, /opt/ood/ondemand/root/usr/share/gems/2.5/ondemand/1.7.2, /opt/ood/ondemand/root/usr/share/gems/2.5/ondemand/1.7.3, /opt/ood/ondemand/root/usr/share/gems/2.5/ondemand/1.7.4…

So if you modify it directly it will likely be unused in the next installed release.

Could you share the modifications you made? We may be able to suggest an alternative location for those modifications, or even patch OnDemand so modifications are no longer required.

Great! Thanks. Every time we do an update I have to update these files. Been meaning to put it in github to share but just haven’t gotten around to it. Here’s what we do (line numbers are approximate as they can change with each upgrade):

Everywhere queue showed up, we copy and paste the config and modify it to be qos:
Approximately line 77 add:

# The qos selected for job
# @return [String, nil] qos
attr_reader :qos

Approximately line 127 add:
# @param qos [#to_s, nil] qos name

Approximately line 134 in "def initialize" after queue_name add:
qos: nil,

Approximately line 158 add:
@qos              = qos             && qos.to_s

Approximately line 187 add:
qos:                 qos,

Approximately line 358, Add to # Set sbatch options:

args += ["--qos", script.qos] unless script.qos.nil?

Hi @efranz,

Have you had a chance to look to see if there is a better place or better way to add the slurm qos value/option?


After reviewing the code you add in more detail and the implementation of the Slurm adapter, I realize there isn’t a clean monkey patch you could add under /etc.

Adding qos to the adapter is a good idea though so I just opened

1 Like

Just in case someone else finds this later, qos was added for Slurm and Torque in 1.8 through the Issue/pull request in the message above. so there’s no need to add additional code for this moving forward.

To use it, simply add it to the script element in your submit.yml (or submit.yml.erb).

  qos: "very_best"