stackhpc / ansible-slurm-appliance

A Slurm-based HPC workload management environment, driven by Ansible.
50 stars 23 forks source link

OOD proxying assumes only single login node #212

Open sjpb opened 2 years ago

sjpb commented 2 years ago

OOD defaults are potentially broken for >1 login node.

  1. Everything layout defines openondemand as all login, so could have multiple openondemand nodes

    environments/common/layouts/everything:
    [openondemand:children]
    # Host to run Open Ondemand server on - subset of login
    login
  2. Clearly grafana can only proxy a single OOD node, so this proxy config assumes openondemand_servername is the same on all hosts:

    environments/common/inventory/group_vars/all/grafana.yml:grafana_url_openondemand_proxy: "https://{{ openondemand_servername | default('') }}/node/{{ groups['grafana'].0 }}/{{ grafana_port }}"
  3. The arcus definition is actually ok for this:

    environments/arcus/inventory/group_vars/all/openondemand.yml:openondemand_servername: "{{ hostvars[ groups['openondemand'] | first].ansible_host }}" # Use a SOCKS proxy to acccess

but this will be really easy to mess up

sjpb commented 2 years ago

Tried to fix this but you can't do:

grafana_url: "https://{{ hostvars[groups['openondemand'].0]['openondemand_servername'] }}..."

when openondemand_servername is also accessing hostvars - the "outer" use of it does not get a templated variables. Which kind-of makes sense.