stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reka Thirunavukkarasu <r...@wso2.com>
Subject Re: Graceful shutdown for the instances when scale down
Date Mon, 20 Jan 2014 04:51:28 GMT
Hi Imesh,

On Sat, Jan 18, 2014 at 3:31 AM, Imesh Gunaratne <imesh@apache.org> wrote:

> Hi Reka,
>
> Great work! I have one question regarding the following step:
> - Member will send the ReadyToShutDown event to instance-status topic once
> it is done with the cleaning up
>
> Here I could see that we have introduced a new extension called clean.sh
> to let the instance to execute a clean operation before the shutdown
> happens.
> My question is how does the instance communicate back to the cartridge
> agent (Bash to Java) once its process is complete to send the
> ReadyToShutDown event?
>

Yah. It is a good finding. I have handled it as the way where we handled to
start servers via startServerExtension using start-server.sh and then
publish Activated event. I believe that the executeCleanupExtension and the
publishInstanceReadyToShutdownEvent are synchronous. So, after successfully
executed the executeCleanupExtension, the method call returns and
publishInstanceReadyToShutdownEvent will get executed. Please do correct
me, if i'm wrong..


Thanks,
Reka

>
> Thanks
> Imesh
>
>
> On Wed, Jan 15, 2014 at 1:48 PM, Lahiru Sandaruwan <lahirus@wso2.com>wrote:
>
>> Hi Reka,
>>
>> Yes, I'm done. Sorry for the late reply.
>> Following table explains it.
>>
>>
>>  Spawn invoked from AS
>>
>> Adding a pending member
>>
>> Member Activated event(from CC)
>>
>> Pending -> Active
>>
>> Graceful shutdown event sent from AS
>>
>> Active -> Termination pending
>>
>> Member Terminated event(from CC)
>>
>> Removing the termination pending member
>>
>> Member fault event(from CEP)
>>
>> Active Member -> Obsolete member
>>
>> I'm not sure if we can use ready shutdown state here. What autoscaler
>> need to know is whether the member needs to be considered as a Active
>> serving member or it is on the way to shut down(or already shut down).
>>
>>
>> Thanks.
>>
>>
>> On Wed, Jan 15, 2014 at 1:59 PM, Reka Thirunavukkarasu <reka@wso2.com>wrote:
>>
>>> Hi Lahiru,
>>>
>>> Have you done with the changes on this improvement? If so, Can you
>>> explain that how have you done with it?
>>> Else, I believe that we can use the already existing ReadyToShutDown
>>> state to improve the instance termination in autoscaler?
>>>
>>> Thanks,
>>> Reka
>>>
>>>
>>> On Tue, Jan 14, 2014 at 12:07 AM, Lahiru Sandaruwan <lahirus@wso2.com>wrote:
>>>
>>>> HI Reka,
>>>>
>>>> I think we have to do a improvement in autosclaer side since this will
>>>> take some time to terminate. May be introducing "pending terminate".
>>>>
>>>> Otherwise scaling down rule wont stop scaling down properly...
>>>>
>>>> Thanks.
>>>>
>>>>
>>>> On Fri, Jan 10, 2014 at 10:40 AM, Reka Thirunavukkarasu <reka@wso2.com>wrote:
>>>>
>>>>> Hi Udara,
>>>>>
>>>>> +1. It is a good point. I will consider introducing a timeout in
>>>>> Autoscaler to decide on the actual termination after making the call
to SM.
>>>>>
>>>>> Thanks,
>>>>> Reka
>>>>>
>>>>>
>>>>> On Fri, Jan 10, 2014 at 8:26 AM, Udara Liyanage <udara@wso2.com>wrote:
>>>>>
>>>>>> Let's say Instance cleanup hang due to some reason(a file could not
>>>>>> be deleted). Then instance won't send the readyToTerminate message.
So
>>>>>> isn't it better instance is terminated by force after timeout when
the
>>>>>> graceful shutdown is issued.
>>>>>>
>>>>>> Touched, not typed. Erroneous words are a feature, not a typo.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Reka Thirunavukkarasu
>>>>> Software Engineer,
>>>>> WSO2, Inc.:http://wso2.com,
>>>>> Mobile: +94776442007
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> --
>>>> Lahiru Sandaruwan
>>>> Software Engineer,
>>>> Platform Technologies,
>>>> WSO2 Inc., http://wso2.com
>>>> lean.enterprise.middleware
>>>>
>>>> email: lahirus@wso2.com cell: (+94) 773 325 954
>>>> blog: http://lahiruwrites.blogspot.com/
>>>> twitter: http://twitter.com/lahirus
>>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>>
>>>>
>>>
>>>
>>> --
>>> Reka Thirunavukkarasu
>>> Software Engineer,
>>> WSO2, Inc.:http://wso2.com,
>>> Mobile: +94776442007
>>>
>>>
>>>
>>
>>
>> --
>> --
>> Lahiru Sandaruwan
>> Software Engineer,
>> Platform Technologies,
>> WSO2 Inc., http://wso2.com
>> lean.enterprise.middleware
>>
>> email: lahirus@wso2.com cell: (+94) 773 325 954
>> blog: http://lahiruwrites.blogspot.com/
>> twitter: http://twitter.com/lahirus
>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>
>>
>


-- 
Reka Thirunavukkarasu
Software Engineer,
WSO2, Inc.:http://wso2.com,
Mobile: +94776442007


,

Mime
View raw message