Search code examples
shellenvironment-variablesmesos

Mesos unsets some environment variables


My mesos jobs run without the LANG environment variable set. I have verified that the slaves have the variable set, so the mesos job must be unsetting the variable, but I cannot figure out where this is done.

I can explicitly set the environment variable for each job, but I would like this to be set globally.


Solution

  • Try using the agent flag --executor_environment_variables.

    From the agent command line help:

    JSON object representing the environment variables that should be passed to the executor, and thus subsequently task(s). By default this flag is none.

    Users have to define executor environment explicitly.

    Example: mesos-slave --executor_environment_variables='{ "LANG": "C" }' [...]