stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Eppel (meppel)" <mep...@cisco.com>
Subject jcloud exception when deploying cartridge - was .... RE: className in cartridge definition (branch 4.0.0-grouping)
Date Mon, 06 Oct 2014 19:28:51 GMT
Hi,

When I deploy a cartridge I am getting  a jcould exception as below. It looks I am missing
some definition of an “id” ? The same cartridge definition used to work just a few days
ago (I am working on the 4.0.0-grouping branch which might have been merged with the master).

I am stuck at the moment and can’t figure out what the system is missing, any hint would
be greatly appreciated,

Thanks

Martin

IaasProvider:

    "iaasProvider": [
        {
            "type": "openstack-Core",
            "imageId": "RegionOne/17e9f85b-a849-4c56-9756-6d0f8010e97a",
            "maxInstanceLimit": "4",
            "property": [
                {
                    "name": "instanceType",
                    "value": "RegionOne/81a58aa9-af04-488f-81d1-e529cdc14235"
                },
                {
                    "name": "keyPair",
                    "value": "phoenix"
                },
                {
                    "name": "autoAssignIp",
                    "value": "false"
                },
                {
                    "name": "securityGroups",
                    "value": "default"
                }
            ],
            "networkInterfaces": [
                {
                    "networkUuid": "83a1711a-d99d-4a13-bebc-a7dad39c11a4"
                }
            ]
        }
    ],


Exception:

IaaS:  [ Type: openstack-Core, Name: null, Class Name: org.apache.stratos.cloud.controller.iaases.OpenstackNovaIaas,
Image Id: RegionOne/17e9f85b-a849-4c56-9756-6d0f8010e97a, Max Instance Limit: 4, Provider:
null, Identity: null, Credentials: null, Properties: Property [name=instanceType, value=RegionOne/81a58aa9-af04-488f-81d1-e529cdc14235]
| Property [name=keyPair, value=phoenix] | Property [name=autoAssignIp, value=false] | Property
[name=securityGroups, value=default] |  ]  |
Properties: Property [name=payload_parameter.MB_IP, value=octl.qmog.cisco.com<http://octl.qmog.cisco.com>]
| Property [name=payload_parameter.MB_PORT, value=61616] | Property [name=payload_parameter.CEP_IP,
value=octl.qmog.cisco.com<http://octl.qmog.cisco.com>] | Property [name=payload_parameter.CEP_PORT,
value=7611] | Property [name=payload_parameter.CERT_TRUSTSTORE, value=/opt/apache-stratos-cartridge-agent/security/client-truststore.jks]
| Property [name=payload_parameter.TRUSTSTORE_PASSWORD, value=wso2carbon] | Property [name=payload_parameter.ENABLE_DATA_PUBLISHER,
value=false] | Property [name=payload_parameter.MONITORING_SERVER_IP, value=octl.qmog.cisco.com<http://octl.qmog.cisco.com>]
| Property [name=payload_parameter.MONITORING_SERVER_PORT, value=0] | Property [name=payload_parameter.MONITORING_SERVER_SECURE_PORT,
value=0] | Property [name=payload_parameter.MONITORING_SERVER_ADMIN_USERNAME, value=xxxx]
| Property [name=payload_parameter.MONITORING_SERVER_ADMIN_PASSWORD, value=xxxx] | Property
[name=payload_parameter.SIMPLE_PROPERTY, value=value] |  {org.apache.stratos.cloud.controller.impl.CloudControllerServiceImpl}
TID: [0] [STRATOS] [2014-10-03 23:55:10,731] ERROR {org.apache.stratos.cloud.controller.util.CloudControllerUtil}
-  Unable to build the jclouds object for iaas of type: openstack-Core {org.apache.stratos.cloud.controller.util.CloudControllerUtil}
java.lang.NullPointerException: id must be defined
        at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:229)
        at org.jclouds.providers.ProviderPredicates.id<http://org.jclouds.providers.ProviderPredicates.id>(ProviderPredicates.java:105)
        at org.jclouds.providers.Providers.withId(Providers.java:99)
        at org.jclouds.ContextBuilder.newBuilder(ContextBuilder.java:167)
        at org.apache.stratos.cloud.controller.jcloud.ComputeServiceBuilderUtil.buildDefaultComputeService(ComputeServiceBuilderUtil.java:84)
        at org.apache.stratos.cloud.controller.iaases.OpenstackNovaIaas.buildComputeServiceAndTemplate(OpenstackNovaIaas.java:90)
        at org.apache.stratos.cloud.controller.util.CloudControllerUtil.setIaas(CloudControllerUtil.java:211)
        at org.apache.stratos.cloud.controller.util.CloudControllerUtil.getIaas(CloudControllerUtil.java:224)
        at org.apache.stratos.cloud.controller.impl.CloudControllerServiceImpl.deployCartridgeDefinition(CloudControllerServiceImpl.java:206)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)




From: Martin Eppel (meppel)
Sent: Monday, October 06, 2014 11:11 AM
To: Isuru Haththotuwa
Cc: dev@stratos.apache.org; Reka Thirunavukkarasu (reka@wso2.com)
Subject: RE: className in cartridge definition (branch 4.0.0-grouping)

Have you tried to run this config lately (since last Friday) against the latest grouping-4.0.0
code – my configuration looked similar but started to fail since I pulled the latest code
from the grouping-4.0.0 branch last week Friday (10/03),

Thanks

Martin

From: isuruh@wso2.com<mailto:isuruh@wso2.com> [mailto:isuruh@wso2.com] On Behalf Of
Isuru Haththotuwa
Sent: Monday, October 06, 2014 10:31 AM
To: Martin Eppel (meppel)
Cc: Isuru Haththotuwa; dev@stratos.apache.org<mailto:dev@stratos.apache.org>; Reka Thirunavukkarasu
(reka@wso2.com<mailto:reka@wso2.com>)
Subject: Re: className in cartridge definition (branch 4.0.0-grouping)

Attached a sample cartridge definition. I didn't specifically check this with OpenStack, but
should work.

On Mon, Oct 6, 2014 at 10:48 PM, Martin Eppel (meppel) <meppel@cisco.com<mailto:meppel@cisco.com>>
wrote:
No changes to local code, it might be a missing parameter in the cartridge definition but
I don’t know what it needs to be -  do you have an example of the cartridge definitions
(json) you deploy for the grouping branch, it might help to figure out what I am missing in
my json ?

Thanks

Martin

From: isuruh@wso2.com<mailto:isuruh@wso2.com> [mailto:isuruh@wso2.com<mailto:isuruh@wso2.com>]
On Behalf Of Isuru Haththotuwa
Sent: Monday, October 06, 2014 10:16 AM
To: Martin Eppel (meppel)
Cc: dev@stratos.apache.org<mailto:dev@stratos.apache.org>; Reka Thirunavukkarasu (reka@wso2.com<mailto:reka@wso2.com>)
Subject: Re: className in cartridge definition (branch 4.0.0-grouping)

Hi Martin,
Sorry for the delayed response.
I do not recall seeing this. Do you have any local modifications to the code? From the initial
look, it seems a validation failure; There is a mandatory id, which is missing in this case.

On Sat, Oct 4, 2014 at 5:44 AM, Martin Eppel (meppel) <meppel@cisco.com<mailto:meppel@cisco.com>>
wrote:
Ok, I fixed it (using the full class name helps) but now jcloud is complaining of a missing
id, any idea which property or field is missing or incorrect (and what might be the corresponding
property in openstack, is it “Identity: null” ?) ?

Any json example for 4.1 (or 4.0.0-grouping) openstack cartridge definitions ?

Thanks

Martin

IaaS:  [ Type: openstack-Core, Name: null, Class Name: org.apache.stratos.cloud.controller.iaases.OpenstackNovaIaas,
Image Id: RegionOne/17e9f85b-a849-4c56-9756-6d0f8010e97a, Max Instance Limit: 4, Provider:
null, Identity: null, Credentials: null, Properties: Property [name=instanceType, value=RegionOne/81a58aa9-af04-488f-81d1-e529cdc14235]
| Property [name=keyPair, value=phoenix] | Property [name=autoAssignIp, value=false] | Property
[name=securityGroups, value=default] |  ]  |
Properties: Property [name=payload_parameter.MB_IP, value=octl.qmog.cisco.com<http://octl.qmog.cisco.com>]
| Property [name=payload_parameter.MB_PORT, value=61616] | Property [name=payload_parameter.CEP_IP,
value=octl.qmog.cisco.com<http://octl.qmog.cisco.com>] | Property [name=payload_parameter.CEP_PORT,
value=7611] | Property [name=payload_parameter.CERT_TRUSTSTORE, value=/opt/apache-stratos-cartridge-agent/security/client-truststore.jks]
| Property [name=payload_parameter.TRUSTSTORE_PASSWORD, value=wso2carbon] | Property [name=payload_parameter.ENABLE_DATA_PUBLISHER,
value=false] | Property [name=payload_parameter.MONITORING_SERVER_IP, value=octl.qmog.cisco.com<http://octl.qmog.cisco.com>]
| Property [name=payload_parameter.MONITORING_SERVER_PORT, value=0] | Property [name=payload_parameter.MONITORING_SERVER_SECURE_PORT,
value=0] | Property [name=payload_parameter.MONITORING_SERVER_ADMIN_USERNAME, value=xxxx]
| Property [name=payload_parameter.MONITORING_SERVER_ADMIN_PASSWORD, value=xxxx] | Property
[name=payload_parameter.SIMPLE_PROPERTY, value=value] |  {org.apache.stratos.cloud.controller.impl.CloudControllerServiceImpl}
TID: [0] [STRATOS] [2014-10-03 23:55:10,731] ERROR {org.apache.stratos.cloud.controller.util.CloudControllerUtil}
-  Unable to build the jclouds object for iaas of type: openstack-Core {org.apache.stratos.cloud.controller.util.CloudControllerUtil}
java.lang.NullPointerException: id must be defined
        at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:229)
        at org.jclouds.providers.ProviderPredicates.id<http://org.jclouds.providers.ProviderPredicates.id>(ProviderPredicates.java:105)
        at org.jclouds.providers.Providers.withId(Providers.java:99)
        at org.jclouds.ContextBuilder.newBuilder(ContextBuilder.java:167)
        at org.apache.stratos.cloud.controller.jcloud.ComputeServiceBuilderUtil.buildDefaultComputeService(ComputeServiceBuilderUtil.java:84)
        at org.apache.stratos.cloud.controller.iaases.OpenstackNovaIaas.buildComputeServiceAndTemplate(OpenstackNovaIaas.java:90)
        at org.apache.stratos.cloud.controller.util.CloudControllerUtil.setIaas(CloudControllerUtil.java:211)
        at org.apache.stratos.cloud.controller.util.CloudControllerUtil.getIaas(CloudControllerUtil.java:224)
        at org.apache.stratos.cloud.controller.impl.CloudControllerServiceImpl.deployCartridgeDefinition(CloudControllerServiceImpl.java:206)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
From: Martin Eppel (meppel)
Sent: Friday, October 03, 2014 4:08 PM
To: dev@stratos.apache.org<mailto:dev@stratos.apache.org>
Cc: Isuru Haththotuwa (isuruh@wso2.com<mailto:isuruh@wso2.com>); Reka Thirunavukkarasu
(reka@wso2.com<mailto:reka@wso2.com>)
Subject: className in cartridge definition (branch 4.0.0-grouping)

Hi,

I just noticed that in the 4.0.0-grouping branch (after updating the branch today morning
) we added a check for the className in the cartridge definition. If it’s not defined an
exception is being thrown. In 4.0.0 branch we just checked if it != null and set the Class
but did not thorw an excecption. My question is what needs to be set for the className property
?

I tried to set "className" : "OpenstackNovaIaas", but it failed with an exception, I posted
the IaaSProvider json below,

Any clues what needs to be done  ?

Thanks

Martin

    "iaasProvider": [
        {
            "type": "openstack-Core",
            "imageId": "RegionOne/17e9f85b-a849-4c56-9756-6d0f8010e97a",
            "maxInstanceLimit": "4",
            "className" : "OpenstackNovaIaas",
            "property": [
                {
                    "name": "instanceType",
                    "value": "RegionOne/m1.medium"
                },
                {
                    "name": "keyPair",
                    "value": "phoenix"
                },
                {
                    "name": "autoAssignIp",
                    "value": "false"
                },
                {
                    "name": "securityGroups",
                    "value": "default"
                }
            ],
            "networkInterfaces": [
                {
                    "networkUuid": "83a1711a-d99d-4a13-bebc-a7dad39c11a4"
                }
            ]
        }
    ],

--
Thanks and Regards,

Isuru H.
+94 716 358 048

--

<tel:%2B94%20716%20358%20048>
Thanks and Regards,

Isuru H.

<tel:%2B94%20716%20358%20048>
+94 716 358 048<tel:%2B94%20716%20358%20048>

Mime
View raw message