Reka, Should I pull the master or temporary branch (4.1.0-test) ?
Thanks Martin From: Reka Thirunavukkarasu [mailto:r...@wso2.com] Sent: Monday, December 08, 2014 11:19 PM To: dev Subject: Re: [Testing] Stratos 4.1.0 Alpha Hi Martin, I saw a log saying the unable to retrieve registry data. Can you try with a fresh DB as well? Since we have pojo changes, with old data in the DB, it might have issues. And also, i'm unable to find the log line which says application definition is deployed successfully as like [1]. Since deployed application is not there only, deploying deployment Policy throws NPE.. I have improved the validateDeploymentPolicy to handle the application retrieval properly and throw exception when needed. [1] Sample log when deploying application definition [2014-12-09 12:42:05,073] INFO {org.apache.stratos.autoscaler.applications.parser.DefaultApplicationParser} - Application with id myapp126567 parsed successfully [2014-12-09 12:42:05,082] INFO {org.apache.stratos.messaging.domain.topology.locking.TopologyLockHierarchy} - Added lock for Cluster group6tom.tomcat2.domain [2014-12-09 12:42:05,085] INFO {org.apache.stratos.cloud.controller.messaging.topology.TopologyBuilder} - Application Cluster group6tom.tomcat2.domain created in CC topology [2014-12-09 12:42:05,086] INFO {org.apache.stratos.messaging.domain.topology.locking.TopologyLockHierarchy} - Added lock for Cluster group7tom.tomcat1.domain [2014-12-09 12:42:05,086] INFO {org.apache.stratos.cloud.controller.messaging.topology.TopologyBuilder} - Application Cluster group7tom.tomcat1.domain created in CC topology [2014-12-09 12:42:05,086] INFO {org.apache.stratos.messaging.domain.topology.locking.TopologyLockHierarchy} - Added lock for Cluster mytomcat.tomcat.domain [2014-12-09 12:42:05,086] INFO {org.apache.stratos.cloud.controller.messaging.topology.TopologyBuilder} - Application Cluster mytomcat.tomcat.domain created in CC topology [2014-12-09 12:42:05,093] INFO {org.apache.stratos.cloud.controller.messaging.topology.TopologyEventPublisher} - Publishing Application Clusters Created event for Application: myapp126567 [2014-12-09 12:42:05,246] INFO {org.apache.stratos.messaging.message.processor.topology.ApplicationClustersCreatedMessageProcessor} - Cluster created: [ Cluster Id: group6tom.tomcat2.domain, Service Name: tomcat2, Autoscale Policy Name: autoscale_policy_1, Deployment Policy Name: null, Tenant Range: *, Is a Kubernetes Cluster: false ] [2014-12-09 12:42:05,246] INFO {org.apache.stratos.messaging.message.processor.topology.ApplicationClustersCreatedMessageProcessor} - Cluster created: [ Cluster Id: group7tom.tomcat1.domain, Service Name: tomcat1, Autoscale Policy Name: autoscale_policy_1, Deployment Policy Name: null, Tenant Range: *, Is a Kubernetes Cluster: false ] [2014-12-09 12:42:05,246] INFO {org.apache.stratos.messaging.message.processor.topology.ApplicationClustersCreatedMessageProcessor} - Cluster created: [ Cluster Id: mytomcat.tomcat.domain, Service Name: tomcat, Autoscale Policy Name: autoscale_policy_1, Deployment Policy Name: null, Tenant Range: *, Is a Kubernetes Cluster: false ] [2014-12-09 12:42:05,247] INFO {org.apache.stratos.autoscaler.event.receiver.topology.AutoscalerTopologyEventReceiver} - [ApplicationClustersCreatedEvent] Received: class org.apache.stratos.messaging.event.topology.ApplicationClustersCreatedEvent [2014-12-09 12:42:05,250] INFO {org.apache.stratos.messaging.domain.applications.locking.ApplicationLockH Thanks, Reka On Tue, Dec 9, 2014 at 11:57 AM, Reka Thirunavukkarasu <r...@wso2.com<mailto:r...@wso2.com>> wrote: Thanks Martin for the logs..I will go through it and update the thread.. On Tue, Dec 9, 2014 at 11:52 AM, Martin Eppel (meppel) <mep...@cisco.com<mailto:mep...@cisco.com>> wrote: Yeah I did, I deployed in the following sequence: 1. Autoscale policy 2. Cartridge 3. Application 4. Deployment policy I attached the deployment policy and application (note that the application has no group defined), should just spin up a single cartridge Attached is log, see line ~ 1096 for exception … Thanks Martin From: Udara Liyanage [mailto:ud...@wso2.com<mailto:ud...@wso2.com>] Sent: Monday, December 08, 2014 9:21 PM To: dev Subject: Re: [Testing] Stratos 4.1.0 Alpha Hi Martin, Have you deployed the application which is mentioned in deployed policy. The reason for NPE is application is is null, that is why I asked whether you have deployed the application before this. Group group = application.getGroupRecursively(alias); On Tue, Dec 9, 2014 at 9:52 AM, Martin Eppel (meppel) <mep...@cisco.com<mailto:mep...@cisco.com>> wrote: Hi Reka, I tested both sequences, and I see exceptions in either one. When I deploy the application policy before the deployment policy (as you suggested) I get the following exception: TID: [0] [STRATOS] [2014-12-09 01:08:10,069] DEBUG {org.apache.stratos.autoscaler.applications.ApplicationHolder} - Read lock acquired {org.apache.stratos.autoscaler.applications.ApplicationHolder} TID: [0] [STRATOS] [2014-12-09 01:08:10,069] DEBUG {org.apache.stratos.autoscaler.applications.ApplicationHolder} - Read lock released {org.apache.stratos.autoscaler.applications.ApplicationHolder} TID: [0] [STRATOS] [2014-12-09 01:08:10,070] ERROR {org.apache.axis2.rpc.receivers.RPCMessageReceiver} - Exception occurred while trying to invoke service method addDeploymentPolicy {org.apache.axis2.rpc.receivers.RPCMessageReceiver} java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ……. at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NullPointerException at org.apache.stratos.autoscaler.api.AutoScalerServiceImpl.validateDeploymentPolicy(AutoScalerServiceImpl.java:155) at org.apache.stratos.autoscaler.api.AutoScalerServiceImpl.addDeploymentPolicy(AutoScalerServiceImpl.java:107) ... 45 more From: Reka Thirunavukkarasu [mailto:r...@wso2.com<mailto:r...@wso2.com>] Sent: Monday, December 08, 2014 6:59 PM To: dev Subject: Re: [Testing] Stratos 4.1.0 Alpha Hi Martin, The artefacts order is as below. In the sample script too having it in the same order. Let me explain the order. - Deploy autoscale policy - Deploy cartridges - Deploy group definition - Deploy application definition - Deploy deployment policy When you deploy the deployment policy, it will validate the deployment policy against deployed application and then it will create the monitor hierarchy.. Please let me know, if you need further infor on this.. Thanks, Reka On Tue, Dec 9, 2014 at 6:43 AM, Martin Eppel (meppel) <mep...@cisco.com<mailto:mep...@cisco.com>> wrote: mmmh, seems we have a circular dependency here: • When I deploy the deployment policy before the application I get the exception 1.) (I checked the code, it seems it tries to validate the application • When I deploy the application before the deployment policy I get exception 2.) What’s the proper sequence to deploy these artefacts ? Thanks Martin Exception 1. TID: [0] [STRATOS] [2014-12-09 01:08:10,069] DEBUG {org.apache.stratos.autoscaler.applications.ApplicationHolder} - Read lock acquired {org.apache.stratos.autoscaler.applications.ApplicationHolder} TID: [0] [STRATOS] [2014-12-09 01:08:10,069] DEBUG {org.apache.stratos.autoscaler.applications.ApplicationHolder} - Read lock released {org.apache.stratos.autoscaler.applications.ApplicationHolder} TID: [0] [STRATOS] [2014-12-09 01:08:10,070] ERROR {org.apache.axis2.rpc.receivers.RPCMessageReceiver} - Exception occurred while trying to invoke service method addDeploymentPolicy {org.apache.axis2.rpc.receivers.RPCMessageReceiver} java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ……. at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NullPointerException at org.apache.stratos.autoscaler.api.AutoScalerServiceImpl.validateDeploymentPolicy(AutoScalerServiceImpl.java:155) at org.apache.stratos.autoscaler.api.AutoScalerServiceImpl.addDeploymentPolicy(AutoScalerServiceImpl.java:107) ... 45 more Exception 2. TID: [0] [STRATOS] [2014-12-09 00:55:46,060] DEBUG {org.apache.stratos.autoscaler.applications.ApplicationHolder} - Write lock released {org.apache.stratos.autoscaler.applications.ApplicationHolder} TID: [0] [STRATOS] [2014-12-09 00:55:46,060] ERROR {org.apache.stratos.autoscaler.event.receiver.topology.AutoscalerTopologyEventReceiver} - Error processing event null {org.apache.stratos.autoscaler.event.receiver.topology.AutoscalerTopologyEventReceiver} java.lang.NullPointerException at org.apache.stratos.autoscaler.pojo.policy.PolicyManager.getDeploymentPolicyByApplication(PolicyManager.java:286) at org.apache.stratos.autoscaler.event.receiver.topology.AutoscalerTopologyEventReceiver$2.onEvent(AutoscalerTopologyEventReceiver.java:140) at org.apache.stratos.messaging.listener.EventListener.update(EventListener.java:42) at java.util.Observable.notifyObservers(Observable.java:159) ….. From: Martin Eppel (meppel) Sent: Monday, December 08, 2014 2:30 PM To: dev@stratos.apache.org<mailto:dev@stratos.apache.org> Subject: RE: [Testing] Stratos 4.1.0 Alpha I am running into some issues trying to deploy a deployment policy. I am using today’s code from the master and tried to deploy the sample deployment policy provided. I am getting the exception below (at org.apache.stratos.autoscaler.api.AutoScalerServiceImpl.validateDeploymentPolicy(AutoScalerServiceImpl.java:155). To test should I be using the source from the master or from the temporary branch (4.1.0-test) ? Thanks Martin TID: [0] [STRATOS] [2014-12-08 22:23:01,064] DEBUG {org.apache.stratos.messaging.broker.connect.mqtt.MqttTopicConnector} - MQTT client created: [client-id] 1a25819e678f48c1a77b7cc {org.apache.stratos.messaging.broker.connect.mqtt.MqttTopicConnector} TID: [0] [STRATOS] [2014-12-08 22:23:01,076] DEBUG {org.apache.stratos.messaging.broker.connect.mqtt.MqttTopicConnector} - Disconnecting from message broker {org.apache.stratos.messaging.broker.connect.mqtt.MqttTopicConnector} TID: [0] [STRATOS] [2014-12-08 22:23:01,078] DEBUG {org.apache.stratos.messaging.broker.connect.mqtt.MqttTopicConnector} - Closing connection to message broker {org.apache.stratos.messaging.broker.connect.mqtt.MqttTopicConnector} TID: [0] [STRATOS] [2014-12-08 22:23:20,228] DEBUG {org.apache.stratos.autoscaler.pojo.policy.PolicyManager} - Adding deployment policy: test_app_os4-4999928381922304639 {org.apache.stratos.autoscaler.pojo.policy.PolicyManager} TID: [0] [STRATOS] [2014-12-08 22:23:20,241] DEBUG {org.apache.stratos.autoscaler.registry.RegistryManager} - Deployment Policy [id]test_app_os4-4999928381922304639 Description null isPublic false [partitions] [Partition [id=P1, description=null, isPublic=false, provider=openstack, properties=Properties [properties=[Property [name=region, value=RegionOne]]]]] {org.apache.stratos.autoscaler.registry.RegistryManager} TID: [0] [STRATOS] [2014-12-08 22:23:20,242] INFO {org.apache.stratos.autoscaler.pojo.policy.PolicyManager} - Deployment policy is deployed successfully: [id] test_app_os4-4999928381922304639 {org.apache.stratos.autoscaler.pojo.policy.PolicyManager} TID: [0] [STRATOS] [2014-12-08 22:23:20,242] DEBUG {org.apache.stratos.autoscaler.applications.ApplicationHolder} - Read lock acquired {org.apache.stratos.autoscaler.applications.ApplicationHolder} TID: [0] [STRATOS] [2014-12-08 22:23:20,242] DEBUG {org.apache.stratos.autoscaler.applications.ApplicationHolder} - Read lock released {org.apache.stratos.autoscaler.applications.ApplicationHolder} TID: [0] [STRATOS] [2014-12-08 22:23:20,242] ERROR {org.apache.axis2.rpc.receivers.RPCMessageReceiver} - Exception occurred while trying to invoke service method addDeploymentPolicy {org.apache.axis2.rpc.receivers.RPCMessageReceiver} java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212) at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:117) at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40) at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146) at org.wso2.carbon.core.transports.CarbonServlet.doPost(CarbonServlet.java:231) at javax.servlet.http.HttpServlet.service(HttpServlet.java:755) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61) at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128) at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter.doFilter(CharacterSetFilter.java:61) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:178) at org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47) at org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:56) at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47) at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:141) at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936) at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:52) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NullPointerException at org.apache.stratos.autoscaler.api.AutoScalerServiceImpl.validateDeploymentPolicy(AutoScalerServiceImpl.java:155) at org.apache.stratos.autoscaler.api.AutoScalerServiceImpl.addDeploymentPolicy(AutoScalerServiceImpl.java:107) ... 45 more TID: [0] [STRATOS] [2014-12-08 22:23:20,324] ERROR {org.apache.stratos.rest.endpoint.api.StratosApiV41Utils} - Exception occurred while trying to invoke service method addDeploymentPolicy {org.apache.stratos.rest.endpoint.api.StratosApiV41Utils} From: Martin Eppel (meppel) Sent: Monday, December 08, 2014 12:56 PM To: dev@stratos.apache.org<mailto:dev@stratos.apache.org> Subject: RE: [Testing] Stratos 4.1.0 Alpha Thanks, This should help me getting started on the new format From: Reka Thirunavukkarasu [mailto:r...@wso2.com] Sent: Monday, December 08, 2014 12:06 PM To: dev Subject: Re: [Testing] Stratos 4.1.0 Alpha Hi Martin, Really sorry for not providing the correct steps to test on this..I have attached here with single app deployment sample and an app with a group. Please execute the script inside those sample folder..It will deploy the necessary artifacts. We are in the process of testing nested group and planned to test scaling. Once we composted the artefacts for those, will share that also with you.. Thanks, Reka On Tue, Dec 9, 2014 at 1:03 AM, Martin Eppel (meppel) <mep...@cisco.com<mailto:mep...@cisco.com>> wrote: Hi Reka, The format to define application, service groups and deployment policies has changed, so I am not entirely sure what it is supposed to look like. To do meaningful testing I need either the new format(s) documented or a set of examples which will help me build applicable (and more complex) test scenarios. Useful examples would be: Application with single VM spin up Application with group Application with nested groups (at least up to 2 levels) Application with group scaling (without nested groups) Application with group scaling (with nested groups) Thanks Martin From: Reka Thirunavukkarasu [mailto:r...@wso2.com<mailto:r...@wso2.com>] Sent: Monday, December 08, 2014 6:01 AM To: dev Subject: [Testing] Stratos 4.1.0 Alpha Hi All, Since we have completed most of the implementation for 4.1.0 alpha from the following items, we are currently focusing on testing the scenarios. We had been working hard last week to get the master stable back with the workable state. So, it would be better to keep the master in a stable manner and continue bug fixing in a temporary branch. We can use master at any time for the testing with working items. We can merge the changes daily to master at once. Hence please don't commit to master from now onwards, instead commit it to the temporary branch that has been created for this purpose as 4.1.0-test(remotes/origin/4.1.0-test). - Group scaling - Dependent scaling - OAuth support for REST API and Metadata service - UI - Monitoring live application status - UI - Interactive application creation tool - Clustering features for Stratos core products - Create proxy services for each port mapping (transport) in the cartridge - Update installer according to new functionality - Test automation framework - Docker with service grouping Please update the tasks completion with testing also to this thread. Thanks, Reka -- Reka Thirunavukkarasu Senior Software Engineer, WSO2, Inc.:http://wso2.com, Mobile: +94776442007<tel:%2B94776442007> -- Reka Thirunavukkarasu Senior Software Engineer, WSO2, Inc.:http://wso2.com, Mobile: +94776442007<tel:%2B94776442007> -- Reka Thirunavukkarasu Senior Software Engineer, WSO2, Inc.:http://wso2.com, Mobile: +94776442007<tel:%2B94776442007> -- Udara Liyanage Software Engineer WSO2, Inc.: http://wso2.com<http://wso2.com/> lean. enterprise. middleware web: http://udaraliyanage.wordpress.com phone: +94 71 443 6897<tel:%2B94%2071%20443%206897> -- Reka Thirunavukkarasu Senior Software Engineer, WSO2, Inc.:http://wso2.com, Mobile: +94776442007<tel:%2B94776442007> -- Reka Thirunavukkarasu Senior Software Engineer, WSO2, Inc.:http://wso2.com, Mobile: +94776442007