Hi Shaheed,
I have found couple of issues in your application definition. You have
given the value "0" to groupMinInstances and groupMaxInstances properties
in all the group references . So No groups being created and execution
stops at that point.
"name":"blade",
"alias":"blade",
"groupMinInstances":0,
"groupMaxInstances":0
Please give a positive numbers to these properties and try again.
And we don't need to specify the application status ("status":"Deployed")
in application definition. It will be set to "Deployed" by auto-scaler once
an application is successfully deployed.
PS - We should modify our addApplication() rest API in a way that the bean
class should not have application status attribute. Otherwise if someone
sets this attribute in application definition, it will cause issues in AS.
Thanks.
On Sun, Mar 22, 2015 at 10:37 PM, Shaheedur Haque (shahhaqu) <
[email protected]> wrote:
> As Raj suggested, I moved forward one commit (I see there may be other
> breaking issues later which are being worked) to:
>
>
>
> commit 7cb908e3cf4ded92afc46a1792b5bf5dfac1d9b2
>
> Author: R-Rajkumar <[email protected]>
>
> Date: Sat Mar 21 06:52:24 2015 +0530
>
>
>
> fixing some issues with n-level-group-nesting and making a sample
>
>
>
> commit 31a157dbf7d341a86781b8b40289205f93599333
>
> Author: R-Rajkumar <[email protected]>
>
> Date: Fri Mar 20 19:51:06 2015 +0530
>
>
>
> fixing an NPE in AS
>
>
>
> And now, the scenario of the first “stuck point” in my email seems to have
> gone, and now all my group start attempts hit the other “stuck point”:
>
>
>
> TID: [0] [STRATOS] [2015-03-22 16:45:15,445] INFO
> {org.apache.stratos.autoscaler.monitor.MonitorFactory} - ClusterMonitor
> created: ClusterMonitor
> [clusterId=group3.cartridge-proxy-1x0.cartridge-proxy.domain,
> hasPrimary=false ]
>
> TID: [0] [STRATOS] [2015-03-22 16:45:15,446] INFO
> {org.apache.stratos.autoscaler.monitor.component.ParentComponentMonitor} -
> Monitor started successfully: [type] cluster [component]
> group3.cartridge-proxy-1x0.cartridge-proxy.domain [dependents] none
> [startup-time] 0 seconds
>
> TID: [0] [STRATOS] [2015-03-22 16:45:15,447] INFO
> {org.apache.stratos.autoscaler.monitor.MonitorFactory} - ClusterMonitor
> created: ClusterMonitor
> [clusterId=group3.cisco-sample-vm-1x0.cisco-sample-vm.domain,
> hasPrimary=false ]
>
> TID: [0] [STRATOS] [2015-03-22 16:45:15,448] INFO
> {org.apache.stratos.autoscaler.monitor.component.ParentComponentMonitor} -
> Monitor started successfully: [type] cluster [component]
> group3.cisco-sample-vm-1x0.cisco-sample-vm.domain [dependents] none
> [startup-time] 0 seconds
>
>
>
> I’m sure I am doing something silly, but I cannot tell what. Advice
> welcome.
>
>
>
> (In the meantime, I’ll pick up the changes Imesh is working on).
>
>
>
> Thanks, Shaheed
>
>
>
>
>
> *From:* Shaheedur Haque (shahhaqu)
> *Sent:* Sunday, March 22, 2015 3:59 PM
> *To:* [email protected]
> *Subject:* RE: Group applications VMs do not start
>
>
>
> Thanks, I’ll give that a spin!
>
>
>
> *From:* Rajkumar Rajaratnam [mailto:[email protected]
> <[email protected]>]
> *Sent:* Sunday, March 22, 2015 1:00 AM
> *To:* [email protected]
> *Subject:* Re: Group applications VMs do not start
>
>
>
> Hi Shaheed,
>
> Please find my comments inline.
>
>
>
> On Sun, Mar 22, 2015 at 5:58 AM, Shaheedur Haque (shahhaqu) <
> [email protected]> wrote:
>
> Hi,
>
>
>
> Thanks to some recent fixes, I can now setup and deploy, undeploy and
> remove 2 and 3 tier group applications (I’ll reply to those threads
> confirming this once I get a bit more testing done). However, none of the
> VMs referenced ever start. I’m on:
>
>
>
> commit 31a157dbf7d341a86781b8b40289205f93599333
>
> Author: R-Rajkumar <[email protected]>
>
> Date: Fri Mar 20 19:51:06 2015 +0530
>
>
>
> fixing an NPE in AS
>
>
>
> You are at one commit before to an important fix.
>
>
>
>
> In some cases, the last entry in the log looks like this (and the number
> of applicationInstances, clusterInstances and members is 0):
>
>
>
> TID: [0] [STRATOS] [2015-03-21 23:52:31,477] INFO
> {org.apache.stratos.manager.components.ApplicationSignUpHandler} -
> Application signup added successfully: [application-id] group3 [tenant-id]
> -1234
>
> TID: [0] [STRATOS] [2015-03-21 23:52:31,477] INFO
> {org.apache.stratos.autoscaler.services.impl.AutoscalerServiceImpl} -
> Application signup added successfully: [application-id] group3
>
> TID: [0] [STRATOS] [2015-03-21 23:52:31,486] INFO
> {org.apache.stratos.autoscaler.services.impl.AutoscalerServiceImpl} - The
> application clusters are not yet created. Waiting for them to be created
>
> TID: [0] [STRATOS] [2015-03-21 23:52:31,487] INFO
> {org.apache.stratos.rest.endpoint.api.StratosApiV41Utils} - Application
> deployed successfully: [application-id] group3
>
>
>
> I have found the reason for this issue and fixed it in the following
> commit. Please take a pull and try again.
>
> commit 7cb908e3cf4ded92afc46a1792b5bf5dfac1d9b2
> Author: R-Rajkumar <[email protected]>
> Date: Sat Mar 21 06:52:24 2015 +0530
>
> fixing some issues with n-level-group-nesting and making a sample
>
>
>
>
> And in other cases, the last entry in the log looks like this (and the
> number of applicationInstances is 1, but clusterInstances and members are
> both zero):
>
>
>
> TID: [0] [STRATOS] [2015-03-21 23:42:07,667] INFO
> {org.apache.stratos.autoscaler.monitor.MonitorFactory} - ClusterMonitor
> created: ClusterMonitor
> [clusterId=group2.cartridge-proxy-1x0.cartridge-proxy.domain,
> hasPrimary=false ]
>
> TID: [0] [STRATOS] [2015-03-21 23:42:07,667] INFO
> {org.apache.stratos.autoscaler.monitor.component.ParentComponentMonitor} -
> Monitor started successfully: [type] cluster [component]
> group2.cartridge-proxy-1x0.cartridge-proxy.domain [dependents]
> group2.cisco-sample-vm-1x0.cisco-sample-vm.domain [startup-time] 0 seconds
>
> TID: [0] [STRATOS] [2015-03-21 23:42:07,675] INFO
> {org.apache.stratos.autoscaler.monitor.MonitorFactory} - ClusterMonitor
> created: ClusterMonitor
> [clusterId=group2.cisco-sample-vm-0x0.cisco-sample-vm.domain,
> hasPrimary=false ]
>
> TID: [0] [STRATOS] [2015-03-21 23:42:07,675] INFO
> {org.apache.stratos.autoscaler.monitor.component.ParentComponentMonitor} -
> Monitor started successfully: [type] cluster [component]
> group2.cisco-sample-vm-0x0.cisco-sample-vm.domain [dependents] none
> [startup-time] 0 seconds
>
>
>
> I guess the most likely explanation is that I am still not constructing
> the Cartridge Group or Application quite correctly. I’ve included below a
> complete pair as shown by the Stratos CLI. Note that there are quite a few
> values which are zero or false…could any of them be the issue?
>
>
>
> I haven't come across this issue. Will look into it.
>
>
>
> stratos> describe-cartridge-group group3
>
> Service Group : group3
>
>
> {"name":"group3","groups":[{"name":"blade","groups":[{"name":"slice","cartridges":["cartridge-proxy","cisco-sample-vm"],"groupScalingEnabled":false,"dependencies":{"startupOrders":["cartridge.cartridge-proxy-2x0,cartridge.cisco-sample-vm-2x0"],"terminationBehaviour":"terminate-none"}}],"cartridges":["cisco-sample-vm","cartridge-proxy"],"groupScalingEnabled":false,"dependencies":{"terminationBehaviour":"terminate-none"}}],"groupScalingEnabled":false,"dependencies":{"terminationBehaviour":"terminate-none"}}
>
>
>
> stratos> describe-application group3
>
> Application: group3
>
>
> {"applicationId":"group3","multiTenant":false,"alias":"group3","status":"Deployed","components":{"groups":[{"name":"group3","alias":"group3","groupMinInstances":0,"groupMaxInstances":0,"isGroupScalingEnabled":false,"groups":[{"name":"blade","alias":"blade","groupMinInstances":0,"groupMaxInstances":0,"isGroupScalingEnabled":false,"cartridges":[{"type":"cisco-sample-vm","cartridgeMin":1,"cartridgeMax":10000000,"subscribableInfo":{"alias":"cisco-sample-vm-1x0","deploymentPolicy":"static-1","autoscalingPolicy":"economyPolicy","maxMembers":0,"minMembers":0,"artifactRepository":{"alias":"cisco-sample-vm-1x0","privateRepo":true,"repoUrl":"
> http://xxx:10080/git/default.git
> ","repoUsername":"user","repoPassword":"c-policy-2"}}},{"type":"cartridge-proxy","cartridgeMin":1,"cartridgeMax":10000000,"subscribableInfo":{"alias":"cartridge-proxy-1x0","deploymentPolicy":"static-1","autoscalingPolicy":"economyPolicy","maxMembers":0,"minMembers":0,"artifactRepository":{"alias":"cartridge-proxy-1x0","privateRepo":true,"repoUrl":"
> http://xxx:10080/git/default.git
> ","repoUsername":"user","repoPassword":"c-policy-2"}}}],"groups":[{"name":"slice","alias":"slice","groupMinInstances":0,"groupMaxInstances":0,"isGroupScalingEnabled":false,"cartridges":[{"type":"cartridge-proxy","cartridgeMin":1,"cartridgeMax":10000000,"subscribableInfo":{"alias":"cartridge-proxy-2x0","deploymentPolicy":"static-1","autoscalingPolicy":"economyPolicy","maxMembers":0,"minMembers":0,"artifactRepository":{"alias":"cartridge-proxy-2x0","privateRepo":true,"repoUrl":"
> http://xxx:10080/git/default.git
> ","repoUsername":"user","repoPassword":"c-policy-1a"}}},{"type":"cisco-sample-vm","cartridgeMin":1,"cartridgeMax":10000000,"subscribableInfo":{"alias":"cisco-sample-vm-2x0","deploymentPolicy":"static-1","autoscalingPolicy":"economyPolicy","maxMembers":0,"minMembers":0,"artifactRepository":{"alias":"cisco-sample-vm-2x0","privateRepo":true,"repoUrl":"
> http://xxx:10080/git/default.git
> ","repoUsername":"user","repoPassword":"c-policy-1b"}}}]}]}]}]}}
>
>
>
> Am I missing some settings? Any advice is most welcome…
>
>
>
> Thanks, Shaheed
>
>
>
> P.S. Also, note how the autoscalingPolicy is economyPolicy? Curiously,
> though I have the logs showing it was added:
>
>
>
> stratos> list-autoscaling-policies
>
> Error in listing autoscaling policies
>
> No autoscaling policies found
>
>
>
> If this is not a related issue, I’ll start another thread for it.
>
>
>
> I guess this is not a related issue.
>
> Thanks.
>
>
>
>
>
>
> --
>
> Rajkumar Rajaratnam
>
> Committer & PMC Member, Apache Stratos
>
> Software Engineer, WSO2
>
> Mobile : +94777568639
>
> Blog : rajkumarr.com
>
--
Rajkumar Rajaratnam
Committer & PMC Member, Apache Stratos
Software Engineer, WSO2
Mobile : +94777568639
Blog : rajkumarr.com