NREL / OpenStudio-server

The OpenStudio Server is a docker or Helm deployable instance which allows for large-scale parametric analyses of building energy models using the OpenStudio or URBANopt CLIs.
http://www.openstudio.net/
Other
45 stars 20 forks source link

Web admin panel not showing cli version #648

Closed tijcolem closed 2 years ago

tijcolem commented 2 years ago

As posted on https://unmethours.com/question/70690/openstudio-cloud-management-console-shows-openstudio-cli-version-error/ the GUI is not reporting the version of the OpenStudio CLI.

I think it's a just a minor fix for this in the code.

https://github.com/NREL/OpenStudio-server/blob/develop/server/app/views/admin/index.html.erb#L75

https://github.com/NREL/OpenStudio-server/blob/develop/server/app/controllers/admin_controller.rb#L45

brianlball commented 2 years ago

in oscli_cmd: ENV['OPENSTUDIO_EXE_PATH'] is not set in the web container. so, https://github.com/NREL/OpenStudio-server/blob/develop/server/app/lib/utility/oss.rb#L22 gets raised. then oscli_cmd gets set to cmd + oscli_bundle https://github.com/NREL/OpenStudio-server/blob/develop/server/app/lib/utility/oss.rb#L36. the bundle commands run in the backtick shell https://github.com/NREL/OpenStudio-server/blob/develop/server/app/controllers/admin_controller.rb#L46 are run with the user 'nobody', so there is no HOME env and bundler cant make a tmp dir.

seems like the easiest fix is to just set the ENV['OPENSTUDIO_EXE_PATH'] in the Dockerfile https://github.com/NREL/OpenStudio-server/blob/cli_version/Dockerfile#L130 to the openstudio.exe install location