04-25-2019 08:34 AM
I'd like to reference the hostname in an environment snippet. Is this possible? I tried:
However FOO results in the same string as above, without executing the hostname command
04-27-2019 08:50 AM
Replying to my own post, it appears the contents of the snippet value for environment variables is enclosed in single quotes. That's why the backtick command execution is not happening. So the question is - is there anyway to have dynamic values in enironment settings? For example, reference another environment variable, or use ` or $(...)
04-30-2019 11:16 AM
The real issue here is that CM writes all the environment variables you specify (and others determined internally) to a supervisor.conf file for that process. The supervisord process then starts the process using supervisor.conf variables.
This means that it is the supervisord that needs to know how to set environment variables dynamically and I don't think that is a feature supported in supervisord at this time.
Depending on what you are trying to accomplish, there may be other ways to do this without environment variables.
05-01-2019 09:54 AM
Thanks for the response. I'm just trying to pass in a -D property to a HDFS process that includes the actual hostname of the server it's running on. Is there a way to make changes to HDFS startup scripts without breaking CM?