[jira] [Updated] (MESOS-3820) Refactor libprocess initialization to allow for test-only reinitialization of the server socket

2015-11-23 Thread Marco Massenzio (JIRA)

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

Marco Massenzio updated MESOS-3820:
---
Sprint:   (was: Mesosphere Sprint 23)

> 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: Story
>  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* (Still under investigation)
> # Investigate using {{process::finalize}} to completely clean up libprocess.  
> See [MESOS-3863].
> # Add a test-only {{process::reinitialize}} function, which should be roughly 
> equivalent to a first-time run of {{process::initialize}}.
> -*Proposal to swap out server socket*- (Does not work)
> # 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)


[jira] [Updated] (MESOS-3820) Refactor libprocess initialization to allow for test-only reinitialization of the server socket

2015-11-09 Thread Joris Van Remoortere (JIRA)

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

Joris Van Remoortere updated MESOS-3820:

Sprint:   (was: Mesosphere Sprint 21)

> 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* (Still under investigation)
> # Augment {{process::finalize}} to completely clean up libprocess.
> #* {{process_manager}}
> #* {{socket_manager}}
> #* {{EventLoop}}
> #* {{Clock}}
> #* {{__s__}}
> #* {{__address__}}
> #* Garbage collector, help, logging, profiler, statistics, route processes 
> (should fall under {{process_manager}}).
> #* {{mime}}
> # Add a test-only {{process::reinitialize}} function, which should be roughly 
> equivalent to a first-time run of {{process::initialize}}.
> -*Proposal to swap out server socket*- (Does not work)
> # 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)


[jira] [Updated] (MESOS-3820) Refactor libprocess initialization to allow for test-only reinitialization of the server socket

2015-11-09 Thread Joseph Wu (JIRA)

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

Joseph Wu updated MESOS-3820:
-
Issue Type: Story  (was: Task)

> 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: Story
>  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* (Still under investigation)
> # Augment {{process::finalize}} to completely clean up libprocess.
> #* {{process_manager}}
> #* {{socket_manager}}
> #* {{EventLoop}}
> #* {{Clock}}
> #* {{__s__}}
> #* {{__address__}}
> #* Garbage collector, help, logging, profiler, statistics, route processes 
> (should fall under {{process_manager}}).
> #* {{mime}}
> # Add a test-only {{process::reinitialize}} function, which should be roughly 
> equivalent to a first-time run of {{process::initialize}}.
> -*Proposal to swap out server socket*- (Does not work)
> # 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)


[jira] [Updated] (MESOS-3820) Refactor libprocess initialization to allow for test-only reinitialization of the server socket

2015-11-09 Thread Joseph Wu (JIRA)

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

Joseph Wu updated MESOS-3820:
-
Sprint: Mesosphere Sprint 22

> 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* (Still under investigation)
> # Augment {{process::finalize}} to completely clean up libprocess.
> #* {{process_manager}}
> #* {{socket_manager}}
> #* {{EventLoop}}
> #* {{Clock}}
> #* {{__s__}}
> #* {{__address__}}
> #* Garbage collector, help, logging, profiler, statistics, route processes 
> (should fall under {{process_manager}}).
> #* {{mime}}
> # Add a test-only {{process::reinitialize}} function, which should be roughly 
> equivalent to a first-time run of {{process::initialize}}.
> -*Proposal to swap out server socket*- (Does not work)
> # 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)


[jira] [Updated] (MESOS-3820) Refactor libprocess initialization to allow for test-only reinitialization of the server socket

2015-11-09 Thread Joseph Wu (JIRA)

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

Joseph Wu updated MESOS-3820:
-
Story Points: 8  (was: 5)

> 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* (Still under investigation)
> # Augment {{process::finalize}} to completely clean up libprocess.
> #* {{process_manager}}
> #* {{socket_manager}}
> #* {{EventLoop}}
> #* {{Clock}}
> #* {{__s__}}
> #* {{__address__}}
> #* Garbage collector, help, logging, profiler, statistics, route processes 
> (should fall under {{process_manager}}).
> #* {{mime}}
> # Add a test-only {{process::reinitialize}} function, which should be roughly 
> equivalent to a first-time run of {{process::initialize}}.
> -*Proposal to swap out server socket*- (Does not work)
> # 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)


[jira] [Updated] (MESOS-3820) Refactor libprocess initialization to allow for test-only reinitialization of the server socket

2015-11-09 Thread Joseph Wu (JIRA)

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

Joseph Wu updated MESOS-3820:
-
Sprint:   (was: Mesosphere Sprint 23)

> 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: Story
>  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* (Still under investigation)
> # Augment {{process::finalize}} to completely clean up libprocess.
> #* {{process_manager}}
> #* {{socket_manager}}
> #* {{EventLoop}}
> #* {{Clock}}
> #* {{__s__}}
> #* {{__address__}}
> #* Garbage collector, help, logging, profiler, statistics, route processes 
> (should fall under {{process_manager}}).
> #* {{mime}}
> # Add a test-only {{process::reinitialize}} function, which should be roughly 
> equivalent to a first-time run of {{process::initialize}}.
> -*Proposal to swap out server socket*- (Does not work)
> # 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)


[jira] [Updated] (MESOS-3820) Refactor libprocess initialization to allow for test-only reinitialization of the server socket

2015-11-09 Thread Marco Massenzio (JIRA)

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

Marco Massenzio updated MESOS-3820:
---
Sprint:   (was: Mesosphere Sprint 22)

> 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* (Still under investigation)
> # Augment {{process::finalize}} to completely clean up libprocess.
> #* {{process_manager}}
> #* {{socket_manager}}
> #* {{EventLoop}}
> #* {{Clock}}
> #* {{__s__}}
> #* {{__address__}}
> #* Garbage collector, help, logging, profiler, statistics, route processes 
> (should fall under {{process_manager}}).
> #* {{mime}}
> # Add a test-only {{process::reinitialize}} function, which should be roughly 
> equivalent to a first-time run of {{process::initialize}}.
> -*Proposal to swap out server socket*- (Does not work)
> # 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)


[jira] [Updated] (MESOS-3820) Refactor libprocess initialization to allow for test-only reinitialization of the server socket

2015-11-09 Thread Marco Massenzio (JIRA)

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

Marco Massenzio updated MESOS-3820:
---
Sprint: Mesosphere Sprint 23

> 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* (Still under investigation)
> # Augment {{process::finalize}} to completely clean up libprocess.
> #* {{process_manager}}
> #* {{socket_manager}}
> #* {{EventLoop}}
> #* {{Clock}}
> #* {{__s__}}
> #* {{__address__}}
> #* Garbage collector, help, logging, profiler, statistics, route processes 
> (should fall under {{process_manager}}).
> #* {{mime}}
> # Add a test-only {{process::reinitialize}} function, which should be roughly 
> equivalent to a first-time run of {{process::initialize}}.
> -*Proposal to swap out server socket*- (Does not work)
> # 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)


[jira] [Updated] (MESOS-3820) Refactor libprocess initialization to allow for test-only reinitialization of the server socket

2015-11-09 Thread Joseph Wu (JIRA)

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

Joseph Wu updated MESOS-3820:
-
Description: 
*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* (Still under investigation)
# Investigate using {{process::finalize}} to completely clean up libprocess.  
See [MESOS-3863].
# Add a test-only {{process::reinitialize}} function, which should be roughly 
equivalent to a first-time run of {{process::initialize}}.

-*Proposal to swap out server socket*- (Does not work)
# 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.

  was:
*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* (Still under investigation)
# Augment {{process::finalize}} to completely clean up libprocess.
#* {{process_manager}}
#* {{socket_manager}}
#* {{EventLoop}}
#* {{Clock}}
#* {{__s__}}
#* {{__address__}}
#* Garbage collector, help, logging, profiler, statistics, route processes 
(should fall under {{process_manager}}).
#* {{mime}}
# Add a test-only {{process::reinitialize}} function, which should be roughly 
equivalent to a first-time run of {{process::initialize}}.

-*Proposal to swap out server socket*- (Does not work)
# 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.


> 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: Story
>  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* (Still under investigation)
> # Investigate using {{process::finalize}} to completely clean up libprocess.  
> See [MESOS-3863].
> # Add a test-only {{process::reinitialize}} function, which should be roughly 
> equivalent to a first-time run of {{process::initialize}}.
> -*Proposal to swap out server socket*- (Does not work)
> # 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 
> 

[jira] [Updated] (MESOS-3820) Refactor libprocess initialization to allow for test-only reinitialization of the server socket

2015-11-03 Thread Joseph Wu (JIRA)

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

Joseph Wu updated MESOS-3820:
-
Story Points: 5  (was: 3)

> 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)


[jira] [Updated] (MESOS-3820) Refactor libprocess initialization to allow for test-only reinitialization of the server socket

2015-11-03 Thread Joseph Wu (JIRA)

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

Joseph Wu updated MESOS-3820:
-
Description: 
*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* (Still under investigation)
# Augment {{process::finalize}} to completely clean up libprocess.
#* {{process_manager}}
#* {{socket_manager}}
#* {{EventLoop}}
#* {{Clock}}
#* {{__s__}}
#* {{__address__}}
#* Garbage collector, help, logging, profiler, statistics, route processes 
(should fall under {{process_manager}}).
#* {{mime}}
# Add a test-only {{process::reinitialize}} function, which should be roughly 
equivalent to a first-time run of {{process::initialize}}.

-*Proposal to swap out server socket*- (Does not work)
# 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.

  was:
*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.


> 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* (Still under investigation)
> # Augment {{process::finalize}} to completely clean up libprocess.
> #* {{process_manager}}
> #* {{socket_manager}}
> #* {{EventLoop}}
> #* {{Clock}}
> #* {{__s__}}
> #* {{__address__}}
> #* Garbage collector, help, logging, profiler, statistics, route processes 
> (should fall under {{process_manager}}).
> #* {{mime}}
> # Add a test-only {{process::reinitialize}} function, which should be roughly 
> equivalent to a first-time run of {{process::initialize}}.
> -*Proposal to swap out server socket*- (Does not work)
> # 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