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) <[email protected]>
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