stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Eppel (meppel)" <mep...@cisco.com>
Subject RE: Issue with java cartrdieg agent ... was RE: [Discuss] Issue in Cartridge Agent Config Initialization Logic
Date Thu, 12 Feb 2015 19:48:02 GMT
Ok, I’ll take a look at it, it should work similarly as in the PCA, right ?

Thanks

Martin

From: Imesh Gunaratne [mailto:imesh@apache.org]
Sent: Thursday, February 12, 2015 10:25 AM
To: dev
Subject: Re: Issue with java cartrdieg agent ... was RE: [Discuss] Issue in Cartridge Agent
Config Initialization Logic

Hi Martin,

It looks like the Member Initialized event listener is not handled in Java Cartridge Agent
(JCA). Cartridge agent needs to wait until Member Initialized event is received before starting
any action.

Thanks

On Thu, Feb 12, 2015 at 11:22 PM, Martin Eppel (meppel) <meppel@cisco.com<mailto:meppel@cisco.com>>
wrote:
Haven’t heard back, anyone has an idea   ?

Thanks

Martin

From: Martin Eppel (meppel)
Sent: Wednesday, February 11, 2015 8:49 PM
To: dev@stratos.apache.org<mailto:dev@stratos.apache.org>
Subject: RE: [Discuss] Issue in Cartridge Agent Config Initialization Logic

I am seeing some inconsistent behavior with the java cartridge agent going (mostly) active
but sometimes not. I was wondering if I hit the discussed race condition or some other issue
?
I attached the log for an error scenario (cartridge_agent.log.error) and in comparison the
log for a successful run (cartridge-agent.log),
What would be the suggested fix ?

Thanks

Martin

From: Gayan Gunarathne [mailto:gayang@wso2.com]
Sent: Tuesday, January 27, 2015 10:45 PM
To: dev@stratos.apache.org<mailto:dev@stratos.apache.org>
Subject: Re: [Discuss] Issue in Cartridge Agent Config Initialization Logic

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<mailto: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<mailto: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<tel:%2B94772207163>
Blog: code.chamiladealwis.com<http://code.chamiladealwis.com>



On Wed, Jan 28, 2015 at 12:00 AM, Imesh Gunaratne <imesh@apache.org<mailto: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:

[cid:image001.png@01D046B9.BF6EAD20]
​
However Complete Topology event makes the above property True:

[cid:image002.png@01D046B9.BF6EAD20]
​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<http://wso2.com/>)
email  : gayang@wso2.com<mailto:gayang@wso2.com>  | mobile : +94 766819985<tel:%2B94%20766819985>




--
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos
Mime
View raw message