stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gayan Gunarathne <gay...@wso2.com>
Subject Re: [Discuss] Issue in Cartridge Agent Config Initialization Logic
Date Wed, 28 Jan 2015 06:44:54 GMT
I think we need to check the topology consistency at once in the start up.
Once initialized set to true ,IMO there is no point to check the topology
consistence again unless the cartridge agent restart.

Thanks,
Gayan


On Wed, Jan 28, 2015 at 9:47 AM, Imesh Gunaratne <imesh@apache.org> wrote:

> Hi Chamila,
>
> Thanks for the feedback. Yes there is a possibility of cartridge agent
> could miss the Member Initialized event if agent starts after publishing
> the event. If so we may need to listen to Complete Topology event and check
> whether the member is in Initialized state and set this flag to True.
>
> According to I saw in the current codebase we have set this flag to True
> each time Complete Topology event is received. Therefore Cloud Controller
> receives Instance Started event before publishing Member Initialized event.
>
> Thanks
>
> On Wed, Jan 28, 2015 at 1:29 AM, Chamila De Alwis <chamilad@wso2.com>
> wrote:
>
>> Hi Imesh,
>>
>> This was done to reflect the changes committed by Raj [1]. The
>> CompleteTopologyEvent is checked for consistency (member id being present
>> in the topology) and the initialized flag is set to true. Almost all the
>> time, the initialization goes through this path, because the
>> InstanceSpawnedEvent is missed by the agent. Is there a particular way this
>> breaks the member life cycle?
>>
>> [1] -
>> https://github.com/apache/stratos/commit/5e41897eb730b941f2d2521f15dd6378eaddddda
>>
>>
>> Regards,
>> Chamila de Alwis
>> Software Engineer | WSO2 | +94772207163
>> Blog: code.chamiladealwis.com
>>
>>
>>
>> On Wed, Jan 28, 2015 at 12:00 AM, Imesh Gunaratne <imesh@apache.org>
>> wrote:
>>
>>> Hi Devs,
>>>
>>> I think there is an issue cartridge agent config initialization logic.
>>> Lakmal reported this while testing Kubernetes workflow. Cartridge agent
>>> wait until the Member Initialization event to send the Instance Started
>>> event, this is the intended behaviour:
>>>
>>> ​
>>> However Complete Topology event makes the above property True:
>>>
>>> ​As a result Member lifecycle breaks and member does not become active.
>>> I have now fixed this by removing the above highlighted line (in grey).
>>> Will build the php docker image and test this again.
>>>
>>> Thanks
>>>
>>>
>>> --
>>> Imesh Gunaratne
>>>
>>> Technical Lead, WSO2
>>> Committer & PMC Member, Apache Stratos
>>>
>>
>>
>
>
> --
> Imesh Gunaratne
>
> Technical Lead, WSO2
> Committer & PMC Member, Apache Stratos
>



-- 

Gayan Gunarathne
Technical Lead
WSO2 Inc. (http://wso2.com)
email  : gayang@wso2.com  | mobile : +94 766819985

Mime
View raw message