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 <[email protected]> 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 <[email protected]> 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
