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 Fri, 13 Feb 2015 04:50:37 GMT
Hi Martin,

Seems like the memberId specify in the payload not available in the
topology itself.

 checkTopologyConsistency method in ExtensionUtils will throw this error if
this happen.

 Member activatedMember = cluster.getMember(memberId);
        if (activatedMember == null) {
            if (log.isErrorEnabled()) {
                log.error(String.format("Member id not found in topology
[member] %s", memberId));
            }
            return false;
        }

I guess we need to check with the memberId specify in the payload against
the topology.

Thanks,
Gayan

On Thu, Feb 12, 2015 at 10:18 AM, Martin Eppel (meppel) <meppel@cisco.com>
wrote:

>  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
> *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> 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
>
>



-- 

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

Mime
View raw message