mesos / chronos

Fault tolerant job scheduler for Mesos which handles dependencies and ISO8601 based schedules
http://mesos.github.io/chronos/
Apache License 2.0
4.39k stars 529 forks source link

Chronos jobs unable to access host machine's environment variables #258

Open mmurray opened 10 years ago

mmurray commented 10 years ago

Hi,

We built chronos from master (2.2.0_mesos-0.20.0-SNAPSHOT) and installed it on a mesos-0.20.0 cluster.

Our jobs run through chronos seem unable to access the environment variables of the machines that host them. The output of printenv through Chronos is missing most of the variables I see when I ssh into the same machine using the same user and run the same command. The job in Chronos does have access to some environment variables though, which all seem related to Mesos (stuff like MESOS_SLAVE_PID, MESOS_FRAMEWORK_ID, MESOS_DIRECTORY, etc).

Is this known/intended behavior?

Output of mvn -X clean package: Tests run: 39, Failures: 0, Errors: 0, Skipped: 0

Output of java -version:

java version "1.7.0_60"
Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)
hieurl commented 9 years ago

Have you tried setting the "environmentVariables" attribute in job configuration? It's not available in the web gui, so you might have to use curl instead

environmentVariables    An array of environment variables passed to the Mesos executor. For Docker containers, these are also passed to Docker using the -e flag.

https://github.com/airbnb/chronos#job-configuration