Hi Reka, Is it not commented out in the Stratos 4.1.x branch[1]. That test under the stratos.application.deployment group. We are running that test in the build.
[1] https://github.com/apache/stratos/blob/stratos-4.1.x/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionRoundRobinClusterTestCase.java Thanks, Gayan On Fri, Oct 30, 2015 at 10:35 AM, Reka Thirunavukkarasu <r...@wso2.com> wrote: > Hi Akila, > > We had a partition round-robin integration test [1]. If that is > successful, then round-robin algo is working fine with partitions. > Unfortunately, the particular logic[2] which verifies the round-robin is > commented out. Can you attach the complete log? > > [1] > https://github.com/apache/stratos/blob/master/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionRoundRobinClusterTest.java > > [2] > https://github.com/apache/stratos/blob/master/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionRoundRobinClusterTest.java#L112 > > Thanks, > Reka > > On Fri, Oct 30, 2015 at 12:17 AM, Akila Ravihansa Perera < > raviha...@wso2.com> wrote: > >> Hi, >> >> I noticed an unexpected behavior when deploying an application with >> network partition having multiple partitions on EC2 platform. >> >> 1. My network partition as follows; >> >> { >> "id": "network-partition-ec2", >> "provider": "ec2", >> "partitions": [ >> { >> "id": "partition-1", >> "property": [ >> { >> "name": "region", >> "value": "ap-southeast-1" >> }, >> { >> "name": "zone", >> "value": "ap-southeast-1a" >> } >> ] >> }, >> { >> "id": "partition-2", >> "property": [ >> { >> "name": "region", >> "value": "ap-southeast-1" >> }, >> { >> "name": "zone", >> "value": "ap-southeast-1b" >> } >> ] >> } >> ] >> >> 2. My deployment policy as follows; >> { >> "id": "deployment-policy-ec2", >> "networkPartitions": [ >> { >> "id": "network-partition-ec2", >> "partitionAlgo": "round-robin", >> "partitions": [ >> { >> "id": "partition-1", >> "partitionMax": 15 >> }, >> { >> "id": "partition-2", >> "partitionMax": 15 >> } >> ] >> } >> ] >> } >> >> 3. My application policy as follows; >> { >> "id": "application-policy-ec2", >> "algorithm": "one-after-another", >> "networkPartitions": [ >> "network-partition-ec2" >> ], >> "properties": [] >> } >> >> 4. My application as follows; >> >> { >> "applicationId": "wso2brs-210-application", >> "alias": "wso2brs-210-application", >> "multiTenant": true, >> "components": { >> "groups": [ >> { >> "name": "wso2brs-210-group", >> "alias": "wso2brs-210-group", >> "deploymentPolicy": "deployment-policy-ec2", >> "groupMinInstances": 1, >> "groupMaxInstances": 1, >> "cartridges": [ >> { >> "type": "wso2brs-210-manager", >> "cartridgeMin": 1, >> "cartridgeMax": 1, >> "subscribableInfo": { >> "alias": "wso2brs-210-manager", >> "autoscalingPolicy": >> "autoscaling-policy-economy" >> } >> }, >> { >> "type": "wso2brs-210-worker", >> "cartridgeMin": 2, >> "cartridgeMax": 2, >> "subscribableInfo": { >> "alias": "wso2brs-210-worker", >> "autoscalingPolicy": >> "autoscaling-policy-economy" >> } >> } >> ] >> } >> ] >> } >> } >> >> Now the problem is when I deploy the application, Stratos always spins >> instances in ap-southeast-1a (partition-1) zone. But according to the >> deployment policy it should select the partition in a round-robin fashion. >> Any idea why it behaves that way? >> >> It should at least spin 2 wso2brs-210-worker instances in partition-1 and >> partition-2. Am I correct to assume that? >> >> Thanks. >> >> >> -- >> Akila Ravihansa Perera >> WSO2 Inc.; http://wso2.com/ >> >> Blog: http://ravihansa3000.blogspot.com >> > > > > -- > Reka Thirunavukkarasu > Senior Software Engineer, > WSO2, Inc.:http://wso2.com, > Mobile: +94776442007 > > > -- Gayan Gunarathne Technical Lead, WSO2 Inc. (http://wso2.com) Committer & PMC Member, Apache Stratos email : gay...@wso2.com | mobile : +94 775030545 <%2B94%20766819985>