Hi Udara,
Great work! I just want to clarify the use of the restart queue. On
MemberActivatedEvent of a manager in the same cluster, can't a worker
instance just reconfigure and restart the service without depending on a
restart queue?
On May 9, 2015 3:50 PM, "Imesh Gunaratne" <[email protected]> wrote:
> Hi Udara,
>
> Great work on implementing the cartridge agent plugin for cluster
> discovery. I have few comments:
> I see the following get method invoking two metadata API operations.
> Ideally a get method should not do this. Shall we rename this method?
>
> def get_all_members(self, service_name, cluster_id):
> ...
> for member in members:
> if(member.member_id == self.my_member_id):
> self.log.info("**** My Ips %s , %s" %
> (member.member_default_private_ip, member.member_default_public_ip))
>
> self.publish_as_wka_member(member.member_default_private_ip)
> else:
> self.log.info("Other WKA members memberid=%s
> privateip=%s, publicip=%s " % (member.member_id,
> member.member_default_private_ip, member.member_default_public_ip))
> self.add_to_restart_queue(member.member_id)
>
> Shall we clean up the info logs? I see some asterisks being printed. May
> be you added them for testing purposes.
>
> def run_plugin(self, values):
> self.log = LogFactory().get_log(__name__)
> self.log.info("************************** starting
> wka_member_configurator")
>
> Thanks
>
> On Thu, Apr 30, 2015 at 11:16 AM, Udara Liyanage <[email protected]> wrote:
>
>> Hi,
>>
>> I am working on $subject.
>>
>> * We use puppet to download and extract carbon server into the instnace
>> * WKA configuration is done by cartridge agent by plugins. We can not do
>> WKA configuration by puppet since wka members are dynamic
>> *
>>
>> Define an application which has wka-carbon cartridge and non-wka-carbon
>> cartridge. non-wka cartridge has a startup dependency so wka cluster
>> startups first.
>>
>>
>> In order to identify weather it is a wka or non wka, we can define
>> properties in the cartridge definition. So the properties will be visible
>> in cartridge agent.
>>
>> CLUSTERING_TYPE=wka
>> SERVER_TYPE=worker|manager
>>
>> *Logic in cartridge agent plugins*
>>
>> A wka member when started, it will
>> publish its IP to metadata as wka members
>> Fetch other members of its cluster and all non wka members by
>> reading topology and adds them to a restart queue. This is done since other
>> members should be reconfigured when a wka members is added
>>
>> A non wka member just fetches the wka members from metadata service and
>> updates its configuration (axis2.xml)
>>
>> Every members listen to MemberActivates event, when the event is
>> triggered it check weather this members is a wka member. If so then check
>> if I am in the restart queue, if so start reconfiguring by fetching updated
>> wka members from the metadata service.
>>
>> I will post the application definition and more diagrams as I progress on.
>>
>> --
>>
>> Udara Liyanage
>> Software Engineer
>> WSO2, Inc.: http://wso2.com
>> lean. enterprise. middleware
>>
>> web: http://udaraliyanage.wordpress.com
>> phone: +94 71 443 6897
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Imesh Gunaratne*
> Senior Technical Lead
> WSO2 Inc: http://wso2.com
> T: +94 11 214 5345 M: +94 77 374 2057
> W: http://imesh.gunaratne.org
> Lean . Enterprise . Middleware
>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev