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

Reply via email to