All,

We already have this.. but some recent refactoring has broken it !!


On Sat, Mar 22, 2014 at 8:05 PM, Lahiru Sandaruwan <lahi...@wso2.com> wrote:

>
>
>
> On Sat, Mar 22, 2014 at 7:30 AM, Isuru Haththotuwa <isu...@wso2.com>wrote:
>
>> On Sat, Mar 22, 2014 at 12:27 AM, Sajith Kariyawasam <saj...@wso2.com>wrote:
>>
>>> Hi all,
>>>
>>> I have php cartridge's load balancer properties are as below..
>>>
>>>   "loadBalancer": {
>>>         "type": "lb",
>>>         "property": {
>>>             "name": "default.load.balancer",
>>>             "value": "true"
>>>         }
>>>       },
>>>  }
>>>
>>>
>>> I subscribed to a PHP twice, with two different aliases using the same
>>> tenant. For second subscription also I got an LB instance spawned, which is
>>> wrong according to the default load balancer category.
>>>
>>> Further looking into this, I could see in logs there are two LB clusters
>>> are created
>>>
>>> TID: [0] [SCC] [2014-03-21 22:53:34,937]  INFO
>>> {org.apache.stratos.messaging.message.processor.topology.ClusterCreatedMessageProcessor}
>>> -  Cluster created: Cluster [serviceName=lb,
>>> clusterId=lblb-1165195435.lb.domain,
>>> autoscalePolicyName=simpleAutoscalePolicy,
>>> deploymentPolicyName=economyDeploymentPolicy, hostNames=[
>>> lblb-1165195435.apachestratos.org], tenantRange=null, isLbCluster=true,
>>> properties={load.balancer.ref=default.load.balancer, load.balancer=true}]
>>> {org.apache.stratos.messaging.message.processor.topology.ClusterCreatedMessageProcessor}
>>>
>>> TID: [0] [SCC] [2014-03-21 23:14:24,169]  INFO
>>> {org.apache.stratos.messaging.message.processor.topology.ClusterCreatedMessageProcessor}
>>> -  Cluster created: Cluster [serviceName=lb,
>>> clusterId=lblb-1683889708.lb.domain,
>>> autoscalePolicyName=simpleAutoscalePolicy,
>>> deploymentPolicyName=economyDeploymentPolicy, hostNames=[
>>> lblb-1683889708.apachestratos.org], tenantRange=null,
>>> isLbCluster=false, properties={}]
>>> {org.apache.stratos.messaging.message.processor.topology.ClusterCreatedMessageProcessor}
>>>
>>>
>>> Seems that ApplicationManagementUtil's registerService method shouldn't
>>> have invoked for the 2nd subscription, because that will create a new
>>> cluster, or else should we avoid subsribeToLB completely ?
>>> as in CartridgeSubscriptionManager's
>>>           *lbCartridgeSubscription = subscribeToLB (subscriptionData,
>>> lbDataCtxt, cartridgeInfo);*
>>> Thoughts please..
>>>
>> IMHO we need to keep track of all subscriptions, including LB ones. We
>> might need an API method (in Autoscaler?) to get the relevant LB
>> information for a network partition, such as the LB cluster id, etc. if
>> there is already spawned LB for that particular network partition.
>>
>>>
>>>
> +1. Absolutely. We have to show the topology, and we should show LBs
> belong to that cluster.
>
>>  Thanks,
>>> Sajith
>>>
>>>
>>> --
>>> *Sajith Kariyawasam*
>>> *Senior Software Engineer; WSO2, Inc.*
>>> *AMIE (SL)*
>>> *Blog: http://sajithblogs.blogspot.com/
>>> <http://sajithblogs.blogspot.com/>*
>>> *Mobile: +94772269575 <%2B94772269575>*
>>>
>>
>>
>>
>> --
>> Thanks and Regards,
>>
>> Isuru H.
>> +94 716 358 048* <http://wso2.com/>*
>>
>>
>>
>
>
> --
> --
> Lahiru Sandaruwan
> Software Engineer,
> Platform Technologies,
> WSO2 Inc., http://wso2.com
> lean.enterprise.middleware
>
> email: lahi...@wso2.com cell: (+94) 773 325 954
> blog: http://lahiruwrites.blogspot.com/
> twitter: http://twitter.com/lahirus
> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>


-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Reply via email to