You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by "Martin Eppel (meppel)" <me...@cisco.com> on 2014/12/15 19:41:13 UTC

RE: [Testing] Stratos 4.1.0 Alpha - 4.1.0-test branch fails to compile

Just updated the 4.1.0-test' branch and it fails to compile, anyone else seeing this  ?

Thanks

Martin

On branch 4.1.0-test
Your branch is up-to-date with 'origin/4.1.0-test'.

ARNING] /home/netiq/architecture/stratos_repo2/stratos/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/handlers/CookieBasedAuthenticationHandler.java:[31,40] crc32 is internal proprietary API and may be removed in a future release
[WARNING] /home/netiq/architecture/stratos_repo2/stratos/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/handlers/CookieBasedAuthenticationHandler.java:[31,40] crc32 is internal proprietary API and may be removed in a future release
[WARNING] /home/netiq/architecture/stratos_repo2/stratos/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/handlers/CookieBasedAuthenticationHandler.java:[31,40] crc32 is internal proprietary API and may be removed in a future release
[INFO] 3 warnings
[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/netiq/architecture/stratos_repo2/stratos/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java:[1006,77] error: cannot find symbol
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:

From: Lahiru Sandaruwan [mailto:lahirus@wso2.com]
Sent: Sunday, December 14, 2014 12:56 PM
To: dev
Cc: Reka Thirunavukkarasu; Mariangela Hills
Subject: Re: [Testing] Stratos 4.1.0 Alpha

Hi all,

I have completed and tested a simple dependent scaling sample successfully. It was an application with two cartridges. [1] has samples for mock IaaS and Openstack. Next step would be testing a combination which includes a group.
Note that the change are committed to "4.1.0-test" branch.

Thanks.

[1] https://github.com/rekathiru/grouping-samples/tree/master/dependency_scaling/

On Sat, Dec 13, 2014 at 11:33 PM, Lahiru Sandaruwan <la...@wso2.com>> wrote:
Changed "upperLimit" to "threshold" in json input. So autoscaling policy should be as below. Some code refactoring on this is yet to be done.

{
  "id": "autoscale_policy_1",
  "loadThresholds": {
    "requestsInFlight": {
      "threshold": 80
    },
    "memoryConsumption": {
      "threshold": 90
    },
    "loadAverage": {
      "threshold": 50
    }
  }
}

On Wed, Dec 10, 2014 at 4:43 PM, Lahiru Sandaruwan <la...@wso2.com>> wrote:

On Wed, Dec 10, 2014 at 4:31 PM, Nirmal Fernando <ni...@gmail.com>> wrote:


On Wed, Dec 10, 2014 at 3:19 PM, Lahiru Sandaruwan <la...@wso2.com>> wrote:
Hi all,

Please update the autoscaling policy,
We are only using upperLimit now. We will rename it to threshold.

Can't we do this change now? (before alpha). IMO we should try to minimize config changes after alpha.


Will try to do before Alpha.
{
  "id": "autoscale_policy_1",
  "loadThresholds": {
    "requestsInFlight": {
      "upperLimit": 80
    },
    "memoryConsumption": {
      "upperLimit": 90
    },
    "loadAverage": {
      "upperLimit": 50
    }
  }
}


Thanks.

On Wed, Dec 10, 2014 at 2:15 PM, Chamila De Alwis <ch...@wso2.com>> wrote:
Hi Martin/Reka,

We had a hangout on this subject [1] a while back. I discussed the steps to configure the python agent and some troubleshooting tips specific to the python agent. I will however come up with a document soon, with steps in brief, so to spend less time on it reading. In the meanwhile please go through the hangout.

[1] - https://plus.google.com/events/c0rvi4fmeeloaa76np3cgnqpa84


Regards,
Chamila de Alwis
Software Engineer | WSO2 | +94772207163<tel:%2B94772207163>
Blog: code.chamiladealwis.com<http://code.chamiladealwis.com>



On Wed, Dec 10, 2014 at 2:07 PM, Reka Thirunavukkarasu <re...@wso2.com>> wrote:
Hi Martin,

We haven't documented the python agent yet. Added Chamila who worked on python agent.

@Chamila, Do you have the steps to configure python agent puppet module?

Thanks,
Reka

On Wed, Dec 10, 2014 at 11:43 AM, Martin Eppel (meppel) <me...@cisco.com>> wrote:
Please see inline

From: Reka Thirunavukkarasu [mailto:reka@wso2.com<ma...@wso2.com>]
Sent: Tuesday, December 09, 2014 9:07 PM
To: dev
Subject: Re: [Testing] Stratos 4.1.0 Alpha

Hi Martin,

From 4.1.0 onwards, we recommend to use python agent as discussed in stratos-dev [1]. We have added the puppet modules for it as well. If you pull our latest puppet module, it has puppet agent stuffs and it is already configured to use python agent.

Martin: I am not familiar with the follwoing – are there instructions for it ?
So, by just updating the mb and cep URL in the base.pp, you will be able to test it with python agent. Please use secured port for cep configuration.

[1]. Are we still supporting java agent?


Thanks,
Reka


On Wed, Dec 10, 2014 at 6:51 AM, Martin Eppel (meppel) <me...@cisco.com>> wrote:
Hi Reka,

I was able to almost get the single_app with my  configurationto work, the issue I am running into is that the cartridge agent doesn’t seem to work properly.

My first question would be if the java cartridge agent is still expected to work or if we are expected to use the python agent ?

So far I am still using the java based cartridge agent and it seems that it is getting stuck after starting the “Instance notifier event message delegator”, at least I don’t see any logs after that.

For some reason the agent is not able to read the log4j.properties file so I had to change the debug messages to info messages (see cartridge log – “agent log”). My expectation would have been that I should see the added log messages after the “Instance notifier event message delegator” as well (see the code snippet of the run method below: Code snipplet:
)

Any clue as of why the agent gets stuck in the “Instance notifier event message delegator” or what else might be missing ?

Thanks

Martin

Cartridge agent log:

[2014-12-10 01:03:19,414162455] %%stratos-wrapper.sh-Info: System variables: knock-address localhost, instance-uuid c8a0a418-e5b1-439c-847a-6590b4063702, launch-params /var/lib/qtcm/cartridge-agent/launch-params, app_path /var/lib/qtcm/cartridge-agent/cartridge-app-data
[2014-12-10 01:03:19,420470208] %%stratos-wrapper.sh-Info: Entries in launch-params: APP_ID=test_app_1 GROUP_NAME=null SERVICE_NAME=cisco-sample-vm HOST_NAME=csco_sample_cartridge.qmog.cisco.com<http://csco_sample_cartridge.qmog.cisco.com> MULTITENANT=false TENANT_ID=-1234 TENANT_RANGE=* CARTRIDGE_ALIAS=csco_sample_cartridge CLUSTER_ID=csco_sample_cartridge.cisco-sample-vm.domain CARTRIDGE_KEY=qgv3Zpqz1Z5SvGWN REPO_URL=null PORTS=22 PROVIDER=cisco PUPPET_IP=PUPPET_IP PUPPET_HOSTNAME=PUPPET_HOSTNAME PUPPET_DNS_AVAILABLE=null PUPPET_ENV=null TRUSTSTORE_PASSWORD=wso2carbon SIMPLE_PROPERTY=value QTCM_DNS_SEGMENT= CEP_PORT=7611 MONITORING_SERVER_SECURE_PORT=0 MB_PORT=61616 MB_IP=octl.qmog.cisco.com<http://octl.qmog.cisco.com> QTCM_NETWORK_COUNT=1 CEP_IP=octl.qmog.cisco.com<http://octl.qmog.cisco.com> DEPLOYMENT=default ENABLE_DATA_PUBLISHER=false MONITORING_SERVER_IP=octl.qmog.cisco.com<http://octl.qmog.cisco.com> MONITORING_SERVER_ADMIN_PASSWORD=xxxx MONITORING_SERVER_ADMIN_USERNAME=xxxx CERT_TRUSTSTORE=/opt/apache-stratos-cartridge-agent/security/client-truststore.jks MONITORING_SERVER_PORT=0 MEMBER_ID=csco_sample_cartridge.cisco-sample-vm.domain2aa03742-7efc-42b8-95a6-f7a7545fa509 LB_CLUSTER_ID=null NETWORK_PARTITION_ID=N1 PARTITION_ID=RegionOne-Core INSTANCE_ID=test_app_1_1 PRIMARY=false MIN_COUNT=1
/opt/apache-stratos-cartridge-agent-4.1.0-SNAPSHOT/conf /opt
/opt
[2014-12-10 01:03:19,448502771] %%stratos-wrapper.sh-Info: Starting cartridge agent
[2014-12-10 01:03:19,472527876] %%stratos-wrapper.sh-Info: No stale cartridge agents found
log4j:ERROR Could not read configuration file [file:///opt/apache-stratos-cartridge-agent-4.1.0-SNAPSHOT/conf/log4j.properties].
java.io.FileNotFoundException: file:/opt/apache-stratos-cartridge-agent-4.1.0-SNAPSHOT/conf/log4j.properties (No such file or directory)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:146)
        at java.io.FileInputStream.<init>(FileInputStream.java:101)
        at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:306)
        at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:324)
        at org.apache.stratos.cartridge.agent.Main.main(Main.java:59)
log4j:ERROR Ignoring configuration file [file:///opt/apache-stratos-cartridge-agent-4.1.0-SNAPSHOT/conf/log4j.properties].
[2014-12-10 01:03:20,329]  INFO - [CartridgeAgentConfiguration] COMMIT_ENABLED is not found and setting it to false
[2014-12-10 01:03:20,331]  INFO - [CartridgeAgentConfiguration] Cartridge agent configuration initialized
[2014-12-10 01:03:20,609]  INFO - [CartridgeAgent] Martin Cartridge agent started 0
[2014-12-10 01:03:20,624]  INFO - [CartridgeAgent] Starting instance notifier event message receiver thread
[2014-12-10 01:03:20,705]  INFO - [InstanceNotifierEventMessageDelegator] Instance notifier event message delegator started
age receiver thread
2014-12-10 01:03:20,705 [-] [Thread-4]  INFO InstanceNotifierEventMessageDelegator Instance notifier event message delegator started


Code snipplet:
…
public void run() {
        if (log.isInfoEnabled()) {
            log.info<http://log.info>("Martin Cartridge agent started 0");
        }

        validateRequiredSystemProperties();

        // Start instance notifier listener thread
        portsActivated = false;
        subscribeToTopicsAndRegisterListeners();

        if (log.isInfoEnabled()) {
            log.info<http://log.info>("Martin Cartridge agent started 2");
        }

        // Start topology event receiver thread
        registerTopologyEventListeners();

        if (log.isInfoEnabled()) {
            log.info<http://log.info>("Martin Cartridge agent started 3");
        }

        // Start tenant event receiver thread
        registerTenantEventListeners();

        if (log.isInfoEnabled()) {
            log.info<http://log.info>("Martin Cartridge agent started 4");
        }

                                        // wait till the member spawned event
                                        while (!CartridgeAgentConfiguration.getInstance().isInitialized()) {
                                                            try {
                                                                                if (log.isInfoEnabled()) {
                                                                                                    log.info<http://log.info>("Martin Waiting for Cartridge Agent to be initialized...");
                                                                                }
                                                                                Thread.sleep(1000);
                                                            } catch (InterruptedException ignore) {
                                                            }
                                        }

        …

From: Reka Thirunavukkarasu [mailto:reka@wso2.com<ma...@wso2.com>]
Sent: Tuesday, December 09, 2014 10:02 AM
To: dev
Subject: Re: [Testing] Stratos 4.1.0 Alpha

Hi Martin,

Yah. It is like that..We refer the child policy of group/cluster using the alias of corresponding group/cluster in application.

Thanks,
Reka

On Tue, Dec 9, 2014 at 11:27 PM, Martin Eppel (meppel) <me...@cisco.com>> wrote:
Ok,

Quick question on the deployment policy:
Does a deployment policy childId have to match an alias of a cartridge / group in the application definition – it seems that way looking at your samples ?

Thanks

Martin

"childPolicies": [
        {
            "childId": "mytomcat",

From: Reka Thirunavukkarasu [mailto:reka@wso2.com<ma...@wso2.com>]
Sent: Tuesday, December 09, 2014 8:29 AM

To: dev
Subject: Re: [Testing] Stratos 4.1.0 Alpha


Hi Martin,



Can you pull master and start the initial testing? We were working on 4.1.0-test throughout the day today for several other testing. So i'm not sure how far it is stable now. We thought of merging 4.1.0-test to master by tomorrow after make sure that the flow is working fine.



You can test the following in master

----------------------------------------------



- Application deployment with single group and cartridges with deployment policy at group level or in cartridge level

- Faulty member for independent cluster

- Restoring the same application when stratos restarts



In addition to this 4.1.0-test supports below:

---------------------------------------------------------



- Nested group deployment with policies at any level (group/cluster)

Please note that when you define a policy for a group, all of its children will use the same policy.





We are currently testing on undeployment to wipe the run time when undeploy application, termination behaviour and scaling to get the flow fixed for all of these features. So, these features will not be stable until we fix the flow by verifying the scenarios.



Thanks,

Reka

On Tue, Dec 9, 2014 at 9:21 PM, Martin Eppel (meppel) <me...@cisco.com>> wrote:
Reka,

Should I pull the master or temporary branch (4.1.0-test) ?

Thanks

Martin

From: Reka Thirunavukkarasu [mailto:reka@wso2.com<ma...@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 <re...@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) <me...@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:udara@wso2.com<ma...@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) <me...@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:reka@wso2.com<ma...@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) <me...@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<ma...@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<ma...@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:reka@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) <me...@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:reka@wso2.com<ma...@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<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>




--
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>





--
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

email: lahirus@wso2.com<ma...@wso2.com> blog: http://lahiruwrites.blogspot.com/
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/



--
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

email: lahirus@wso2.com<ma...@wso2.com> blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146



--
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

email: lahirus@wso2.com<ma...@wso2.com> blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146



--
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

email: lahirus@wso2.com<ma...@wso2.com> blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146


Re: [Testing] Stratos 4.1.0 Alpha - 4.1.0-test branch fails to compile

Posted by Imesh Gunaratne <im...@apache.org>.
Hi Martin,

I have now fixed this compilation issue in 4.1.0-test branch. Please take a
pull and re-build.

Thanks