[
https://issues.apache.org/jira/browse/MESOS-3820?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14988698#comment-14988698
]
Joseph Wu commented on MESOS-3820:
----------------------------------
I'll investigate that approach.
It seems like swapping out the server socket does not do the trick ([attempted
here|https://github.com/kaysoky/mesos/commits/process_reinit]).
We still want to make any re-initialization test-only though. So most likely,
I'll need to investigate how to fully {{finalize}} libprocess. Right now, we
only clean up the {{process_manager}}.
> Refactor libprocess initialization to allow for test-only reinitialization of
> the server socket
> -----------------------------------------------------------------------------------------------
>
> Key: MESOS-3820
> URL: https://issues.apache.org/jira/browse/MESOS-3820
> Project: Mesos
> Issue Type: Task
> Components: libprocess, test
> Reporter: Joseph Wu
> Assignee: Joseph Wu
> Labels: mesosphere
>
> *Background*
> Libprocess initialization includes the spawning of a variety of global
> processes and the creation of the server socket which listens for incoming
> requests. Some properties of the server socket are configured via
> environment variables, such as the IP and port or the SSL configuration.
> In the case of tests, libprocess is initialized once per test binary. This
> means that testing different configurations (SSL in particular) is cumbersome
> as a separate process would be needed for every test case.
> *Proposal*
> # Follow the [example of the SSL
> library|https://github.com/apache/mesos/blob/master/3rdparty/libprocess/src/openssl.cpp#L280]
> and allow tests to declare an internal function for re-initializing a
> portion of libprocess.
> # Move the [existing creation of the server
> socket|https://github.com/apache/mesos/blob/master/3rdparty/libprocess/src/process.cpp#L852-L856]
> into a {{reinitialize_server_socket}} function.
> # Add any necessary cleanup for swapping server sockets.
> # Consider whether any additional locking is required in the
> {{reinitialize_server_socket}} function.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)