Re: [Important] Merging Grouping Changes to Master Branch

2014-11-07 Thread Chamila De Alwis
Hi Raj, On Sat, Nov 8, 2014 at 1:19 PM, Rajkumar Rajaratnam wrote: > Please double check the java agent code too. It works somehow. Don't know > the reason :) The Java agent makes use of the org.apache.stratos.messaging component, so any changes done from a publisher's point of view is reflect

Re: Service Group Definition JSON Format

2014-11-07 Thread Manula Chathurika Thantriwatte
Hi Udara, It works. I have added the relevant changes in CLI. Thanks ! On Sat, Nov 8, 2014 at 12:00 PM, Manula Chathurika Thantriwatte < manu...@wso2.com> wrote: > Hi Udara, > > Thanks for the information. I'll try with this and update. > > Thanks ! > > On Sat, Nov 8, 2014 at 11:51 AM, Udara Li

New grouping commands in CLI

2014-11-07 Thread Manula Chathurika Thantriwatte
Hi All, I have added new grouping commands in CLI. Those commands are, deploy-service-group Deploy service group deploy-application Deploy application undeploy-service-group Undeploy service group undeploy-application Undeploy application describ

Re: [Important] Merging Grouping Changes to Master Branch

2014-11-07 Thread Chamila De Alwis
Fixed and pushed to fork. This commit is listed in the already existing PR. https://github.com/apache/stratos/pull/106 Regards, Chamila de Alwis Software Engineer | WSO2 | +94772207163 Blog: code.chamiladealwis.com On Sat, Nov 8, 2014 at 1:12 PM, Chamila De Alwis wrote: > > On Sat, Nov 8, 2

Re: [Important] Merging Grouping Changes to Master Branch

2014-11-07 Thread Rajkumar Rajaratnam
On Sat, Nov 8, 2014 at 1:12 PM, Chamila De Alwis wrote: > > On Sat, Nov 8, 2014 at 12:55 PM, Rajkumar Rajaratnam > wrote: > >> When I use m2 java agent docker image, I am getting member activated >> events. So status is not a compulsory field chamila. > > > I will fix this then. From the existin

Re: [Important] Merging Grouping Changes to Master Branch

2014-11-07 Thread Chamila De Alwis
On Sat, Nov 8, 2014 at 12:55 PM, Rajkumar Rajaratnam wrote: > When I use m2 java agent docker image, I am getting member activated > events. So status is not a compulsory field chamila. I will fix this then. From the existing code at the time of writing the Python agent, I assumed it was mandat

Re: [Important] Merging Grouping Changes to Master Branch

2014-11-07 Thread Rajkumar Rajaratnam
When I use m2 java agent docker image, I am getting member activated events. So status is not a compulsory field chamila. I am going to continue with m2 image for now. Thanks. On Sat, Nov 8, 2014 at 12:17 PM, Rajkumar Rajaratnam wrote: > > > On Sat, Nov 8, 2014 at 12:15 PM, Rajkumar Rajaratnam

Re: [Important] Merging Grouping Changes to Master Branch

2014-11-07 Thread Rajkumar Rajaratnam
On Sat, Nov 8, 2014 at 12:15 PM, Rajkumar Rajaratnam wrote: > Does anyone know why cluster status filed is commented out on > Cluster.java? > > //private ClusterStatus status; > > Thanks. > > On Sat, Nov 8, 2014 at 11:41 AM, Chamila De Alwis > wrote: > >> >> Hi Raj, >> >> On Sat, Nov 8, 2014 at

Re: [Important] Merging Grouping Changes to Master Branch

2014-11-07 Thread Rajkumar Rajaratnam
Does anyone know why cluster status filed is commented out on Cluster.java? //private ClusterStatus status; Thanks. On Sat, Nov 8, 2014 at 11:41 AM, Chamila De Alwis wrote: > > Hi Raj, > > On Sat, Nov 8, 2014 at 9:54 AM, Rajkumar Rajaratnam > wrote: > >> File "/mnt/cartridgeagent/modules/eve

Re: Service Group Definition JSON Format

2014-11-07 Thread Manula Chathurika Thantriwatte
Hi Udara, Thanks for the information. I'll try with this and update. Thanks ! On Sat, Nov 8, 2014 at 11:51 AM, Udara Liyanage wrote: > Hi Manula, > > I was able to fix this without [] branckets. I added a wrapper class > ServiceGroupPOJO as below > > >1. public class ServiceGroupPOJO >

Re: Service Group Definition JSON Format

2014-11-07 Thread Udara Liyanage
Hi Manula, I was able to fix this without [] branckets. I added a wrapper class ServiceGroupPOJO as below 1. public class ServiceGroupPOJO 2. { 3. private ServiceGroupDefinition serviceGroupDefinition; 4. 5. public ServiceGroupDefinition getServiceGroupDefinition () 6.

Re: [Important] Merging Grouping Changes to Master Branch

2014-11-07 Thread Chamila De Alwis
Hi Raj, On Sat, Nov 8, 2014 at 9:54 AM, Rajkumar Rajaratnam wrote: > File "/mnt/cartridgeagent/modules/event/topology/events.py", line 173, in > create_from_json > cluster_obj.status = cluster_str["status"] > KeyError: 'status' > The "status" field is missing from the cluster object. From w

Re: [Important] Merging Grouping Changes to Master Branch

2014-11-07 Thread Rajkumar Rajaratnam
Chamila, Here is a container agent log. Any idea what event processing fails? [2014-11-08 04:20:46,152] DEBUG {eventsubscriber.py:on_message} - Message received: 'topology/CompleteTopologyEvent': '{"topology":{"serviceMap":{"php":{"serviceName":"php","serviceType":"SingleTenant","clusterIdCluster

Re: [Fixed] CEP sends very large values for gradient and second derivative of load average

2014-11-07 Thread Lahiru Sandaruwan
On Sat, Nov 8, 2014 at 12:49 AM, Nirmal Fernando wrote: > Hi Lahiru, > > All these are improvements and should have discussed in a new thread IMO. > (these are buried now) > +1. I will send a complete proposal to a new thread. Thanks. > > What we currently have is linear gradient, which is the

Re: Service Group Definition JSON Format

2014-11-07 Thread Manula Chathurika Thantriwatte
Hi Nirmal, I have tried with the existing JSON format, but I'm unable to deserialized it. Existing JSON format is follows. But in Partitions, autoscaling policies, deployment policies we have JSON array format. { "serviceGroup":{ "cartridges":[ "tomcat" ], "dependenc

Re: [Fixed] CEP sends very large values for gradient and second derivative of load average

2014-11-07 Thread Nirmal Fernando
Sorry for the delayed response Imesh. On Thu, Nov 6, 2014 at 7:29 PM, Imesh Gunaratne wrote: > Thanks for your response Nirmal, please see my thoughts below: > > On Thu, Nov 6, 2014 at 7:38 PM, Nirmal Fernando > wrote: > >> AFAIU if it is statistics, it's all about random data, samples and >>

Re: [Fixed] CEP sends very large values for gradient and second derivative of load average

2014-11-07 Thread Nirmal Fernando
Hi Lahiru, All these are improvements and should have discussed in a new thread IMO. (these are buried now) What we currently have is linear gradient, which is the simplest form (first step!) On Thu, Nov 6, 2014 at 2:45 PM, Lahiru Sandaruwan wrote: > Hi all, > > Very interesting discussion and

[GitHub] stratos pull request: Python cartridge agent component

2014-11-07 Thread chamilad
GitHub user chamilad opened a pull request: https://github.com/apache/stratos/pull/106 Python cartridge agent component Wrote the maven-antrun-plugin execution to zip the cartridgeagent/cartridgeagent/* contents Renamed python_cartridgeagent to cartridgeagent You can m

Re: Pure Python library for Git

2014-11-07 Thread Chamila De Alwis
On Fri, Nov 7, 2014 at 11:15 PM, Imesh Gunaratne wrote: > AFAIK it would not be a problem if we do not package the dependent library > with our source or binary distribution. > Then we'll use Dulwich. It is said to be a primitive interface, but I think it can be built upon. Regards, Chamila d

Re: Pure Python library for Git

2014-11-07 Thread Imesh Gunaratne
On Fri, Nov 7, 2014 at 12:35 PM, Chamila De Alwis wrote: > Wouldn't the license involve usage even if we are not packing it along > with the source? > > AFAIK it would not be a problem if we do not package the dependent library with our source or binary distribution. -- Imesh Gunaratne Techni

Re: [Important] Merging Grouping Changes to Master Branch

2014-11-07 Thread Imesh Gunaratne
As I found this problem this has been caused by the duplicated client id values which we have set before. Now I have done a fix to set unique client id values for each topic subscriber and publisher. I did several verification tests on this fix using a sample event publisher (sending 1000 events c

Re: [Important] Merging Grouping Changes to Master Branch

2014-11-07 Thread Rajkumar Rajaratnam
Hi Isuru, On Fri, Nov 7, 2014 at 12:59 PM, Isuru Haththotuwa wrote: > > On Fri, Nov 7, 2014 at 12:52 PM, Rajkumar Rajaratnam > wrote: > >> I got containers to be created. >> But didn't get the member started event. Either agent is not sending or >> CC is not receiving. Looking into it currently

Re: Service Group Definition JSON Format

2014-11-07 Thread Nirmal Fernando
Hi Manula, I am -0 to this change, since, having arrays make it difficult to process ! Can't we get it to work without arrays? On Fri, Nov 7, 2014 at 5:21 PM, Manula Chathurika Thantriwatte < manu...@wso2.com> wrote: > Hi All, > > I have done the sample test with the following code segment [1].

Re: Service Group Definition JSON Format

2014-11-07 Thread Manula Chathurika Thantriwatte
Hi All, I have done the sample test with the following code segment [1]. This works successfully. I think we need to change the Service Definition bean class and also we need to send service definition as JSON array. [1] https://github.com/manulachathurika/TestRestEndpoint/blob/master/TestEndpoin

Re: Service Group Definition JSON Format

2014-11-07 Thread Manula Chathurika Thantriwatte
Hi Isuru, No, Still it didn't solve the issue. @Udara, Currently we get Partitions, Deployment Polices etc... as JSON array. I have done the test with Service Definition Group as JSON array and it works successful with the deserialization. IMHO is having JSON array for the Service Group Definitio

Re: Service Group Definition JSON Format

2014-11-07 Thread Udara Liyanage
Hi Manula, Why should we add [] brackets if there is only one ServiceGroup? On Fri, Nov 7, 2014 at 8:28 PM, Isuru Haththotuwa wrote: > Hi Manula, > > Sorry if I'm missing something, but isn't this solved by the workaround > Udara has mentioned in the mail thread [1] ? > > [1]. Json response sho

Re: Service Group Definition JSON Format

2014-11-07 Thread Isuru Haththotuwa
Hi Manula, Sorry if I'm missing something, but isn't this solved by the workaround Udara has mentioned in the mail thread [1] ? [1]. Json response shows arrays as string when there are single value On Fri, Nov 7, 2014 at 8:10 PM, Manula Chathurika Thantriwatte < manu...@wso2.com> wrote: > Hi, >

Service Group Definition JSON Format

2014-11-07 Thread Manula Chathurika Thantriwatte
Hi, Currently we get the service group definition using the GET curl command as follows. { "serviceGroup":{ "cartridges":[ "tomcat" ], "dependencies":{ "startupOrders":[ "group.group1,cartridge.tomcat" ], "terminationBehaviour":

NPE while undeploying an application

2014-11-07 Thread Udara Liyanage
Hi Reka, Isuru, I got the following NPE when I undeployed an app. While debuging I noticed that the appId of the moniter is not set, thus application become null. 1. String appId = monitor.getAppId(); 2.Application application = ApplicationHolder. getApplicat

[jira] [Created] (STRATOS-943) Publishing Application terminated event is published even when there is no application

2014-11-07 Thread Udara Liyanage (JIRA)
Udara Liyanage created STRATOS-943: -- Summary: Publishing Application terminated event is published even when there is no application Key: STRATOS-943 URL: https://issues.apache.org/jira/browse/STRATOS-943

[jira] [Created] (STRATOS-942) Spinup instances even when application in undeployed

2014-11-07 Thread Udara Liyanage (JIRA)
Udara Liyanage created STRATOS-942: -- Summary: Spinup instances even when application in undeployed Key: STRATOS-942 URL: https://issues.apache.org/jira/browse/STRATOS-942 Project: Stratos Is

Re: Scale dependency design in Application model

2014-11-07 Thread Lahiru Sandaruwan
- Scenario 4 We can have independent ratios between siblings. ​ On Fri, Nov 7, 2014 at 3:20 PM, Lahiru Sandaruwan wrote: > > > On Fri, Nov 7, 2014 at 3:15 PM, Lahiru Sandaruwan > wrote: > >> Hi all, >> >> We have done a design for application scaling. >> >> We can define scaling ratio

Requesting edit permission for Stratos Wiki.

2014-11-07 Thread Vishanth Balasubramaniam
Hi Mariangela, This is to request for *edit permission* for apache stratos wiki. Details are as follows. Name: Vishanth Balasubramaniam Email: vishanth...@gmail.com Thanks, -- *Vishanth Balasubramaniam* Software Engineer WSO2 Inc.; http://wso2.com lean.enterprise.middleware mobile: *+94771737

Re: Scale dependency design in Application model

2014-11-07 Thread Lahiru Sandaruwan
On Fri, Nov 7, 2014 at 3:15 PM, Lahiru Sandaruwan wrote: > Hi all, > > We have done a design for application scaling. > > We can define scaling ratio in the parents. Ratio only applies to the > immediate children of the group and not further. Cartridge to cartridge > ratio can be anything where G

Scale dependency design in Application model

2014-11-07 Thread Lahiru Sandaruwan
Hi all, We have done a design for application scaling. We can define scaling ratio in the parents. Ratio only applies to the immediate children of the group and not further. Cartridge to cartridge ratio can be anything where Group to cartridge ratio should be 1:* always. Because when we have cart

Re: [Important] Merging Grouping Changes to Master Branch

2014-11-07 Thread Imesh Gunaratne
I guess we need to set clean session to false and use reliable delivery. WDYT? MqttConnectOptions connOpts = new MqttConnectOptions(); connOpts.setCleanSession(false); * * If set to false both the client and server will maintain state across * restarts of the client, the server and the connectio

Re: [Important] Merging Grouping Changes to Master Branch

2014-11-07 Thread Imesh Gunaratne
Gayan: I see another issue here: We have set QOS to 2 in publisher: MqttMessage mqttMSG = new MqttMessage(message.getBytes()); mqttMSG.setQos(QOS); // QOS => 2 ** Quality of Service 2 - indicates that a message should* ** be delivered once. The message will be persisted to disk, and will* ** be

Re: [Important] Merging Grouping Changes to Master Branch

2014-11-07 Thread Gayan Gunarathne
At a particular time we do have multiple listeners and only one topic publisher for a component. Because of that generating a client id for subscribers. +1 for have client id unique according to this [1]. http://www.eclipse.org/paho/files/javadoc/org/eclipse/paho/client/mqttv3/MqttClient.html#Mqt

Re: Build failed in Jenkins: Stratos-Master-Nightly-Build #305

2014-11-07 Thread Nirmal Fernando
We need to please. There're lot of emails generated due to these failures last night. On Fri, Nov 7, 2014 at 9:46 AM, Lasindu Charith wrote: > Seems like the build failure is still there. But the master builds fine > locally without an issue. > > The root cause seems to be > > ==

Re: [Important] Merging Grouping Changes to Master Branch

2014-11-07 Thread Isuru Haththotuwa
I'll do a quick fix to make the client id unique and run a test. On Fri, Nov 7, 2014 at 2:14 PM, Imesh Gunaratne wrote: > Gayan: Was there any reason for generating a client id for subscribers and > setting a fixed value for publishers? > > TopicSubscriber.doSubscribe(): > MqttClient mqttClient

Re: [Important] Merging Grouping Changes to Master Branch

2014-11-07 Thread Imesh Gunaratne
AFAIU the client id is used by the message broker for maintaining the sessions among connection drops and restarts (for reliable message delivery). Therefore each subscriber and publisher might need to have its own client with a uniqe identifier. I will fix this in messaging component. On Fri, No

Re: Error in deploying service groups

2014-11-07 Thread Udara Liyanage
Hi Manula, You have refered group1 in the group2, have you deployed group1? On Fri, Nov 7, 2014 at 2:14 PM, Udara Liyanage wrote: > Hi Isuru, > > I will have a look > > On Fri, Nov 7, 2014 at 2:08 PM, Manula Chathurika Thantriwatte < > manu...@wso2.com> wrote: > >> Hi Isuru, >> >> Below is the

Re: Error in deploying service groups

2014-11-07 Thread Isuru Haththotuwa
Hi Manula, On Fri, Nov 7, 2014 at 2:20 PM, Manula Chathurika Thantriwatte < manu...@wso2.com> wrote: > Hi Udara / Isuru, > > Find the issue. I have missed to deploy group1. Once I deployed group1 the > issue get fixed. Sorry for the inconvenience. > IMHO, the sub group being missing should not ca

Re: Error in deploying service groups

2014-11-07 Thread Manula Chathurika Thantriwatte
Hi Udara / Isuru, Find the issue. I have missed to deploy group1. Once I deployed group1 the issue get fixed. Sorry for the inconvenience. Thanks ! On Fri, Nov 7, 2014 at 2:15 PM, Udara Liyanage wrote: > Hi Manula, > > You have refered group1 in the group2, have you deployed group1? > > On Fri

Re: Build failed in Jenkins: Stratos-Master-Nightly-Build #305

2014-11-07 Thread Lasindu Charith
Seems like the build failure is still there. But the master builds fine locally without an issue. The root cause seems to be == ERROR: test_interactive_mode_list_tenants (__main__.TestInteractive)

Re: Error in deploying service groups

2014-11-07 Thread Manula Chathurika Thantriwatte
Hi Isuru, Below is the service group definition which I have used to deploy. { "name": "group3", "subGroups": [ "group1" ], "cartridges": [ "tomcat" ], "dependencies": { "startupOrders": [ "group.group1,cartridge.tomcat" ], "termin

Re: Error in deploying service groups

2014-11-07 Thread Udara Liyanage
Hi Isuru, I will have a look On Fri, Nov 7, 2014 at 2:08 PM, Manula Chathurika Thantriwatte < manu...@wso2.com> wrote: > Hi Isuru, > > Below is the service group definition which I have used to deploy. > > { >"name": "group3", >"subGroups": [ >"group1" >], >"cartridges":

Re: [Important] Merging Grouping Changes to Master Branch

2014-11-07 Thread Imesh Gunaratne
Gayan: Was there any reason for generating a client id for subscribers and setting a fixed value for publishers? TopicSubscriber.doSubscribe(): MqttClient mqttClient = MQTTConnector.getMQTTSubClient(Util.getRandomString( 5)); On Fri, Nov 7, 2014 at 1:17 PM, Isuru Haththotuwa wrote: > > > On