Hello team,
I’m trying to setup an environment using the “linux_host” adapter but I’m getting the following error.
I’m currently using the Ansible role to deploy OOD with the configurations listed below.
Error
undefined method `to_h' for "linux_host":String
Did you mean? to_d
to_r
to_f
to_i
to_s
to_c
Trying to read the logs from the file system I get an error and no logs are stored.
Error occurred when attempting to access /pun/sys/dashboard/files/fs//cluster/home/bcasano/ondemand/data/sys/dashboard/batch_connect/sys/bc_desktop/tenanta/output/80d68418-2c06-48c3-98b0-457e80d12261
No such file or directory @ rb_file_s_stat - /cluster/home/bcasano/ondemand/data/sys/dashboard/batch_connect/sys/bc_desktop/tenanta/output/80d68418-2c06-48c3-98b0-457e80d12261
nginx logs /var/log/ondemand-nginx/bcasano/error.log
App 83261 output: [2023-08-08 16:20:57 +0200 ] ERROR "ERROR: NoMethodError - undefined method `to_h' for \"linux_host\":String\nDid you mean? to_d\n to_r\n to_f\n to_i\n to_s\n to_c"
App 83261 output: [2023-08-08 16:20:57 +0200 ] INFO "execve = [\"git\", \"describe\", \"--always\", \"--tags\"]"
App 83261 output: [2023-08-08 16:20:57 +0200 ] INFO "method=POST path=/pun/sys/dashboard/batch_connect/sys/bc_desktop/tenanta/session_contexts format=html controller=BatchConnect::SessionContextsController action=create status=200 duration=356.39 view=9.43"
My configuration is:
OOD Host
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.6 LTS
Release: 20.04
Codename: focal
Ansible OOD Role
roles/ood-ansible (v3.0.3)
Cluster /etc/ood/config/clusters.d# cat tenanta.yml
---
v2:
metadata:
title: "tenanta"
url: "ood-tenanta.leomed.ethz.ch"
hidden: false
login:
host: "login-tenanta-01.leomed.ethz.ch"
default: true
job:
adapter: linux_host
submit_host: "login-tenanta-01.leomed.ethz.ch"
ssh_hosts:
- login-tenanta-01.leomed.ethz.ch
site_timeout: 7200
debug: true
singularity_bin: /usr/local/bin/singularity
singularity_bindpath: /etc,/media,/mnt,/opt,/run,/srv,/usr,/var,/users
singularity_image: /cluster/customapps/common/singularity/ubuntu_2004.sif
strict_host_checking: false
tmux_bin: /usr/bin/tmux
batch_connect:
basic:
script_wrapper: |
touch /tmp/basic_no_slurm
# enable_modules
# module purge
%s
set_host: "host=$(/usr/bin/hostname -A | awk '{print $1}')"
vnc:
script_wrapper: |
# enable_modules
# module purge
touch /tmp/vnc_no_slurm
export PATH="/opt/TurboVNC/bin:$PATH"
export WEBSOCKIFY_CMD="/usr/bin/websockify"
%s
set_host: "host=$(/usr/bin/hostname -A | awk '{print $1}')"
Desktop App **apps/bc_desktop/tenanta.yml
attributes:
bc_account: null
bc_num_slots: 1
bc_queue: null
desktop: xfce
num_cores: none
cluster: tenanta
description: 'Test'
submit: submit/submit.yml.erb
title: LeoDesk
Submit apps/bc_desktop/submit/submit.yml.erb
linux_host
The variables used with the Ansible role:
clusters:
"{{ tenant_name }}": |
---
v2:
metadata:
title: "{{ tenant_name }}"
url: "ood-{{ tenant_name }}.leomed.ethz.ch"
hidden: false
login:
host: "login-{{ tenant_name }}-01.leomed.ethz.ch"
default: true
job:
adapter: linux_host
submit_host: "login-{{ tenant_name }}-01.leomed.ethz.ch"
ssh_hosts:
- login-{{ tenant_name }}-01.leomed.ethz.ch
site_timeout: 7200
debug: true
singularity_bin: /usr/local/bin/singularity
singularity_bindpath: /etc,/media,/mnt,/opt,/run,/srv,/usr,/var,/users
singularity_image: /cluster/customapps/common/singularity/ubuntu_2004.sif
strict_host_checking: false
tmux_bin: /usr/bin/tmux
batch_connect:
basic:
script_wrapper: |
touch /tmp/basic_no_slurm
# enable_modules
# module purge
%s
set_host: "host=$(/usr/bin/hostname -A | awk '{print $1}')"
vnc:
script_wrapper: |
# enable_modules
# module purge
touch /tmp/vnc_no_slurm
export PATH="/opt/TurboVNC/bin:$PATH"
export WEBSOCKIFY_CMD="/usr/bin/websockify"
%s
set_host: "host=$(/usr/bin/hostname -A | awk '{print $1}')"
ood_apps:
# Remote Desktop
bc_desktop: |
# cacheable: false
attributes:
desktop: "xfce"
bc_queue: null
bc_account: null
bc_num_slots: 1
num_cores: none
I tried debugging and reading the docs/Discourse before opening the Topic but I’m unable to find the issue.
Thanks!
B