You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Rajkumar Rajaratnam <ra...@wso2.com> on 2014/11/04 13:05:04 UTC

Calling CC API (once) directly to terminate an instance is a risk!

Hi,

Noticed that we are calling CC API (once) to terminate an instance directly
on receiving some events. And we are assuming instances will be terminated
without any problem.

It is a risk!

   - We will get these events only once
   - We are calling CC API to terminate the instances
   - Say instance termination is failing for some reasons

What is the situation now? AS will not ask CC to terminate these instances
again. Because, you will not get these events (say ClusterTerminatingEvent)
again. So these instances will never be terminated.

IMO, on receiving these events, we should move these members to a member
list(may be obsolete member list) and let drools to terminate this
instances. When AS receives member terminated event for the member, we will
remove it from the list. This way, AS will ask CC to terminate the instance
until it gets member terminated event. This flow is already there for
obsoleted members. So only thing we have to do is to move these members to
obsolete member list when receiving these events.

wdyt?

Thanks.

-- 
Raj

Re: Calling CC API (once) directly to terminate an instance is a risk!

Posted by Lakmal Warusawithana <la...@wso2.com>.
On Tue, Nov 4, 2014 at 5:35 PM, Rajkumar Rajaratnam <ra...@wso2.com>
wrote:

> Hi,
>
> Noticed that we are calling CC API (once) to terminate an instance
> directly on receiving some events. And we are assuming instances will be
> terminated without any problem.
>
> It is a risk!
>
>    - We will get these events only once
>    - We are calling CC API to terminate the instances
>    - Say instance termination is failing for some reasons
>
> What is the situation now? AS will not ask CC to terminate these instances
> again. Because, you will not get these events (say ClusterTerminatingEvent)
> again. So these instances will never be terminated.
>
> IMO, on receiving these events, we should move these members to a member
> list(may be obsolete member list) and let drools to terminate this
> instances. When AS receives member terminated event for the member, we will
> remove it from the list. This way, AS will ask CC to terminate the instance
> until it gets member terminated event. This flow is already there for
> obsoleted members. So only thing we have to do is to move these members to
> obsolete member list when receiving these events.
>
> wdyt?
>

+1


> Thanks.
>
> --
> Raj
>



-- 
Lakmal Warusawithana
Vice President, Apache Stratos
Director - Cloud Architecture; WSO2 Inc.
Mobile : +94714289692
Blog : http://lakmalsview.blogspot.com/

Re: Calling CC API (once) directly to terminate an instance is a risk!

Posted by Manula Chathurika Thantriwatte <ma...@wso2.com>.
Hi,

+1 for that changes. Thanks Raj for finding it.

Thanks !

On Tue, Nov 4, 2014 at 6:02 PM, Isuru Haththotuwa <is...@apache.org> wrote:

>
>
> On Tue, Nov 4, 2014 at 5:35 PM, Rajkumar Rajaratnam <ra...@wso2.com>
> wrote:
>
>> Hi,
>>
>> Noticed that we are calling CC API (once) to terminate an instance
>> directly on receiving some events. And we are assuming instances will be
>> terminated without any problem.
>>
>> It is a risk!
>>
>>    - We will get these events only once
>>    - We are calling CC API to terminate the instances
>>    - Say instance termination is failing for some reasons
>>
>> What is the situation now? AS will not ask CC to terminate these
>> instances again. Because, you will not get these events (say
>> ClusterTerminatingEvent) again. So these instances will never be terminated.
>>
>> IMO, on receiving these events, we should move these members to a member
>> list(may be obsolete member list) and let drools to terminate this
>> instances. When AS receives member terminated event for the member, we will
>> remove it from the list. This way, AS will ask CC to terminate the instance
>> until it gets member terminated event. This flow is already there for
>> obsoleted members. So only thing we have to do is to move these members to
>> obsolete member list when receiving these events.
>>
>> wdyt?
>>
> +1, great work on figuring out this potential issue Raj.
>
>> Thanks.
>>
>> --
>> Raj
>>
>> --
>> Thanks and Regards,
>>
>> Isuru H.
>> +94 716 358 048* <http://wso2.com/>*
>>
>>
>> * <http://wso2.com/>*
>>
>>
>>


-- 
Regards,
Manula Chathurika Thantriwatte
Software Engineer
WSO2 Inc. : http://wso2.com
lean . enterprise . middleware

email : manulac@wso2.com / manula@apache.org
phone : +94 772492511
blog : http://manulachathurika.blogspot.com/

Re: Calling CC API (once) directly to terminate an instance is a risk!

Posted by Isuru Haththotuwa <is...@apache.org>.
On Tue, Nov 4, 2014 at 5:35 PM, Rajkumar Rajaratnam <ra...@wso2.com>
wrote:

> Hi,
>
> Noticed that we are calling CC API (once) to terminate an instance
> directly on receiving some events. And we are assuming instances will be
> terminated without any problem.
>
> It is a risk!
>
>    - We will get these events only once
>    - We are calling CC API to terminate the instances
>    - Say instance termination is failing for some reasons
>
> What is the situation now? AS will not ask CC to terminate these instances
> again. Because, you will not get these events (say ClusterTerminatingEvent)
> again. So these instances will never be terminated.
>
> IMO, on receiving these events, we should move these members to a member
> list(may be obsolete member list) and let drools to terminate this
> instances. When AS receives member terminated event for the member, we will
> remove it from the list. This way, AS will ask CC to terminate the instance
> until it gets member terminated event. This flow is already there for
> obsoleted members. So only thing we have to do is to move these members to
> obsolete member list when receiving these events.
>
> wdyt?
>
+1, great work on figuring out this potential issue Raj.

> Thanks.
>
> --
> Raj
>
> --
> Thanks and Regards,
>
> Isuru H.
> +94 716 358 048* <http://wso2.com/>*
>
>
> * <http://wso2.com/>*
>
>
>