A few questions on the multi-cluster support and Linux host adapter in 1.8

Hi everyone,

I have a few more questions/feedback on the multi-cluster support. I hope to shut up after this.

  1. Can we set default cluster to show in the app web form? Or honor the cluster
    order set in form.yml? At present I have an order that I’d prefer in the form.yml, but OOD seems to re-order, non-alphabetically, in the pull down menu of the app launch page - which makes me wonder how does OOD figure out that order.

  2. Does the multi-cluster option also work for the Interactive Desktops?

  3. How do I set cluster related conditions in the form.yml.erb? I tried below, but it’s not working (ERB syntax is still confusing to me - if there’s a good concise tutorial somewhere online I’d love to see it):
    <% if cluster == “notchpeak” %>
    Message for notchpeak
    <% else %>
    Message for other clusters
    <% end %>

  4. WRT the linux host adapter

  • was the round-robin requirement in 1.7 removed in 1.8?
  • Is it possible to set up other apps than desktop for the Linux host offload - e.g. X apps like VMD, Paraview, can’t run on our compute nodes because they don’t run X, but they could run on our Linux hosts (“frisco” nodes) as they do run X.

Thanks,
MC

  1. Yea, the ordering is strange when using cluster. If you want to specify the order create a cluster item like you would any other (i.e, create an entry in form and make it a select widget in attributes. Here’s an example of how we do it in jupyter.
  2. Yep! Here’s our combined virtual desktop.
  3. You’ll probably need to do that in javascript. The yml.erb is only rendered once, whereas the behavior you want is when a user changes the cluster option you want the help text to also change. I’ll need a minute to come up with some js to do this because it’s not super simple.
  4. (a) No, we just added some error handling logic but overall behavior should be the same. (b) Sure, there’s nothing about it that specific to desktops.

Thanks Jeff,

great, we’re getting there :wink:

wrt. #1, I did not try the widget before, and that does what we want, so, that’s good.

I’ll try #2, did not get to it yet - it’s a bit convoluted with is having the bc_desktop in /etc/ood/config/apps/bc_desktop/ and in /var/www/ood/apps/sys/bc_desktop and I need to sort out what is what.

wrt #4, it does works, but, I need help with some ERB, I figure it’ll take you 5 seconds while I’ve been googling and trying for a while with no sucess.

I need to filter out some SLURM specific pieces from the submit.yml.erb, the following works fine:
<%- if cluster != “frisco1” -%>
native:
… cluster specific stuff
<%- end -%>

but, I want to not only filter out frisco1, but frisco1 to frisco8. I tired things with regex, like
<%- if cluster != /^.frisco.$/ -%>
but that does not seem to work.

Thanks,
MC

When I get stuck I hop into irb. I think match is an API you can use. If you don’t find a match, it’ll return nil.

irb(main):008:0> /^frisco\d$/.match("frisco4") == nil
=> false
irb(main):009:0> /^frisco\d$/.match("my_other_cluster") == nil
=> true

or just ‘frisco’ if don’t need the complexity of that regex.

irb(main):002:0> /frisco/.match("frisco3") == nil
=> false
irb(main):003:0> /frisco/.match("my_other_cluster") == nil
=> true

That did it, thanks! This is a workaround for the Linux Host Adapter to get to our 8 interactive only nodes, so, now we have in the form.yml:

attributes:
  cluster:
    widget: "select"
    options:
      - "notchpeak"
      - "kingspeak"
      - "lonepeak"
      - "ash"
      - "tangent"
      - "frisco1"
      - "frisco2"
      - "frisco3"
      - "frisco4"
      - "frisco5"
      - "frisco6"
      - "frisco7"
      - "frisco8"
form:
  - cluster

and in submit.yml.erb:

script:
  native:
  <%- if /frisco/.match(cluster) == nil -%>
    - "-N"
    - "1"
    - "-n"
    - "<%= num_cores %>"
    <%- if gpu_type != "none" -%>
    - "--gres=gpu:<%= gpu_type %>"
    <%- end -%>
    <%- if memtask != "default" -%>
    - "--mem"
    - "<%= memtask %>"
    <%- end -%>
  <%- end -%>