mesos-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Mann (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (MESOS-7680) Stop using EXIT() in master/agent initialization code
Date Thu, 15 Jun 2017 20:47:00 GMT

     [ https://issues.apache.org/jira/browse/MESOS-7680?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Greg Mann updated MESOS-7680:
-----------------------------
    Description: 
The initialization of master/agent dependencies is currently inconsistent. For some dependencies,
we initialize them outside of the actor and then inject them via the constructor; for example,
in {{main.cpp}} and {{cluster.cpp}}.

Some other dependencies are created/initialized within the master/slave's {{initialize()}}
method. In this case, if the dependency creation fails, we use {{EXIT(EXIT_FAILURE)}} to terminate
the process. In the case of tests, this is problematic. If I create multiple agents, for example,
and one of their dependencies fails to initialize successfully, the entire test harness would
exit :-(

During some discussion, [~jieyu] proposed an alternative: instead of using {{EXIT}} when dependency
creation fails, we could terminate the master/agent libprocess process. In the case of the
production binaries, this would cause the executable to exit. In the case of our tests, this
would allow a single test to fail, while the test harness continues running.



  was:
The initialization of master/agent dependencies is currently inconsistent. For some dependencies,
we initialize them outside of the actor and then inject them via the constructor; for example,
in {{main.cpp}} and {{cluster.cpp}}.

Some other dependencies are created/initialized within the master/slave's {{initialize()}}
method. In this case, if the dependency creation fails, we use {{EXIT(EXIT_FAILURE)}} to terminate
the process. In the case of tests, this is problematic. If I create multiple agents, for example,
and one of their dependencies fails to initialize successfully, the entire test harness would
exit :-(

Instead of using {{EXIT}} when dependency creation fails, we should terminate the master/agent
libprocess process. In the case of the production binaries, this will cause the executable
to exit. In the case of our tests, this will allow a single test to fail, while the test harness
continues running.




> Stop using EXIT() in master/agent initialization code
> -----------------------------------------------------
>
>                 Key: MESOS-7680
>                 URL: https://issues.apache.org/jira/browse/MESOS-7680
>             Project: Mesos
>          Issue Type: Improvement
>          Components: agent, master
>            Reporter: Greg Mann
>              Labels: mesosphere
>
> The initialization of master/agent dependencies is currently inconsistent. For some dependencies,
we initialize them outside of the actor and then inject them via the constructor; for example,
in {{main.cpp}} and {{cluster.cpp}}.
> Some other dependencies are created/initialized within the master/slave's {{initialize()}}
method. In this case, if the dependency creation fails, we use {{EXIT(EXIT_FAILURE)}} to terminate
the process. In the case of tests, this is problematic. If I create multiple agents, for example,
and one of their dependencies fails to initialize successfully, the entire test harness would
exit :-(
> During some discussion, [~jieyu] proposed an alternative: instead of using {{EXIT}} when
dependency creation fails, we could terminate the master/agent libprocess process. In the
case of the production binaries, this would cause the executable to exit. In the case of our
tests, this would allow a single test to fail, while the test harness continues running.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message