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

Qian Zhang commented on MESOS-6822:
-----------------------------------

The way we checked the return value of {{os::spawn}} is not correct, we will 
return {{os::strerror(errno)}} as long as {{os::spawn}} return non-zero. 
However, when you look at the implementation of {{os::spawn}}, it calls 
{{waitpid}} on the child process and return its exit status, so when the child 
process exits with a non-zero status (e.g., it will exit with 127 if the 
command to be executed can not be found), we will return 
{{os::strerror(errno)}}, but it is actually {{Success}} because {{waitpid}} 
succeeds.

We should follow the way of the code below to handle the return value of 
{{os::spawn}}.

https://github.com/apache/mesos/blob/1.4.1/src/linux/fs.cpp#L481:L497

> CNI reports confusing error message for failed interface setup.
> ---------------------------------------------------------------
>
>                 Key: MESOS-6822
>                 URL: https://issues.apache.org/jira/browse/MESOS-6822
>             Project: Mesos
>          Issue Type: Bug
>          Components: network
>    Affects Versions: 1.1.0
>            Reporter: Alexander Rukletsov
>            Assignee: Qian Zhang
>            Priority: Major
>
> Saw this today:
> {noformat}
> Failed to bring up the loopback interface in the new network namespace of pid 
> 17067: Success
> {noformat}
> which is produced by this code: 
> https://github.com/apache/mesos/blob/1e72605e9892eb4e518442ab9c1fe2a1a1696748/src/slave/containerizer/mesos/isolators/network/cni/cni.cpp#L1854-L1859
> Note that ssh'ing into the machine confirmed that {{ifconfig}} is available 
> in {{PATH}}.
> Full log: http://pastebin.com/hVdNz6yk



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to