> On March 22, 2016, 1:02 a.m., Joshua Cohen wrote:
> > Sorry for the delay on this. After you filed the pull request, I 
> > investigated a bit what will be required once Mesos 0.30.0 lands: 
> > https://issues.apache.org/jira/browse/AURORA-1632. I think the problem goes 
> > beyond the failure to find `sys.executable` when $PATH is not set. As even 
> > after switching back to chmod+x on the runner, the task failed further down 
> > the stack.
> > 
> > I suspect the fix for Mesos 0.30.0 will be to set our own $PATH which 
> > should allow `sys.executable` to continue working and will allow any tasks 
> > users have running which have come to rely on Thermos setting it for them 
> > to behave as expected. The problem is, I haven't had time to figure out 
> > what we should set $PATH to yet ;) (anyone have any thoughts?).
> > 
> > I know this is probably more info than you bargained for when you opened 
> > what seemed like a simple pull request. I'm not opposed to accepting this 
> > patch (with a TODO to restore `sys.executable` when we figure out what to 
> > do about setting $PATH) if it unblocks your use case, but can you confirm 
> > that you're actually able to run the Mesos agent with 
> > `--executor_environment_variables='{}'` and still launch tasks?
> 
> Pierre Cheynier wrote:
>     Hi,
>     
>     Sorry for my delay on opening this review on apache.org.
>     Actually, I started to use Aurora and faced this issue cause my setup use 
> `--executor_environment_variables`.
>     I first investigated in the Python default setup on CentOS, the pants/pex 
> build system and then the differences between the vagrant box provided in the 
> repo and mine before discovering that this is the origin of the issue.
>     
>     I admit this is a simple fix, I just tried to understand the reason of 
> using this mechanism and found that it was changed 2 years ago.
>     In 0.27.2  it works well by using this patch (I'm now able to run 
> something).

So he's the behavior I see when I run the Mesos agent with 
`--executor_environment_variables='{}'`. Without this patch, as you note, tasks 
fail to start with a permission denied error (due to `sys.executable` being 
unset). After applying this patch, tasks start up, but processes fail to fork: 
https://www.dropbox.com/s/7zzy574xdy02ukq/Screen%20Shot%202016-03-24%20at%203.49.24%20PM.png?dl=0.

Are you by chance running Docker tasks?


- Joshua


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45104/#review124697
-----------------------------------------------------------


On March 22, 2016, 9:50 a.m., Pierre Cheynier wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45104/
> -----------------------------------------------------------
> 
> (Updated March 22, 2016, 9:50 a.m.)
> 
> 
> Review request for Aurora, Joshua Cohen and Bill Farner.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> When using `--executor_environment_variables` without explicitely
> passing LD_LIBRARY_PATH, `sys.executable` returns an empty string
> resulting in a '[Errno 13] Permission denied' error for every launched
> task.
> 
> Moreover, it seems that this feature is coming in 0.30: "Executors no
> longer inherit environment variables from the agent".
> 
> This patch partially revert back 07ce21d where chmod_x method was
> removed in favor of using sys.executable.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/executor/thermos_task_runner.py 
> 3896e3841562600379705dbf78a6f62728246348 
> 
> Diff: https://reviews.apache.org/r/45104/diff/
> 
> 
> Testing
> -------
> 
> Make Aurora executor run on CentOS7, while running mesos agent with 
> `--executor_environment_variables` option and no excplicit $PATH set.
> 
> 
> Thanks,
> 
> Pierre Cheynier
> 
>

Reply via email to