Difficulty getting shell app to observe DEFAULT_SSHHOST

I’m trying to follow the “Set Default SSH Host” section of the customization docs, but the shell app doesn’t appear to take my hint as I would expect… No matter what variation I’ve tried, it uses only the expanded localhost.

# /etc/ood/config/apps/shell/env

# Set Default SSH Host
# https://osc.github.io/ood-documentation/master/customization.html#set-default-ssh-host
#
# Set DEFAULT_SSHHOST to change the default ssh host.
# Otherwise it will default to “localhost” i.e. add the line DEFAULT_SSHHOST="localhost"
DEFAULT_SSHHOST="someloginhost.nau.edu"

This happens both on our prod and on our (new, cloned) dev machine.

Four things to check first:

  1. Remind me if you using OnDemand 1.6.20?
  2. check and verify permissions on the directories and the env file itself so that the account you are testing with has read access to the env file.
  3. verify there is no .env.local file under /var/www/ood/apps/sys/shell
  4. after changing the env file, with the account you are testing through OnDemand, first restart the PUN to ensure when you navigate to /pun/sys/shell/ssh/default the app will read the env file

Thank you for the suggestions, efranz – we’re at OnDemand version: v1.6.20 | Dashboard version: v1.35.3 for both prod and dev, for the moment. (Though, very soon I plan to test the latest master branch to see if that srun --export=ALL issue is resolved.)

Permissions all seem fine to me, and there is no .env.local file present. (See below)

[jason@ondemand /var/www/ood/apps ]$ ls -al /etc/ood/config/apps/shell/env
-rwxr-xr-x 1 root root 30 Jan 28 11:55 /etc/ood/config/apps/shell/env

[jason@ondemand /var/www/ood/apps ]$ ls -ald . sys sys/shell
drwxr-xr-x  5 root root 4096 Jan  6 08:32 .
drwxr-xr-x 12 root root 4096 Jan 28 10:19 sys
drwxr-xr-x  7 root root 4096 Nov 14 10:07 sys/shell

[jason@ondemand /var/www/ood/apps ]$ ls -al sys/shell
total 76
drwxr-xr-x  7 root root  4096 Nov 14 10:07 .
drwxr-xr-x 12 root root  4096 Jan 28 10:19 ..
-rw-r--r--  1 root root  2801 Nov 14 10:07 app.js
drwxr-xr-x  2 root root  4096 Oct 23 08:45 bin
-rw-r--r--  1 root root  3494 Oct  9 07:04 CHANGELOG.md
-rw-r--r--  1 root root   179 Oct  9 07:04 .gitignore
-rw-r--r--  1 root root  1097 Oct  9 07:04 LICENSE.txt
-rw-r--r--  1 root root   124 Nov  8 13:05 manifest.yml
drwxr-xr-x 69 root root  4096 Oct 23 08:45 node_modules
-rw-r--r--  1 root root 11136 Oct  9 07:04 npm-shrinkwrap.json
-rw-r--r--  1 root root   589 Oct  9 07:04 package.json
drwxr-xr-x  4 root root  4096 Oct  9 07:04 public
-rw-r--r--  1 root root  4326 Oct  9 07:04 README.md
drwxr-xr-x  2 root root  4096 Oct 23 08:45 tmp
-rw-r--r--  1 root root     6 Oct 15 08:23 VERSION
drwxr-xr-x  2 root root  4096 Oct 23 08:45 views

I tried doing some naive debugging by inserting console.log()'s in the app.js but I guess they must print to a subshell/virtual console or something, as nothing showed up in Chrome’s inspector.

I am indeed in the habit of restarting the webserver after any changes, so I don’t think it could be that, either. Happy to try more suggestions though, thank you!
–jb

PS: as a late addition to this, I found this thread which is similar but isn’t immediately obvious to me as a solution…yet: https://listsprd.osu.edu/pipermail/ood-users/2017-October/000058.html

@jasonbuechler did you make any progress on this? Bouncing your PUN for new configurations to take affect is sometimes what’s needed (though obviously that’s happened by now, just FYI for other or reference).

And by default host you are referring to the host it tries to ssh into when you hit /pun/sys/shell right?