So I had OOD v3.0.1, installed on RockyLinux 8 via the ansible role.
After building a new image which included dnf update before the OOD install, the remote desktop started failing with
/var/spool/slurm/job00002/slurm_script: line 3: module: command not found
Setting VNC password...
Error: no HOME environment variable
The relevant bits (I think!) of the config are shown below - from that it’s clear for some reason the lmod module
function isn’t available any more inside the vnc script (which has worked fine for maybe a couple of years).
I could “fix” this by adding
- <%= "--export=ALL" %>
to the “native” config for the desktop script but a) in the remote desktop, when opening a terminal it just closed again immediately [no idea how to debug that!] and b) given exporting all the user’s environment is the default, that should do nothing…
Same behavior on v3.0.3.
I also tried adding #!/usr/bin/env bash
to the top of the vnc.script_wrapper
, that didn’t help.
To be honest the config is a bit cobbled-together from things I found, but I have looked at the current desktop example for v3 and it looks similar.
Clearly there’s something going wrong with shell/environment vars but I am at a lost. Any suggestions appreciated.
Config:
openondemand_clusters:
slurm:
v2:
...
batch_connect:
basic:
script_wrapper: |
module purge
export PATH=/opt/jupyter-py39/bin/:$PATH
%s
set_host: host=$(hostname -s)
vnc:
script_wrapper: |
module purge
export PATH=/opt/TurboVNC/bin:$PATH
# Workaround to avoid "Unable to contact settings server" when
# lauching xfce4-session
xfce4-session() { /bin/dbus-launch /bin/xfce4-session $@ ; }
export -f xfce4-session
%s
set_host: host=$(hostname -s)
and
openondemand_apps_desktop_default:
title: Remote Desktop
description: Request a desktop to run GUI applications.
cluster: slurm
form:
- desktop
- bc_queue
- bc_num_hours
- num_cores
- node
attributes:
desktop: xfce
# bc_account: # i.e. slurm account
# value: root
bc_queue:
value: "{{ openondemand_desktop_partition | default(none) }}"
num_cores:
label: Number of cores
value: 1
node:
label: Node name
help: Select a particular node or leave empty to let Slurm pick the next available
value: ""
submit: |
---
script:
job_name: "ood-desktop"
native:
- <%= "--nodes=1" %>
- <%= "--ntasks=#{num_cores}" %>
- <%= "--nodelist=#{node}" %>