Thanks Imesh..Sure..Will need to write unit tests for such complex logic. Will create a jira and track it..
Thanks, Reka On Sun, May 3, 2015 at 5:22 PM, Imesh Gunaratne <[email protected]> wrote: > Hi Reka, > > Great work! May be we could implement some unit tests to verify these > scenarios. > > Thanks > > On Fri, May 1, 2015 at 12:34 PM, Reka Thirunavukkarasu <[email protected]> > wrote: > >> Hi Martin, >> >> On Fri, May 1, 2015 at 7:52 AM, Martin Eppel (meppel) <[email protected]> >> wrote: >> >>> Hi Reka, >>> >>> >>> >>> Why is it circular ? >>> >>> >>> >>> Probably I defined it incorrectly: What I want is the following start up >>> sequence: >>> >>> >>> >>> After group n-st-G2-t-a-2 starts up c3 should start up, when c3 is up >>> then c2, when c2 is up, then c1 should start up. (n-st-G2-t-a-2 -> c3 -> >>> c2 -> c1) >>> >> >> Got it now. It is a linear startupOrder and can be defined as >> n-st-G2-t-a-2,c3,c2,c1. >> But what you have defined, should also work. I have checked the code and >> fixed a bug as we don't preserve the orders of the startup pattern. >> >> I have fixed it in ae89ba09491891512a9bc89e080577c565ebe8b7 by using >> LinkedHashSet. I have verified it using your similar cartridge-group. It is >> working fine now. >> >> Thanks, >> Reka >> >>> >>> >>> I am probably too tired and can’t the see the correct solution J >>> >>> >>> >>> Thanks >>> >>> >>> >>> Martin >>> >>> >>> >>> >>> >>> *From:* Reka Thirunavukkarasu [mailto:[email protected]] >>> *Sent:* Thursday, April 30, 2015 6:50 PM >>> *To:* dev >>> *Subject:* Re: Testing Stratos 4.1 - Exception when defining startup >>> order, not sure what's wrong ? >>> >>> >>> >>> Hi Martin, >>> >>> We don't support any cycle in the startupOrder. It should be liner array >>> where you can plug each string array either to a new branch in the >>> dependency tree or to an existing node. Can you explain the startupOrder >>> pattern of those cartridges and groups? So that i can help on how to define >>> it in the application? >>> >>> Thanks, >>> >>> Reka >>> >>> >>> >>> On Fri, May 1, 2015 at 6:52 AM, Martin Eppel (meppel) <[email protected]> >>> wrote: >>> >>> Just as an extra pointer, I got the following definition to work (no >>> exception): >>> >>> { >>> >>> "name": "s-n-gr-s-G12-t-a-2", >>> >>> "dependencies": { >>> >>> "terminationBehaviour": "terminate-dependents", >>> >>> "startupOrders": [ >>> >>> "group.n-st-G2-t-a-2-0x0,cartridge.c1-0x0", >>> >>> "cartridge.c1-0x0,cartridge.c2-0x0" >>> >>> ] >>> >>> }, >>> >>> "cartridges": [ >>> >>> "c1", >>> >>> "c2", >>> >>> "c3" >>> >>> ], >>> >>> "groups": [ >>> >>> { >>> >>> "name": "n-st-G2-t-a-2", >>> >>> "dependencies": { >>> >>> "terminationBehaviour": "terminate-all", >>> >>> "startupOrders": [ >>> >>> "cartridge.c5-1x0,cartridge.c4-1x0" >>> >>> ] >>> >>> }, >>> >>> "cartridges": [ >>> >>> "c4", >>> >>> "c5" >>> >>> ], >>> >>> "groups": [] >>> >>> } >>> >>> ] >>> >>> } >>> >>> >>> >>> >>> >>> >>> >>> *From:* Martin Eppel (meppel) >>> *Sent:* Thursday, April 30, 2015 5:48 PM >>> *To:* [email protected] >>> *Subject:* Testing Stratos 4.1 - Exception when defining startup order, >>> not sure what's wrong ? >>> >>> >>> >>> Hi, >>> >>> >>> >>> I am defining the following application (see artifacts attached and >>> screenshot) and get the exception below, however I am not clear what is >>> wrong in the application definition, any pointers are appreciated, >>> >>> >>> >>> Thanks >>> >>> >>> >>> Martin >>> >>> >>> >>> >>> >>> >>> >>> org.apache.stratos.autoscaler.exception.application.DependencyBuilderException: >>> Startup order is not valid. It contains an element which has been defined >>> more than once in another startup order: >>> org.apache.stratos.messaging.domain.application.StartupOrder@143836d >>> >>> at >>> org.apache.stratos.autoscaler.applications.dependency.DependencyBuilder.buildDependency(DependencyBuilder.java:160) >>> >>> at >>> org.apache.stratos.autoscaler.monitor.component.ParentComponentMonitor.<init>(ParentComponentMonitor.java:102) >>> >>> at >>> org.apache.stratos.autoscaler.monitor.component.GroupMonitor.<init>(GroupMonitor.java:86) >>> >>> 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:843) >>> >>> 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) >>> >>> >>> >>> >>> >>> Cartridge groups: >>> >>> >>> >>> *{* >>> >>> * "name": "s-n-gr-s-G12-t-a-2",* >>> >>> * "dependencies": {* >>> >>> * "terminationBehaviour": "terminate-dependents",* >>> >>> * "startupOrders": [* >>> >>> * "group.n-st-G2-t-a-2-0x0,cartridge.c3-0x0",* >>> >>> * "cartridge.c3-0x0,cartridge.c2-0x0",* >>> >>> * "cartridge.c2-0x0,cartridge.c1-0x0"* >>> >>> * ]* >>> >>> * },* >>> >>> * "cartridges": [* >>> >>> * "c1",* >>> >>> * "c2",* >>> >>> * "c3"* >>> >>> * ],* >>> >>> * "groups": [* >>> >>> * {* >>> >>> * "name": "n-st-G2-t-a-2",* >>> >>> * "dependencies": {* >>> >>> * "terminationBehaviour": "terminate-all",* >>> >>> * "startupOrders": [* >>> >>> * "cartridge.c5-1x0,cartridge.c4-1x0"* >>> >>> * ]* >>> >>> * },* >>> >>> * "cartridges": [* >>> >>> * "c4",* >>> >>> * "c5"* >>> >>> * ],* >>> >>> * "groups": []* >>> >>> * }* >>> >>> * ]* >>> >>> *}* >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> -- >>> >>> Reka Thirunavukkarasu >>> Senior Software Engineer, >>> WSO2, Inc.:http://wso2.com, >>> >>> Mobile: +94776442007 >>> >>> >>> >> >> >> >> -- >> Reka Thirunavukkarasu >> Senior Software Engineer, >> WSO2, Inc.:http://wso2.com, >> Mobile: +94776442007 >> >> >> > > > -- > Imesh Gunaratne > > Senior Technical Lead, WSO2 > Committer & PMC Member, Apache Stratos > -- Reka Thirunavukkarasu Senior Software Engineer, WSO2, Inc.:http://wso2.com, Mobile: +94776442007
