stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Eppel (meppel)" <mep...@cisco.com>
Subject RE: Testing stratos 4.1 - nested grouping fails to deploy with unequal cartridge types ?
Date Fri, 24 Apr 2015 23:15:26 GMT
Hi Reka,

I tried what you suggested - but only with limited success - changing the application name
and alias to make it different from the top level (or parent) group name, alias (see snippet
below). For the full json please see the attached application / cartridge-group.json.
I had an one time success using the proposed naming pattern but subsequent runs failed again
to bring up all 4 cartridge instances (which seems to suggest to me a potential race condition).

What is also interesting is that after un-deploying the application and re-deploying all 
4 cartridge instances come up – see debug log enabled log file wso2carbon-debug-2nd-subscription.log.

I attached the wso2carbon.log from a failed run without debug enabled and one with debug enabled.

Thanks

Martin

{
  "alias": "sub-G1-G2-G3-1-G4",
  "applicationId": "sub-G1-G2-G3-1-G4",
  "components": {
    "cartridges": [],
    "groups": [
      {
        "name": "sub-G1-G2-G3-1",
        "groupMaxInstances": 1,
        "groupMinInstances": 1,
        "alias": "sub-G1-G2-G3-1",
        "cartridges": [],

From: Reka Thirunavukkarasu [mailto:reka@wso2.com]
Sent: Friday, April 24, 2015 1:57 AM
To: dev
Subject: Re: Testing stratos 4.1 - nested grouping fails to deploy with unequal cartridge
types ?

Hi Martin,
Found the issue. It was an issue with your application definition. You were using same Id
for applicationId and the blower group alias. So in this specific case GroupMonitor and ApplicationMonitor
got messed up with this configuration. Please note that it would be better to use GroupName
also a unique value as to avoid confusion in case if the same group used by multiple application.
Please see the configuration below as your one:

{
    "alias": "subscription-G1-G2-G3",
    "applicationId": "subscription-G1-G2-G3",
    "components": {
        "cartridges": [],
        "groups": [
            {
                "name": "subscription-G1-G2-G3",
                "groupMaxInstances": 1,
                "groupMinInstances": 1,
                "alias": "subscription-G1-G2-G3",
                "cartridges": [],
                "groups": [
After i changed it to below configuration, your sample worked fine as attached the UI Topology.

{
    "alias": "subscription-G1-G2-G3-G4",
    "applicationId": "subscription-G1-G2-G3-G4",
    "components": {
        "cartridges": [],
        "groups": [
            {
                "name": "subscription-G1-G2-G3",
                "groupMaxInstances": 1,
                "groupMinInstances": 1,
                "alias": "subscription-G1-G2-G3",
                "cartridges": [],
                "groups": [
Hope this will help you. Will check further whether we need to do the validation. Then we
can find such issues in the application addition itself.
Thanks,
Reka


On Fri, Apr 24, 2015 at 1:22 PM, Reka Thirunavukkarasu <reka@wso2.com<mailto:reka@wso2.com>>
wrote:
Hi Martin,
I didn't encounter such issue, since i constructed a similar sample referring your one, it
worked fine for me. I will check with exactly your sample and update how it goes.
Thanks,
Reka


On Fri, Apr 24, 2015 at 5:33 AM, Martin Eppel (meppel) <meppel@cisco.com<mailto:meppel@cisco.com>>
wrote:
Hi Reka,

I verified the fix and it is working, however while testing the scenario I noticed a different
issue:

When the application is subscribed the very first time after starting up stratos, only 3 of
the 4 cartridge actually spawn an instance (which all become active). However, If I subsequently
remove the application (without restarting stratos) and re-subscribe again all 4 cartridges
spin up an instance.

I attached the log file which has both scenarios (1st subscription of the app and 2nd one)
plus the cartridge groups and application json.

WDYT, is it a configuration error or a possible bug ?

Thanks

Martin

From: Reka Thirunavukkarasu [mailto:reka@wso2.com<mailto:reka@wso2.com>]
Sent: Thursday, April 23, 2015 1:08 AM
To: dev
Subject: Re: Testing stratos 4.1 - nested grouping fails to deploy with unequal cartridge
types ?

Hi Martin,
Identified the bug and fixed it in 2065d7a167b00bbca0a5efe9a1a178521b3bda8a. Please verify
it and update the thread.
Thanks,
Reka

On Thu, Apr 23, 2015 at 11:42 AM, Reka Thirunavukkarasu <reka@wso2.com<mailto:reka@wso2.com>>
wrote:
Hi Martin,
I'm looking into this issue..I have tried a similar sample as your one and got the issue reproduced
in the local setup. It seems to be a bug in our application parser. Will work on further on
this and update the thread..
Thanks,
Reka

On Thu, Apr 23, 2015 at 10:32 AM, Imesh Gunaratne <imesh@apache.org<mailto:imesh@apache.org>>
wrote:
Hi Martin,

Thanks for reporting this problem, we will have a look at this and get back to you soon.

Thanks

On Thu, Apr 23, 2015 at 5:27 AM, Martin Eppel (meppel) <meppel@cisco.com<mailto:meppel@cisco.com>>
wrote:
Hi,

I think I am seeing an issue with nested grouping:

When I define a parent group (no cartridges) and 2 nested children groups, each containing
cartridges with a different types I see an exception that a cartridge group is not defined
in the parent  group :

TID: [0] [STRATOS] [2015-04-22 20:46:58,495] ERROR {org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver}
-  Cartridge c3 not defined in cartridge group: [application] subscription-G1-G2-G3 [cartridge-group-name]
subscription-G1-G2-G3 [cartridge-group-alias] subscription-G1-G2-G3
java.lang.RuntimeException: Cartridge c3 not defined in cartridge group: [application] subscription-G1-G2-G3
[cartridge-group-name] subscription-G1-G2-G3 [cartridge-group-alias] subscription-G1-G2-G3
               at org.apache.stratos.autoscaler.applications.parser.DefaultApplicationParser.validateCartridgeGroupReference(DefaultApplicationParser.java:590)
               at org.apache.stratos.autoscaler.applications.parser.DefaultApplicationParser.parseGroups(DefaultApplicationParser.java:569)

If I define the same cartridge types in both children groups the application deploys fine
(e.g. replace cartridge type c3 / c4 with c1 / c2 in group “multiple-groups-no-startup-G2”,
see …”working”…. Artifacts)

I attached wso2carbon.log / cartridge-group.json and application.json files and all the other
artifacts  to the email.

Also attached the artifacts (cartridge-group / application) and wso2carbon log for the working
case (see …“working”… ) for comparison

I created a JIRA for this issue: https://issues.apache.org/jira/browse/STRATOS-1339

Thanks

Martin



--
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos


--
Reka Thirunavukkarasu
Senior Software Engineer,
WSO2, Inc.:http://wso2.com,
Mobile: +94776442007<tel:%2B94776442007>




--
Reka Thirunavukkarasu
Senior Software Engineer,
WSO2, Inc.:http://wso2.com,
Mobile: +94776442007<tel:%2B94776442007>




--
Reka Thirunavukkarasu
Senior Software Engineer,
WSO2, Inc.:http://wso2.com,
Mobile: +94776442007<tel:%2B94776442007>




--
Reka Thirunavukkarasu
Senior Software Engineer,
WSO2, Inc.:http://wso2.com,
Mobile: +94776442007

Mime
View raw message