[ 
https://issues.apache.org/jira/browse/MESOS-4812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15245575#comment-15245575
 ] 

Lukas Loesche commented on MESOS-4812:
--------------------------------------

Hi, thanks for looking into this! I know how to make the health check pass. In 
the Github Link above I explained how I worked around the problem which is 
essentially your first solution.

The second solution is broken for systems that don't use bash for /bin/sh as 
/dev/tcp is a bash only thing.

Anyways finding some workaround is not the problem. This issue is about Mesos 
(or Marathon) doing the wrong thing, imho. Why would the user need to know 
about the details of the implementation to get a valid shell command executed?

Like why would you expect the user to read the Mesos source code to find out 
his command is executed inside a
{noformat}
/bin/sh -c ""
{noformat}
and that's why he has to escape double quotes in his own command before sending 
it to Mesos. That seems unreasonable to me.


> Mesos fails to escape command health checks
> -------------------------------------------
>
>                 Key: MESOS-4812
>                 URL: https://issues.apache.org/jira/browse/MESOS-4812
>             Project: Mesos
>          Issue Type: Bug
>    Affects Versions: 0.25.0
>            Reporter: Lukas Loesche
>            Assignee: haosdent
>              Labels: health-check
>
> As described in https://github.com/mesosphere/marathon/issues/3333
> I would like to run a command health check
> {noformat}
> /bin/bash -c "</dev/tcp/$HOST/$PORT0"
> {noformat}
> The health check fails because Mesos, while running the command inside double 
> quotes of a sh -c "" doesn't escape the double quotes in the command.
> If I escape the double quotes myself the command health check succeeds. But 
> this would mean that the user needs intimate knowledge of how Mesos executes 
> his commands which can't be right.
> I was told this is not a Marathon but a Mesos issue so am opening this JIRA. 
> I don't know if this only affects the command health check.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to