# Changes to file structure after update to 1.7

**URL:** <https://discourse.openondemand.org/t/changes-to-file-structure-after-update-to-1-7/874>\
**Category:** Get Help\
**Created:** [April 28, 2020, 2:28pm UTC](https://discourse.openondemand.org/t/changes-to-file-structure-after-update-to-1-7/874 "2020-04-28T14:28:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dsajdak](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/dsajdak/32/44_2.png) [@dsajdak](https://discourse.openondemand.org/u/dsajdak)\
**Post date:** [April 28, 2020, 2:28pm UTC](https://discourse.openondemand.org/t/changes-to-file-structure-after-update-to-1-7/874/1 "2020-04-28T14:28:50Z")

</div>

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:

```auto
/var/www/ood/apps/sys/dashboard/vendor/bundle/ruby/2.4.0/gems/ood_core-0.9.3/lib/ood_core/job/script.rb

```

and

```auto
/var/www/ood/apps/sys/dashboard/vendor/bundle/ruby/2.4.0/gems/ood_core-0.9.3/lib/ood_core/job/adapters/slurm.rb

```

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

Thanks!  
Dori

---

<div class="post-metadata">

**Author:** ![efranz](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/efranz/32/27_2.png) [@efranz](https://discourse.openondemand.org/u/efranz)\
**Post date:** [April 28, 2020, 2:50pm UTC](https://discourse.openondemand.org/t/changes-to-file-structure-after-update-to-1-7/874/2 "2020-04-28T14:50:23Z")

</div>

The gems have been moved to a central shared location:

/opt/ood/ondemand/root/usr/share/gems/2.5/ondemand/1.7.11/gems

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.

---

<div class="post-metadata">

**Author:** ![dsajdak](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/dsajdak/32/44_2.png) [@dsajdak](https://discourse.openondemand.org/u/dsajdak)\
**Post date:** [April 28, 2020, 3:05pm UTC](https://discourse.openondemand.org/t/changes-to-file-structure-after-update-to-1-7/874/3 "2020-04-28T15:05:26Z")

</div>

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):

```auto
/var/www/ood/apps/sys/dashboard/vendor/bundle/ruby/2.4.0/gems/ood_core-0.9.3/lib/ood_core/job/script.rb
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,

/var/www/ood/apps/sys/dashboard/vendor/bundle/ruby/2.4.0/gems/ood_core-0.9.3/lib/ood_core/job/adapters/slurm.rb
Approximately line 358, Add to # Set sbatch options:

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

```

---

<div class="post-metadata">

**Author:** ![dsajdak](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/dsajdak/32/44_2.png) [@dsajdak](https://discourse.openondemand.org/u/dsajdak)\
**Post date:** [May 19, 2020, 8:38pm UTC](https://discourse.openondemand.org/t/changes-to-file-structure-after-update-to-1-7/874/4 "2020-05-19T20:38:25Z")

</div>

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?

Thanks,  
Dori

---

<div class="post-metadata">

**Author:** ![efranz](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/efranz/32/27_2.png) [@efranz](https://discourse.openondemand.org/u/efranz)\
**Post date:** [May 28, 2020, 1:27am UTC](https://discourse.openondemand.org/t/changes-to-file-structure-after-update-to-1-7/874/6 "2020-05-28T01:27:43Z")

</div>

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 [https://github.com/OSC/ood\_core/issues/195](https://github.com/OSC/ood_core/issues/195).

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [September 23, 2020, 7:47pm UTC](https://discourse.openondemand.org/t/changes-to-file-structure-after-update-to-1-7/874/7 "2020-09-23T19:47:56Z")

</div>

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`).

```auto
script:
  qos: "very_best"

```

---

<div class="post-metadata">

**Author:** ![westburg.2](https://avatars.discourse-cdn.com/v4/letter/w/0ea827/32.png) [@westburg.2](https://discourse.openondemand.org/u/westburg.2)\
**Post date:** [May 26, 2022, 3:43pm UTC](https://discourse.openondemand.org/t/changes-to-file-structure-after-update-to-1-7/874/8 "2022-05-26T15:43:06Z")

</div>


