Dan Osborne created MESOS-6129:
----------------------------------

             Summary: Use libcurl instead of shelling out to curl
                 Key: MESOS-6129
                 URL: https://issues.apache.org/jira/browse/MESOS-6129
             Project: Mesos
          Issue Type: Improvement
            Reporter: Dan Osborne


The unified Containerizer shells out to curl when downloading docker images. 
Curl is not a listed requirement to run Mesos, so users will see a stacktrace 
if they don't have curl installed.

These shells are called in the following two locations:
https://github.com/apache/mesos/blob/master/src/uri/fetchers/docker.cpp#L99-L104
https://github.com/apache/mesos/blob/master/src/uri/fetchers/curl.cpp#L99-L107

If there is no specific reason why libcurl is not used directly, then we should 
switch to libcurl calls instead.

Resulting stack trace in Agent logs from not having curl installed:
{code}
E0818 00:39:07.557843    11 slave.cpp:3976] Container 
'af48e158-631e-4b9a-8fb9-53b481787a40' for executor 
'database.2be5771a-64dc-11e6-84fd-0242ac110005' of framework 
78ff8c50-738c-4aa0-8525-74b0752ea836-0000 failed to start: Failed to perform 
'curl': ABORT: 
(../../../../../..//tmp/mesos-build/mesos-repo/3rdparty/libprocess/include/process/posix/subprocess.hpp:306):
 Failed to os::execvpe on path 'curl': No such file or directory
*** Aborted at 1471480747 (unix time) try "date -d @1471480747" if you are 
using GNU date ***
PC: @     0x7fc2aa6c8c37 (unknown)
*** SIGABRT (@0x5f) received by PID 95 (TID 0x7fc2a1e38700) from PID 95; stack 
trace: ***
    @     0x7fc2aaa67330 (unknown)
    @     0x7fc2aa6c8c37 (unknown)
    @     0x7fc2aa6cc028 (unknown)
    @           0x41336c _Abort()
    @           0x4133ac _Abort()
    @     0x7fc2ac8c764e process::internal::childMain()
    @     0x7fc2ac8c654d std::_Function_handler<>::_M_invoke()
    @     0x7fc2ac8c64f3 process::internal::defaultClone()
    @     0x7fc2ac8c8055 process::internal::cloneChild()
    @     0x7fc2ac8c59a6 process::subprocess()
    @     0x7fc2ac34b723 mesos::uri::curl()
    @     0x7fc2ac34defe mesos::uri::curl()
    @     0x7fc2ac352bf4 mesos::uri::DockerFetcherPluginProcess::fetch()
    @     0x7fc2ac357887 
_ZNSt17_Function_handlerIFvPN7process11ProcessBaseEEZNS0_8dispatchI7NothingN5mesos3uri26DockerFetcherPluginProcessERKNS6_3URIERKSsS9_SsEENS0_6FutureIT_EERKNS0_3PIDIT0_EEMSI_FSG_T1_T2_ET3_T4_EUlS2_E_E9_M_invokeERKSt9_Any_dataS2_
    @     0x7fc2ac891791 process::ProcessManager::resume()
    @     0x7fc2ac891a97 
_ZNSt6thread5_ImplISt12_Bind_simpleIFZN7process14ProcessManager12init_threadsEvEUt_vEEE6_M_runEv
    @     0x7fc2aaf3ca60 (unknown)
    @     0x7fc2aaa5f184 start_thread
    @     0x7fc2aa78c37d (unknown)
{code}



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

Reply via email to