You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Imesh Gunaratne <im...@apache.org> on 2015/03/21 12:40:22 UTC
[Discuss] Stratos Component StartUp Synchronizer
Hi Devs,
I fixed the stratos component startup synchronization issue and pushed
changes to master branch. Now stratos components starts in the following
order:
Cloud Controller -> Autoscaler -> Stratos Manager
How it works:
- A new distributed map was introduced to keep track of the status of each
component [1].
- In single JVM mode the above map becomes a singleton.
- Whenever a component becomes active it will update the above map.
- If Autoscaler starts first it will wait until Cloud Controller becomes
active.
- If Stratos Manager starts first it will wait until Autoscaler and Cloud
Controller become active.
- In a distributed deployment the same logic will apply.
- Introduced a new handler [2] in REST API to avoid API method being
executed until Stratos Manager becomes active, if invoked following
response will be sent to the client:
HTTP/1.1 406 Not Acceptable
{"message":"Stratos manager component is not active"}
[1]
https://github.com/apache/stratos/blob/master/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/internal/ComponentStartUpSynchronizerImpl.java
[2]
https://github.com/apache/stratos/blob/master/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/handlers/ComponentSynchronizerHandler.java
Thanks
--
Imesh Gunaratne
Technical Lead, WSO2
Committer & PMC Member, Apache Stratos
Re: [Discuss] Stratos Component StartUp Synchronizer
Posted by Imesh Gunaratne <im...@apache.org>.
Hi Raj,
A good point, we may need start start Mock IaaS once Stratos Manager
becomes active. I will have a look at this.
Thanks
On Mon, Mar 23, 2015 at 11:47 AM, Rajkumar Rajaratnam <ra...@wso2.com>
wrote:
> Hi Imesh,
>
> As an improvement, shall we start mock component after SM? I am seeing
> some issues on stratos restart because mock component is up and running
> before all the other components.
>
> Thanks.
>
> On Sat, Mar 21, 2015 at 6:36 PM, Rajkumar Rajaratnam <ra...@wso2.com>
> wrote:
>
>> Great work Imesh. Hope all the issues with server restart will go away
>> now.
>>
>> Thanks.
>>
>> On Sat, Mar 21, 2015 at 5:10 PM, Imesh Gunaratne <im...@apache.org>
>> wrote:
>>
>>> Hi Devs,
>>>
>>> I fixed the stratos component startup synchronization issue and pushed
>>> changes to master branch. Now stratos components starts in the following
>>> order:
>>>
>>> Cloud Controller -> Autoscaler -> Stratos Manager
>>>
>>> How it works:
>>> - A new distributed map was introduced to keep track of the status of
>>> each component [1].
>>> - In single JVM mode the above map becomes a singleton.
>>> - Whenever a component becomes active it will update the above map.
>>> - If Autoscaler starts first it will wait until Cloud Controller becomes
>>> active.
>>> - If Stratos Manager starts first it will wait until Autoscaler and
>>> Cloud Controller become active.
>>> - In a distributed deployment the same logic will apply.
>>> - Introduced a new handler [2] in REST API to avoid API method being
>>> executed until Stratos Manager becomes active, if invoked following
>>> response will be sent to the client:
>>> HTTP/1.1 406 Not Acceptable
>>> {"message":"Stratos manager component is not active"}
>>>
>>> [1]
>>> https://github.com/apache/stratos/blob/master/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/internal/ComponentStartUpSynchronizerImpl.java
>>> [2]
>>> https://github.com/apache/stratos/blob/master/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/handlers/ComponentSynchronizerHandler.java
>>>
>>> Thanks
>>>
>>> --
>>> Imesh Gunaratne
>>>
>>> Technical Lead, WSO2
>>> Committer & PMC Member, Apache Stratos
>>>
>>
>>
>>
>> --
>> Rajkumar Rajaratnam
>> Committer & PMC Member, Apache Stratos
>> Software Engineer, WSO2
>>
>> Mobile : +94777568639
>> Blog : rajkumarr.com
>>
>
>
>
> --
> Rajkumar Rajaratnam
> Committer & PMC Member, Apache Stratos
> Software Engineer, WSO2
>
> Mobile : +94777568639
> Blog : rajkumarr.com
>
--
Imesh Gunaratne
Technical Lead, WSO2
Committer & PMC Member, Apache Stratos
Re: [Discuss] Stratos Component StartUp Synchronizer
Posted by Rajkumar Rajaratnam <ra...@wso2.com>.
Hi Imesh,
As an improvement, shall we start mock component after SM? I am seeing some
issues on stratos restart because mock component is up and running before
all the other components.
Thanks.
On Sat, Mar 21, 2015 at 6:36 PM, Rajkumar Rajaratnam <ra...@wso2.com>
wrote:
> Great work Imesh. Hope all the issues with server restart will go away now.
>
> Thanks.
>
> On Sat, Mar 21, 2015 at 5:10 PM, Imesh Gunaratne <im...@apache.org> wrote:
>
>> Hi Devs,
>>
>> I fixed the stratos component startup synchronization issue and pushed
>> changes to master branch. Now stratos components starts in the following
>> order:
>>
>> Cloud Controller -> Autoscaler -> Stratos Manager
>>
>> How it works:
>> - A new distributed map was introduced to keep track of the status of
>> each component [1].
>> - In single JVM mode the above map becomes a singleton.
>> - Whenever a component becomes active it will update the above map.
>> - If Autoscaler starts first it will wait until Cloud Controller becomes
>> active.
>> - If Stratos Manager starts first it will wait until Autoscaler and Cloud
>> Controller become active.
>> - In a distributed deployment the same logic will apply.
>> - Introduced a new handler [2] in REST API to avoid API method being
>> executed until Stratos Manager becomes active, if invoked following
>> response will be sent to the client:
>> HTTP/1.1 406 Not Acceptable
>> {"message":"Stratos manager component is not active"}
>>
>> [1]
>> https://github.com/apache/stratos/blob/master/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/internal/ComponentStartUpSynchronizerImpl.java
>> [2]
>> https://github.com/apache/stratos/blob/master/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/handlers/ComponentSynchronizerHandler.java
>>
>> Thanks
>>
>> --
>> Imesh Gunaratne
>>
>> Technical Lead, WSO2
>> Committer & PMC Member, Apache Stratos
>>
>
>
>
> --
> Rajkumar Rajaratnam
> Committer & PMC Member, Apache Stratos
> Software Engineer, WSO2
>
> Mobile : +94777568639
> Blog : rajkumarr.com
>
--
Rajkumar Rajaratnam
Committer & PMC Member, Apache Stratos
Software Engineer, WSO2
Mobile : +94777568639
Blog : rajkumarr.com
Re: [Discuss] Stratos Component StartUp Synchronizer
Posted by Rajkumar Rajaratnam <ra...@wso2.com>.
Great work Imesh. Hope all the issues with server restart will go away now.
Thanks.
On Sat, Mar 21, 2015 at 5:10 PM, Imesh Gunaratne <im...@apache.org> wrote:
> Hi Devs,
>
> I fixed the stratos component startup synchronization issue and pushed
> changes to master branch. Now stratos components starts in the following
> order:
>
> Cloud Controller -> Autoscaler -> Stratos Manager
>
> How it works:
> - A new distributed map was introduced to keep track of the status of each
> component [1].
> - In single JVM mode the above map becomes a singleton.
> - Whenever a component becomes active it will update the above map.
> - If Autoscaler starts first it will wait until Cloud Controller becomes
> active.
> - If Stratos Manager starts first it will wait until Autoscaler and Cloud
> Controller become active.
> - In a distributed deployment the same logic will apply.
> - Introduced a new handler [2] in REST API to avoid API method being
> executed until Stratos Manager becomes active, if invoked following
> response will be sent to the client:
> HTTP/1.1 406 Not Acceptable
> {"message":"Stratos manager component is not active"}
>
> [1]
> https://github.com/apache/stratos/blob/master/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/internal/ComponentStartUpSynchronizerImpl.java
> [2]
> https://github.com/apache/stratos/blob/master/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/handlers/ComponentSynchronizerHandler.java
>
> Thanks
>
> --
> Imesh Gunaratne
>
> Technical Lead, WSO2
> Committer & PMC Member, Apache Stratos
>
--
Rajkumar Rajaratnam
Committer & PMC Member, Apache Stratos
Software Engineer, WSO2
Mobile : +94777568639
Blog : rajkumarr.com