stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Isuru Haththotuwa <isu...@apache.org>
Subject Re: Question (Issue ?): Stratos 4.1 how to describe startup order between 3 cartridges
Date Sat, 28 Mar 2015 12:32:07 GMT
Hi Imesh,

On Sat, Mar 28, 2015 at 3:03 AM, Imesh Gunaratne <imesh@apache.org> wrote:

> I'm also seeing the following warning log saying that it could not change
> the state of the group instance:
>
> [2015-03-28 12:24:18,458]  INFO
> {org.apache.stratos.autoscaler.status.processor.cluster.ClusterStatusActiveProcessor}
> -  Publishing cluster activated event for [application]:
> subscription-c1-c2-c3 [cluster]: subscription-c1-c2-c3.c1-0x0.c1.domain
> [2015-03-28 12:24:18,466]  INFO
> {org.apache.stratos.cloud.controller.messaging.topology.TopologyBuilder} -
>  Cluster activated adding status started for
> subscription-c1-c2-c3.c1-0x0.c1.domain
> [2015-03-28 12:24:18,472]  INFO
> {org.apache.stratos.cloud.controller.messaging.publisher.TopologyEventPublisher}
> -  Publishing cluster activated event: [service-name] c1 [cluster-id]
> subscription-c1-c2-c3.c1-0x0.c1.domain  [instance-id]
> subscription-c1-c2-c3-1 [application-id] subscription-c1-c2-c3
> [2015-03-28 12:24:18,483]  INFO
> {org.apache.stratos.autoscaler.event.receiver.topology.AutoscalerTopologyEventReceiver}
> -  [ClusterActivatedEvent] Received: class
> org.apache.stratos.messaging.event.topology.ClusterInstanceActivatedEvent
> [2015-03-28 12:24:18,483]  INFO
> {org.apache.stratos.autoscaler.monitor.component.ParentComponentMonitor} -
>  No more dependent monitors to be started for component: [type]
> group[component] subscription-c1-c2-c3
> [2015-03-28 12:24:18,483]  WARN
> {org.apache.stratos.autoscaler.status.processor.group.GroupStatusInactiveProcessor}
> -  No possible state change found for [component] subscription-c1-c2-c3
> [instance] subscription-c1-c2-c3-1
>
AFAIR, this log means the state transition happening  is not valid.
However, in the GroupStatusInactiveProcessor's code, this is printed when a
the next processor of the processor chain is null [1]. Might have put this
log there by a mistake.

[1].
        if (nextProcessor != null) {
            // ask the next processor to take care of the message.
            return nextProcessor.process(idOfComponent, appId, instanceId);
        } else {
            log.warn(String.format("No possible state change found for
[component] %s [instance] %s",
                    idOfComponent, instanceId));
        }
I'm now looking into this problem, will provide an update soon.

Thanks

>
> On Sat, Mar 28, 2015 at 12:30 PM, Imesh Gunaratne <imesh@apache.org>
> wrote:
>
>> Hi Martin,
>>
>> I could not find the autoscaling policy and deployment policy in the
>> attached zip file, therefore I used autoscaling-policy-1 and
>> deployment-policy-1 found in samples folder for this test. I also used Mock
>> IaaS and the results were as follows:
>>
>>
>> Due to some reason the group instance (subscription-c1-c2-c3) did not
>> activate even though all three clusters were activated. Was it the same
>> problem you encountered?
>>
>> Thanks
>> ​
>>
>> On Sat, Mar 28, 2015 at 7:22 AM, Martin Eppel (meppel) <meppel@cisco.com>
>> wrote:
>>
>>>  Ok,  never mind than
>>>
>>>
>>>
>>> *From:* Imesh Gunaratne [mailto:imesh@apache.org]
>>> *Sent:* Friday, March 27, 2015 6:21 PM
>>>
>>> *To:* dev
>>> *Subject:* Re: Question (Issue ?): Stratos 4.1 how to describe startup
>>> order between 3 cartridges
>>>
>>>
>>>
>>> Hi Martin,
>>>
>>>
>>>
>>> Thanks for the quick response on this!
>>>
>>> I cannot see any problems in the dependency definition, anyway I will
>>> investigate this further and get back to you soon.
>>>
>>>
>>>
>>> Thanks
>>>
>>>
>>>
>>> On Sat, Mar 28, 2015 at 4:43 AM, Martin Eppel (meppel) <meppel@cisco.com>
>>> wrote:
>>>
>>> Hi Imesh,
>>>
>>>
>>>
>>> Attached are the stratos artefacts for the issue described below
>>> (cartridges c1, c2, c3 , application, cartridge-group). Looking at the
>>> startupOrder in the cartridge group I am not sure that this is proper
>>> stratos way to define multiple dependencies in stratos (I also posted it
>>> right below) ?
>>>
>>>
>>>
>>> Btw,  I couldn’t find a stratos sample which defines dependencies
>>>  between more than 2 cartridges ?
>>>
>>>
>>>
>>> Thanks
>>>
>>>
>>>
>>> Martin
>>>
>>>
>>>
>>> {
>>>
>>>   "name": "subscription-c1-c2-c3",
>>>
>>>   "dependencies": {
>>>
>>>     "terminationBehaviour": "terminate-none",
>>>
>>>     "startupOrders": [
>>>
>>>       "cartridge.c3-0x0,cartridge.c2-0x0",
>>>
>>>       "cartridge.c2-0x0,cartridge.c1-0x0"
>>>
>>>     ]
>>>
>>>   },
>>>
>>>   "cartridges": [
>>>
>>>     "c1",
>>>
>>>     "c2",
>>>
>>>     "c3"
>>>
>>>   ],
>>>
>>>   "groups": []
>>>
>>> }
>>>
>>>
>>>
>>> *From:* Martin Eppel (meppel)
>>> *Sent:* Friday, March 27, 2015 9:57 AM
>>> *To:* dev@stratos.apache.org
>>> *Subject:* RE: Question (Issue ?): Stratos 4.1 how to describe startup
>>> order between 3 cartridges
>>>
>>>
>>>
>>> Hi Imesh,
>>>
>>>
>>>
>>> Thanks for your reply,
>>>
>>> it is interesting I had one better run where I didn’t see the exception
>>> and one VM actually starting up (until it gets stuck in INITIALIZED state).
>>> On a subsequent run however I did encounter the same issue again:
>>>
>>>
>>>
>>> Here are the artefacts:
>>>
>>>
>>>
>>> Application:
>>>
>>>
>>>
>>> {
>>>
>>>   "applicationId": "subscription-c1-c2-c3",
>>>
>>>   "multiTenant": false,
>>>
>>>   "alias": "subscription-c1-c2-c3",
>>>
>>>   "status": "Deployed",
>>>
>>>   "components": {
>>>
>>>     "groups": [
>>>
>>>       {
>>>
>>>         "name": "subscription-c1-c2-c3",
>>>
>>>         "alias": "subscription-c1-c2-c3",
>>>
>>>         "groupMinInstances": 1,
>>>
>>>         "groupMaxInstances": 1,
>>>
>>>         "isGroupScalingEnabled": false,
>>>
>>>         "cartridges": [
>>>
>>>           {
>>>
>>>             "type": "c1",
>>>
>>>             "cartridgeMin": 1,
>>>
>>>             "cartridgeMax": 10000000,
>>>
>>>             "subscribableInfo": {
>>>
>>>               "alias": "c1-0x0",
>>>
>>>               "deploymentPolicy": "static-1",
>>>
>>>               "autoscalingPolicy": "economyPolicy",
>>>
>>>               "maxMembers": 0,
>>>
>>>               "minMembers": 0,
>>>
>>>               "artifactRepository": {
>>>
>>>                 "alias": "c1-0x0",
>>>
>>>                 "privateRepo": true,
>>>
>>>                 "repoUrl": "
>>> http://octl.qmog.cisco.com:10080/git/default.git",
>>>
>>>                 "repoUsername": "user",
>>>
>>>                 "repoPassword": "c-policy"
>>>
>>>               }
>>>
>>>             }
>>>
>>>           },
>>>
>>>           {
>>>
>>>             "type": "c2",
>>>
>>>             "cartridgeMin": 1,
>>>
>>>             "cartridgeMax": 10000000,
>>>
>>>             "subscribableInfo": {
>>>
>>>               "alias": "c2-0x0",
>>>
>>>               "deploymentPolicy": "static-1",
>>>
>>>               "autoscalingPolicy": "economyPolicy",
>>>
>>>               "maxMembers": 0,
>>>
>>>               "minMembers": 0,
>>>
>>>               "artifactRepository": {
>>>
>>>                 "alias": "c2-0x0",
>>>
>>>                 "privateRepo": true,
>>>
>>>                 "repoUrl": "
>>> http://octl.qmog.cisco.com:10080/git/default.git",
>>>
>>>                 "repoUsername": "user",
>>>
>>>                 "repoPassword": "c-policy"
>>>
>>>               }
>>>
>>>             }
>>>
>>>           },
>>>
>>>           {
>>>
>>>             "type": "c3",
>>>
>>>             "cartridgeMin": 1,
>>>
>>>             "cartridgeMax": 10000000,
>>>
>>>             "subscribableInfo": {
>>>
>>>               "alias": "c3-0x0",
>>>
>>>               "deploymentPolicy": "static-1",
>>>
>>>               "autoscalingPolicy": "economyPolicy",
>>>
>>>               "maxMembers": 0,
>>>
>>>               "minMembers": 0,
>>>
>>>               "artifactRepository": {
>>>
>>>                 "alias": "c3-0x0",
>>>
>>>                 "privateRepo": true,
>>>
>>>                 "repoUrl": "
>>> http://octl.qmog.cisco.com:10080/git/default.git",
>>>
>>>                 "repoUsername": "user",
>>>
>>>                 "repoPassword": "c-policy"
>>>
>>>               }
>>>
>>>             }
>>>
>>>           }
>>>
>>>         ]
>>>
>>>       }
>>>
>>>     ]
>>>
>>>   }
>>>
>>> }
>>>
>>>
>>>
>>> Cartridge group:
>>>
>>>
>>>
>>>
>>>
>>> {
>>>
>>>   "name": "subscription-c1-c2-c3",
>>>
>>>   "cartridges": [
>>>
>>>     "c1",
>>>
>>>     "c2",
>>>
>>>     "c3"
>>>
>>>   ],
>>>
>>>   "groupScalingEnabled": false,
>>>
>>>   "dependencies": {
>>>
>>>     "startupOrders": [
>>>
>>>       "cartridge.c3-0x0,cartridge.c2-0x0",
>>>
>>>       "cartridge.c2-0x0,cartridge.c1-0x0"
>>>
>>>     ],
>>>
>>>     "terminationBehaviour": "terminate-none"
>>>
>>>   }
>>>
>>> }
>>>
>>>
>>>
>>> Exception:
>>>
>>>
>>>
>>> TID: [0] [STRATOS] [2015-03-27 16:50:05,601]  INFO
>>> {org.apache.stratos.autoscaler.util.AutoscalerUtil} -  Monitor started
>>> successfully: [application] subscription-c1-c2-c3 [dependents]
>>> subscription-c1-c2-c3 [startup-time] 0 seconds
>>>
>>> TID: [0] [STRATOS] [2015-03-27 16:50:05,604]  INFO
>>> {org.apache.stratos.autoscaler.applications.dependency.DependencyBuilder}
>>> -  Building dependency tree: [application-id] null [component]
>>> subscription-c1-c2-c3
>>>
>>> TID: [0] [STRATOS] [2015-03-27 16:50:05,605]  INFO
>>> {org.apache.stratos.autoscaler.applications.dependency.DependencyBuilder}
>>> -  Setting termination behaviour: [application-id] null [component]
>>> subscription-c1-c2-c3
>>>
>>> TID: [0] [STRATOS] [2015-03-27 16:50:05,605]  INFO
>>> {org.apache.stratos.autoscaler.applications.dependency.DependencyBuilder}
>>> -  Processing startup orders: [application-id] null [component]
>>> subscription-c1-c2-c3
>>>
>>> TID: [0] [STRATOS] [2015-03-27 16:50:05,605]  WARN
>>> {org.apache.stratos.autoscaler.monitor.component.ParentComponentMonitor} -
>>> Monitor creation failed: [type] group [component] subscription-c1-c2-c3
>>>
>>> org.apache.stratos.autoscaler.exception.application.DependencyBuilderException:
>>> Startup order is not consistent. It contains the group/cluster which has
>>> been used more than one in another startup order
>>>
>>>         at
>>> org.apache.stratos.autoscaler.applications.dependency.DependencyBuilder.buildDependency(DependencyBuilder.java:134)
>>>
>>>         at
>>> org.apache.stratos.autoscaler.monitor.component.ParentComponentMonitor.<init>(ParentComponentMonitor.java:104)
>>>
>>>         at
>>> org.apache.stratos.autoscaler.monitor.component.GroupMonitor.<init>(GroupMonitor.java:90)
>>>
>>>         at
>>> org.apache.stratos.autoscaler.monitor.MonitorFactory.getGroupMonitor(MonitorFactory.java:129)
>>>
>>>         at
>>> org.apache.stratos.autoscaler.monitor.MonitorFactory.getMonitor(MonitorFactory.java:81)
>>>
>>>         at
>>> org.apache.stratos.autoscaler.monitor.component.ParentComponentMonitor$MonitorAdder.run(ParentComponentMonitor.java:789)
>>>
>>>         at
>>> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>>>
>>>         at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>>>
>>>         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)
>>>
>>> TID: [0] [STRATOS] [2015-03-27 16:50:05,606] ERROR
>>> {org.apache.stratos.autoscaler.monitor.component.ParentComponentMonitor} -
>>> Monitor creation failed even after retrying for 5 times: [type] group
>>> [component]
>>>
>>>
>>>
>>>
>>>
>>> *From:* Imesh Gunaratne [mailto:imesh@apache.org <imesh@apache.org>]
>>> *Sent:* Friday, March 27, 2015 4:43 AM
>>> *To:* dev
>>> *Subject:* Re: Question (Issue ?): Stratos 4.1 how to describe startup
>>> order between 3 cartridges
>>>
>>>
>>>
>>> Hi Martin,
>>>
>>>
>>>
>>> Have you used the same cartridge aliases found in cartridge group in the
>>> application definition? I guess they are different. Is it possible for you
>>> to share the application artifact?
>>>
>>>
>>>
>>> "startupOrders": [
>>>
>>>       "cartridge.c3-0x0,cartridge.c2-0x0",
>>>
>>>       "cartridge.c2-0x0,cartridge.c1-0x0"
>>>
>>>     ],
>>>
>>>
>>>
>>> Thanks
>>>
>>>
>>>
>>> On Fri, Mar 27, 2015 at 9:53 AM, Martin Eppel (meppel) <meppel@cisco.com>
>>> wrote:
>>>
>>> Hi,
>>>
>>>
>>>
>>> I am trying to define a dependency between 3 cartridges c1, c2, and c3.
>>>
>>>
>>>
>>> C3 should come up first (no dependency), c2 when c3 is active and c1
>>> when c2 is active. Below is my cartridge group definition:
>>>
>>>
>>>
>>> {
>>>
>>>   "name": "subscription-c1-c2-c3",
>>>
>>>   "cartridges": [
>>>
>>>     "c1",
>>>
>>>     "c2",
>>>
>>>     "c3"
>>>
>>>   ],
>>>
>>>   "groupScalingEnabled": false,
>>>
>>>   "dependencies": {
>>>
>>>     "startupOrders": [
>>>
>>>       "cartridge.c3-0x0,cartridge.c2-0x0",
>>>
>>>       "cartridge.c2-0x0,cartridge.c1-0x0"
>>>
>>>     ],
>>>
>>>     "terminationBehaviour": "terminate-none"
>>>
>>>   }
>>>
>>> }
>>>
>>>
>>>
>>>
>>>
>>> However, if I deploy it I get the following exception and no instance is
>>> started:
>>>
>>>
>>>
>>>
>>>
>>> TID: [0] [STRATOS] [2015-03-27 04:11:48,025]  INFO
>>> {org.apache.stratos.autoscaler.monitor.component.ParentComponentMonitor} -
>>> Monitor scheduled: [type] group [component] subscription-c1-c2-c3
>>>
>>> TID: [0] [STRATOS] [2015-03-27 04:11:48,026]  INFO
>>> {org.apache.stratos.autoscaler.monitor.component.ParentComponentMonitor} -
>>> Starting monitor: [type] group [component] subscription-c1-c2-c3
>>>
>>> TID: [0] [STRATOS] [2015-03-27 04:11:48,031]  INFO
>>> {org.apache.stratos.autoscaler.util.AutoscalerUtil} -  Monitor started
>>> successfully: [application] subscription-c1-c2-c3 [dependents]
>>> subscription-c1-c2-c3 [startup-time] 0 seconds
>>>
>>> TID: [0] [STRATOS] [2015-03-27 04:11:48,038]  INFO
>>> {org.apache.stratos.autoscaler.applications.dependency.DependencyBuilder}
>>> -  Building dependency tree: [application-id] null [component]
>>> subscription-c1-c2-c3
>>>
>>> TID: [0] [STRATOS] [2015-03-27 04:11:48,039]  INFO
>>> {org.apache.stratos.autoscaler.applications.dependency.DependencyBuilder}
>>> -  Setting termination behaviour: [application-id] null [component]
>>> subscription-c1-c2-c3
>>>
>>> TID: [0] [STRATOS] [2015-03-27 04:11:48,039]  INFO
>>> {org.apache.stratos.autoscaler.applications.dependency.DependencyBuilder}
>>> -  Processing startup orders: [application-id] null [component]
>>> subscription-c1-c2-c3
>>>
>>> TID: [0] [STRATOS] [2015-03-27 04:11:48,040]  WARN
>>> {org.apache.stratos.autoscaler.monitor.component.ParentComponentMonitor} -
>>> Monitor creation failed: [type] group [component] subscription-c1-c2-c3
>>>
>>> org.apache.stratos.autoscaler.exception.application.DependencyBuilderException:
>>> Startup order is not consistent. It contains the group/cluster which has
>>> been used more than one in another startup order
>>>
>>>                at
>>> org.apache.stratos.autoscaler.applications.dependency.DependencyBuilder.buildDependency(DependencyBuilder.java:134)
>>>
>>>                at
>>> org.apache.stratos.autoscaler.monitor.component.ParentComponentMonitor.<init>(ParentComponentMonitor.java:104)
>>>
>>>                at
>>> org.apache.stratos.autoscaler.monitor.component.GroupMonitor.<init>(GroupMonitor.java:90)
>>>
>>>                at
>>> org.apache.stratos.autoscaler.monitor.MonitorFactory.getGroupMonitor(MonitorFactory.java:129)
>>>
>>>                at
>>> org.apache.stratos.autoscaler.monitor.MonitorFactory.getMonitor(MonitorFactory.java:81)
>>>
>>>                at
>>> org.apache.stratos.autoscaler.monitor.component.ParentComponentMonitor$MonitorAdder.run(ParentComponentMonitor.java:789)
>>>
>>>                at
>>> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>>>
>>>                at
>>> java.util.concurrent.FutureTask.run(FutureTask.java:262)
>>>
>>>                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)
>>>
>>> TID: [0] [STRATOS] [2015-03-27 04:11:48,040] ERROR
>>> {org.apache.stratos.autoscaler.monitor.component.ParentComponentMonitor} -
>>> Monitor creation failed even after retrying for 5 times: [type] group
>>> [component]
>>>
>>>
>>>
>>>
>>>
>>> Unfortunately, the examples don’t show more than 2 dependent cartridges,
>>> what is the proper way to define this ?
>>>
>>>
>>>
>>> Just in case, I attached the full log to the email
>>>
>>>
>>>
>>> Thanks
>>>
>>>
>>>
>>> Martin
>>>
>>>
>>>
>>>
>>>
>>> --
>>>
>>> Imesh Gunaratne
>>>
>>>
>>>
>>> Technical Lead, WSO2
>>>
>>> Committer & PMC Member, Apache Stratos
>>>
>>>
>>>
>>>
>>>
>>> --
>>>
>>> Imesh Gunaratne
>>>
>>>
>>>
>>> Technical Lead, WSO2
>>>
>>> Committer & PMC Member, Apache Stratos
>>>
>>
>>
>>
>> --
>> Imesh Gunaratne
>>
>> Technical Lead, WSO2
>> Committer & PMC Member, Apache Stratos
>>
>
>
>
> --
> Imesh Gunaratne
>
> Technical Lead, WSO2
> Committer & PMC Member, Apache Stratos
>
> --
> Thanks and Regards,
>
> Isuru H.
> +94 716 358 048* <http://wso2.com/>*
>
>
> * <http://wso2.com/>*
>
>
>

Mime
View raw message