Package update overwrites Desktop app config

A yum update of the ondemand package overwrote app files bc_desktop/template/script.sh.erb and bc_desktop/form.yml which contain necessary customization for the local environment. Is this expected behavior? Is there a way to retain customization short of excluding the package from being updated (or restoring manually after update)?

(System: RHEL 7.7, package ondemand-1.6.22-1.el7.x86_64, repo @ondemand-web)

You should be dropping new form.yml files in the configuration directory /etc/ood/config/apps/bc_desktop/, the rpm won’t touch that. I think what’s provided in the distribution is just a default. You can see our configs where we just drop this folder directly as-is in /etc/ood/confg.

To the script.sh.erb, I’d ask what you updated to see if there’s some other way to achieve your goal through configuration or similar.

If there isn’t, you can override the script_file attribute though that may not be straight forward as you’d need it to be on the compute nodes and not in ERB, so not a template.

Thanks, that works for form.yml files. For script.sh.erb we have added a line:

export XDG_RUNTIME_DIR=$HOME/ondemand/.xdg

Very good!

Yep! You want to do something like this in your cluster definiton file (in clusters.d). Adding it here will make sure that any VNC type job will start with this export (which is what I’d imagine you’d need).

v2:
  # other stuff removed for brevity
  batch_connect:
    vnc:
      script_wrapper: |
        export XDG_RUNTIME_DIR=$HOME/ondemand/.xdg
        %s

Great, that seems to be working, thanks!

This would suggest that if (eg) we wanted to only have a single panel in the xfce desktop, we would drop an appropriately configured template/config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml into /etc/ood/config/apps/bc_desktop?

That doesn’t seem to have worked just now when I tried on OOD 1.8.12

What have I done wrong? The file I’m using is taken as an example from the desktop apps Ansys or Matlab

We only look for a few things in /etc/ood/config to configure apps. The only valid things you can drop there are new formyml, submit.yml (or their .erb counterparts) and form.js. Everything else, as you’ve found, will be ignored.

I think the solution you want is to get rid of the bc_desktop app altogether by changing the permissions on it after install and deploy a new desktop app to your liking.

Hi, Jeff,

What would be the consequences of simply removing /var/www/ood/apps/sys/bc_desktop?

You’d get rid of that app. We do ship it as a core app, but it’s really a convenience app so folks get desktops ‘out of the box’. If you remove it, it’s fairly limited in impact. It’d have the same impact as removing your Jupyter or Matlab installation - which is to say limited to that app. (though there is the management/administrative impact because it will get re-installed when you upgrade so you’d want to invest in some automation to reset the installation to the state you want)

But I would say that changing the permissions is safer because you can roll it back in case you change your mind - and it’ll have the same effect, nobody will be able to read it, so your users will never see it. If you remove the directory, you’d probably have to re-install or manually get it back.

@datakid wanted XFCE with just one panel; what are you looking for that the desktop app doesn’t have?

Thanks for the answer. I was mostly just curious whether there was some internal logic that would break elsewhere.

We are replacing (or modifying) the remote desktop offerings so there are three of them. One is for people who only need one physical node; that enables us to put in checks for the maximum memory and cores. One is for MPI with symmetric placement and one processor per task. One enable the user to select the number of tasks per node and the number of CPUs per task for MPI/OpenMP hybrid jobs and does mem-per-cpu. This is in a Slurm context.

We are thinking that corresponds roughly also to level of user expertise, so we’re putting more help text on the first two forms. Some of our local support staff are pushing new users to OOD, and we’re trying to use the forms and the dashboard MOTD to get people to the right help and documentation.

Not sure if that is ‘right’, but we are going to give it a try.

This is exactly what configurations in /etc/ood/confg should provide for you. We have similar offerings where folks can get an entire compute node or a smaller shared 1 core allocation. And it’s all in our config repo linked in this topic without modification to the bc_desktop app.

As to messaging; yea that’s about right. You can also see on our repo our messaging that links the larger allocations to the smaller and vice versa.

Nothing, tbh. By that stage I think I was trying things out to see if I could get them to work :slight_smile:

1 Like

In v1.8, customizing the bc_desktop app by using a file /etc/ood/config/apps/bc_desktop/form.yml to override values from /var/www/ood/apps/sys/bc_desktop/form.yml no longer works. If a file /etc/ood/config/apps/bc_desktop/form.yml is present, it is treated as an additional desktop app and a new item called “Desktop: Form” appears under Interactive Apps -> Desktops. From https://osc.github.io/ood-documentation/master/enable-desktops/modify-form-attributes.html I think the correct way to customize the bc_desktop app may now be to put the values that were under attributes in /etc/ood/config/apps/bc_desktop/form.yml instead under attributes in cluster yml file in /etc/ood/config/apps/bc_desktop - is this correct?