Hi Nirmal, I'm in the process of testing it after doing few fixes. Will update the thread soon.
On Sun, Mar 23, 2014 at 4:37 PM, Nirmal Fernando <[email protected]>wrote: > Hi Sajith, > > Did you manage to fix this issue? > > > On Sat, Mar 22, 2014 at 8:30 PM, Isuru Haththotuwa <[email protected]>wrote: > >> >> On Sat, Mar 22, 2014 at 8:21 PM, Nirmal Fernando >> <[email protected]>wrote: >> >>> We call autoscaler and check whether there's an existing LB for a given >>> n/w partition before subscribing to a LB, in SM. >>> >> That is correct. However, in order to track the subscription, SM needs to >> know the relevant details such as the cluster id, etc. of that LB. I'm >> looking in to this, and will update on my findings. >> >>> >>> >>> On Sat, Mar 22, 2014 at 8:15 PM, Isuru Haththotuwa <[email protected]>wrote: >>> >>>> On Sat, Mar 22, 2014 at 8:08 PM, Nirmal Fernando < >>>> [email protected]> wrote: >>>> >>>>> All, >>>>> >>>>> We already have this.. but some recent refactoring has broken it !! >>>>> >>>> I'm not sure. AFAIU, we need to find the LB cluster id to keep track of >>>> the subscription. So in the case of a default load balancer, we need to >>>> check if there is an already existing LB for that n/w partition and if so, >>>> retrieve its cluster id, etc. AFAIK we didn't have have such a logic in SM. >>>> >>>>> >>>>> >>>>> On Sat, Mar 22, 2014 at 8:05 PM, Lahiru Sandaruwan >>>>> <[email protected]>wrote: >>>>> >>>>>> >>>>>> >>>>>> >>>>>> On Sat, Mar 22, 2014 at 7:30 AM, Isuru Haththotuwa >>>>>> <[email protected]>wrote: >>>>>> >>>>>>> On Sat, Mar 22, 2014 at 12:27 AM, Sajith Kariyawasam < >>>>>>> [email protected]> 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: [email protected] 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/ >>>>> >>>> >>>> >>>> >>>> -- >>>> Thanks and Regards, >>>> >>>> Isuru H. >>>> +94 716 358 048* <http://wso2.com/>* >>>> >>>> >>>> >>> >>> >>> -- >>> Best Regards, >>> Nirmal >>> >>> Nirmal Fernando. >>> PPMC Member & Committer of Apache Stratos, >>> Senior Software Engineer, WSO2 Inc. >>> >>> Blog: http://nirmalfdo.blogspot.com/ >>> >> >> >> >> -- >> Thanks and Regards, >> >> Isuru H. >> +94 716 358 048* <http://wso2.com/>* >> >> >> > > > -- > Best Regards, > Nirmal > > Nirmal Fernando. > PPMC Member & Committer of Apache Stratos, > Senior Software Engineer, WSO2 Inc. > > Blog: http://nirmalfdo.blogspot.com/ > -- *Sajith Kariyawasam* *Senior Software Engineer; WSO2, Inc.* *AMIE (SL)* *Blog: http://sajithblogs.blogspot.com/ <http://sajithblogs.blogspot.com/>* *Mobile: +94772269575*
