You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Lahiru Sandaruwan <la...@wso2.com> on 2015/03/18 03:27:00 UTC

Persistence Volume Mapping support

Hi devs,

I'm working on $subject. We have had this feature in 4.0.0 version in
cartridge definition and later moved to subscription section. But we have
missed this feature when we moving subscription parameters to Application
in new model.

I will update this thread as i progress.

Thanks.


-- 
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

phone: +94773325954
email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146

Re: Persistence Volume Mapping support

Posted by Lahiru Sandaruwan <la...@wso2.com>.
Hi Shaheed,

I have tried with single-cartridge application with following modification,

{
    "applicationId": "single-cartridge-app",
    "alias": "single-cartridge-app",
    "multiTenant": false,
    "components": {
        "cartridges": [
            {
                "type": "php",
                "cartridgeMin": 1,
                "cartridgeMax": 2,
                "subscribableInfo": {
                    "alias": "my-php",
                    "autoscalingPolicy": "autoscaling-policy-1",
                    "deploymentPolicy": "deployment-policy-1",
                    "artifactRepository": {
                        "privateRepo": false,
                        "repoUrl": "
https://github.com/imesh/stratos-php-applications.git",
                        "repoUsername": "",
                        "repoPassword": ""
                    },
*                    "persistence": {*
*                        "volume" : [*
*                                {*
*                                        "id":
"2343dfb1-ad74-4649-9329-3f435b8b1bae",*
*                                        "device": "/dev/vdb",*
*                                        "size": "1",*
*                                        "removeOnTermination": "true"*
*                                }*
*                        ]*
                    }
                }
            }
        ]
    }
}

Thanks.


On Mon, Mar 23, 2015 at 8:58 PM, Shaheedur Haque (shahhaqu) <
shahhaqu@cisco.com> wrote:

>  Could somebody post an example of the Application JSON needed to specify
> the persistent volume please?
>
>
>
> *From:* Udara Liyanage [mailto:udara@wso2.com]
> *Sent:* Monday, March 23, 2015 11:35 AM
> *To:* dev
> *Subject:* Re: Persistence Volume Mapping support
>
>
>
> Hi Lahiru,
>
>
>
> I was able to create an volume when the snapshot id is null. I get the
> same exception when we provide an existing snapshot id.
>
> I am looking into it and update the thread.
>
>
>
> On Sat, Mar 21, 2015 at 6:20 PM, Udara Liyanage <ud...@wso2.com> wrote:
>
> Hi Lahiru,
>
> May be jcloud upgrade might have an impact.
>
>
>
>
>
> --
>
>
> Udara Liyanage
>
> Software Engineer
>
> WSO2, Inc.: http://wso2.com
>
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
>
> phone: +94 71 443 6897
>



-- 
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

phone: +94773325954
email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146

RE: Persistence Volume Mapping support

Posted by "Shaheedur Haque (shahhaqu)" <sh...@cisco.com>.
Could somebody post an example of the Application JSON needed to specify the persistent volume please?

From: Udara Liyanage [mailto:udara@wso2.com]
Sent: Monday, March 23, 2015 11:35 AM
To: dev
Subject: Re: Persistence Volume Mapping support

Hi Lahiru,

I was able to create an volume when the snapshot id is null. I get the same exception when we provide an existing snapshot id.
I am looking into it and update the thread.

On Sat, Mar 21, 2015 at 6:20 PM, Udara Liyanage <ud...@wso2.com>> wrote:

Hi Lahiru,

May be jcloud upgrade might have an impact.



--

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com<http://wso2.com/>
lean. enterprise. middleware
web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897

RE: Persistence Volume Mapping support

Posted by "Shaheedur Haque (shahhaqu)" <sh...@cisco.com>.
Yes, that makes perfect sense.

Also, can somebody confirm if the properties at this point are supported as per 4.0.0?

From: Lahiru Sandaruwan [mailto:lahirus@wso2.com]
Sent: Wednesday, March 25, 2015 6:23 AM
To: dev
Subject: Re: Persistence Volume Mapping support

Yes, Agree wit Udara,

In case #1 and #3, we might need to mandate the size.

Thanks.

On Wed, Mar 25, 2015 at 11:45 AM, Udara Liyanage <ud...@wso2.com>> wrote:
Hi Imesh,

There are three scenarios. I will explain them

1) You have a volume snapshot and you want to created volumes from that snapshot. In this case you have to specify the snapshotId

  {
                                        "snapshotId":"5659ad7b-2eab-4b1a-8738-40df2b32bfcb",
                                        "device": "/dev/vdc",
"mappingPath": "/home/ubuntu/sdc",
                                        "size": "5",
                                        "removeOnTermination": "true"
                                }

Here Statos will create a volume from the given snaphost with the given size. Here user has to be carefull to give a size equal or larger than the snapshot size, otherwise volume creation is falied since you can not create volumes smaller than the snaphost.

2) You have a precreated volume which you want to attach for the instance.

{
                                        "volumeId":"5659ad7b-2eab-4b1a-8738-40df2b32bfcb",
                                        "device": "/dev/vdc",
"mappingPath": "/home/ubuntu/sdc",
                                        "removeOnTermination": "true"
                                }

Here Stratos will not create any volume, rather it attach the given volume. Here you don't need to provide the size.

3) User want to create a raw volume

{

                                        "device": "/dev/vdc",
"mappingPath": "/home/ubuntu/sdc",
"size": "5",
                                        "removeOnTermination": "true"
                                }

In this scenario a raw volume will be created with the given size.


@Imesh this was the same implementation which was coming from 400.

On Wed, Mar 25, 2015 at 11:36 AM, Imesh Gunaratne <im...@apache.org>> wrote:
Hi Shaheed,

I think the "size" parameter was there in 4.0.0 release, please see [1]. However I agree that it should not raise a NPE if it was not given rather a validation should be done.

Udara: Can you please confirm whether we have done any changes to the persistence definition in 4.1.0?

[1] https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Persistence+Volume+Mapping

Thanks

On Wed, Mar 25, 2015 at 12:10 AM, Shaheedur Haque (shahhaqu) <sh...@cisco.com>> wrote:
Hi,

I finally progressed our other infrastructure to the point where I can usefully test the persistence support. At first, I was confused as to why the volume was not being attached, then I realized I had put the “persistence” JSON in the wrong place. However, when I fixed *that*, I start getting 500/Server Internal Error on Application setup.

The JSON structure I have looks like this:

        "application": {
            "applicationId": "di-000-001",
            "application_template_id": "cisco-qvpc-cf-01-0",
            "multiTenant": false,
            "components": {
                "cartridges": [
                    {
                        "cartridgeMin": 1,
                        "cartridgeMax": 10000000,
                        "type": "cisco-qvpc-cf-01-0",
                        "subscribableInfo": {
                            "deploymentPolicy": "static-1",
                            "artifactRepository": {
                                "repoUrl": "http://octl.qmog.cisco.com:10080/git/default.git",
                                "repoUsername": "user",
                                "privateRepo": true,
                                "repoPassword": "password"
                            },
                            "autoscalingPolicy": "economyPolicy",
                            "alias": "cisco-qvpc-cf-01-0",
                            "property": [
                                {
                                    "name": "payload_parameter.VOLUME_INFO",
                                    "value": "di-000-001:fcd8bc58-844b-4370-816e-7dd6b78ed22a"
                                }
                            ],
                            "persistence": [
                                {
                                    "volume": [
                                        {
                                            "device": "/dev/vdb",
                                            "removeOnTermination": "false",
                                            "volumeId": "fcd8bc58-844b-4370-816e-7dd6b78ed22a"
                                        }
                                    ],
                                    "isRequired": "true"
                                }
                            ]
                        }
                    }
                ]
            },
            "alias": "di-000-001"
        },

Where the “property” list and “persistence” list in red are the new additions. The actual exception is this:

TID: [0] [STRATOS] [2015-03-24 18:30:02,497] ERROR {org.apache.stratos.rest.endpoint.handlers.CustomThrowableExceptionMapper} -  Internal server error
java.lang.NumberFormatException: null
        at java.lang.Integer.parseInt(Integer.java:454)
        at java.lang.Integer.parseInt(Integer.java:527)
        at org.apache.stratos.rest.endpoint.util.converter.ObjectConverter.convertVolumeToStubVolume(ObjectConverter.java:1480)
        at org.apache.stratos.rest.endpoint.util.converter.ObjectConverter.convertSubscribableInfo(ObjectConverter.java:1458)
        at org.apache.stratos.rest.endpoint.util.converter.ObjectConverter.convertCartridgeReferenceBeansToStubCartridgeContexts(ObjectConverter.java:1420)
        at org.apache.stratos.rest.endpoint.util.converter.ObjectConverter.convertApplicationDefinitionToStubApplicationContext(ObjectConverter.java:1226)
        at org.apache.stratos.rest.endpoint.api.StratosApiV41Utils.addApplication(StratosApiV41Utils.java:1074)
        at org.apache.stratos.rest.endpoint.api.StratosApiV41.addApplication(StratosApiV41.java:600)

And that turns out to be this line:

            volumeContext.setSize(Integer.parseInt(volumeBean.getSize()));

which is maybe not surprising since I have not specified a size. But then again, I never used to specify a size. So why has this now become seemingly a required value? Please can you fix this, and otherwise revert any changes to the programming model that are not strictly required.

If any changes *are* required, please explain them as reverse engineering this stuff is just painful.

While we are on this subject, please can somebody confirm that the “property” list as well as the “persistence” list is supported? I’d prefer to get this stuff sorted in one pass if at all possible ☺.

Thanks, Shaheed


From: Udara Liyanage [mailto:udara@wso2.com<ma...@wso2.com>]
Sent: Tuesday, March 24, 2015 3:35 PM
To: dev
Subject: Re: Persistence Volume Mapping support

Hi,

I tested below scenarios and they are working

Create a volume with a given snapshot
Create a raw volume
Attach an existing volume without creating a new volume
Multiple volumes with above three combinations

Then I will test the mounting extension script

On Tue, Mar 24, 2015 at 11:47 AM, Lahiru Sandaruwan <la...@wso2.com>> wrote:
Great.

Thanks.

On Tue, Mar 24, 2015 at 10:16 AM, Udara Liyanage <ud...@wso2.com>> wrote:
Hi,

I think I found the cause for the error. Region value is appended for the instance ID at the time of attaching
RegionOne/1a264759-a7b4-4ab8-b6f6-a6b0624cea79

When I remove the region from the instance ID at debugging. It worked for me.
I will fix it.

On Tue, Mar 24, 2015 at 10:00 AM, Udara Liyanage <ud...@wso2.com>> wrote:
Hi,

I just added a main class inside cc component and start locally. It should pick the current jclouds version ?
However I faced the same issue when I tried with stratos at volume attachment. I will have a look.

On Tue, Mar 24, 2015 at 9:00 AM, Lahiru Sandaruwan <la...@wso2.com>> wrote:
Your client is using the same Jclouds version, that we do?


On Tue, Mar 24, 2015 at 8:27 AM, Udara Liyanage <ud...@wso2.com>> wrote:

Hi Lahiru,

I didn't try with Stratos. I wrote a client to create and attach volumes.
On 24 Mar 2015 07:31, "Lahiru Sandaruwan" <la...@wso2.com>> wrote:


On Tue, Mar 24, 2015 at 7:01 AM, Udara Liyanage <ud...@wso2.com>> wrote:

Hi Lahiru,

I could create a new volume and create a new volume from a snapshot and attach the volume.

Great. So the attaching the volume was successful?  Can you share the json you used?

Thanks.

I will do further testing today and keep the thread updated.



--
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

phone: +94773325954<tel:%2B94773325954>
email: lahirus@wso2.com<ma...@wso2.com> blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146




--
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

phone: +94773325954<tel:%2B94773325954>
email: lahirus@wso2.com<ma...@wso2.com> blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146




--

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com<http://wso2.com/>
lean. enterprise. middleware
web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897<tel:%2B94%2071%20443%206897>



--

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com<http://wso2.com/>
lean. enterprise. middleware
web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897<tel:%2B94%2071%20443%206897>



--
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

phone: +94773325954<tel:%2B94773325954>
email: lahirus@wso2.com<ma...@wso2.com> blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146




--

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com<http://wso2.com/>
lean. enterprise. middleware
web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897<tel:%2B94%2071%20443%206897>



--
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos



--

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com<http://wso2.com/>
lean. enterprise. middleware
web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897



--
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

phone: +94773325954
email: lahirus@wso2.com<ma...@wso2.com> blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146


Re: Persistence Volume Mapping support

Posted by Lahiru Sandaruwan <la...@wso2.com>.
Yes, Agree wit Udara,

In case #1 and #3, we might need to mandate the size.

Thanks.

On Wed, Mar 25, 2015 at 11:45 AM, Udara Liyanage <ud...@wso2.com> wrote:

> Hi Imesh,
>
> There are three scenarios. I will explain them
>
> 1) You have a volume snapshot and you want to created volumes from that
> snapshot. In this case you have to specify the snapshotId
>
>   {
>
> "snapshotId":"5659ad7b-2eab-4b1a-8738-40df2b32bfcb",
>                                         "device": "/dev/vdc",
>  "mappingPath": "/home/ubuntu/sdc",
>                                         "size": "5",
>                                         "removeOnTermination": "true"
>                                 }
>
> Here Statos will create a volume from the given snaphost with the given
> size. Here user has to be carefull to give a size equal or larger than the
> snapshot size, otherwise volume creation is falied since you can not create
> volumes smaller than the snaphost.
>
> 2) You have a precreated volume which you want to attach for the instance.
>
> {
>
> "volumeId":"5659ad7b-2eab-4b1a-8738-40df2b32bfcb",
>                                         "device": "/dev/vdc",
>  "mappingPath": "/home/ubuntu/sdc",
>                                         "removeOnTermination": "true"
>                                 }
>
> Here Stratos will not create any volume, rather it attach the given
> volume. Here you don't need to provide the size.
>
> 3) User want to create a raw volume
>
> {
>
>                                         "device": "/dev/vdc",
>  "mappingPath": "/home/ubuntu/sdc",
> "size": "5",
>                                         "removeOnTermination": "true"
>                                 }
>
> In this scenario a raw volume will be created with the given size.
>
>
> @Imesh this was the same implementation which was coming from 400.
>
> On Wed, Mar 25, 2015 at 11:36 AM, Imesh Gunaratne <im...@apache.org>
> wrote:
>
>> Hi Shaheed,
>>
>> I think the "size" parameter was there in 4.0.0 release, please see [1].
>> However I agree that it should not raise a NPE if it was not given rather a
>> validation should be done.
>>
>> Udara: Can you please confirm whether we have done any changes to the
>> persistence definition in 4.1.0?
>>
>> [1]
>> https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Persistence+Volume+Mapping
>>
>> Thanks
>>
>> On Wed, Mar 25, 2015 at 12:10 AM, Shaheedur Haque (shahhaqu) <
>> shahhaqu@cisco.com> wrote:
>>
>>>  Hi,
>>>
>>>
>>>
>>> I finally progressed our other infrastructure to the point where I can
>>> usefully test the persistence support. At first, I was confused as to why
>>> the volume was not being attached, then I realized I had put the
>>> “persistence” JSON in the wrong place. However, when I fixed **that**,
>>> I start getting 500/Server Internal Error on Application setup.
>>>
>>>
>>>
>>> The JSON structure I have looks like this:
>>>
>>>
>>>
>>>         "application": {
>>>
>>>             "applicationId": "di-000-001",
>>>
>>>             "application_template_id": "cisco-qvpc-cf-01-0",
>>>
>>>             "multiTenant": false,
>>>
>>>             "components": {
>>>
>>>                 "cartridges": [
>>>
>>>                     {
>>>
>>>                         "cartridgeMin": 1,
>>>
>>>                         "cartridgeMax": 10000000,
>>>
>>>                         "type": "cisco-qvpc-cf-01-0",
>>>
>>>                         "subscribableInfo": {
>>>
>>>                             "deploymentPolicy": "static-1",
>>>
>>>                             "artifactRepository": {
>>>
>>>                                 "repoUrl": "
>>> http://octl.qmog.cisco.com:10080/git/default.git",
>>>
>>>                                 "repoUsername": "user",
>>>
>>>                                 "privateRepo": true,
>>>
>>>                                 "repoPassword": "password"
>>>
>>>                             },
>>>
>>>                             "autoscalingPolicy": "economyPolicy",
>>>
>>>                             "alias": "cisco-qvpc-cf-01-0",
>>>
>>>                             "property": [
>>>
>>>                                 {
>>>
>>>                                     "name":
>>> "payload_parameter.VOLUME_INFO",
>>>
>>>                                     "value":
>>> "di-000-001:fcd8bc58-844b-4370-816e-7dd6b78ed22a"
>>>
>>>                                 }
>>>
>>>                             ],
>>>
>>>                             "persistence": [
>>>
>>>                                 {
>>>
>>>                                     "volume": [
>>>
>>>                                         {
>>>
>>>                                             "device": "/dev/vdb",
>>>
>>>                                             "removeOnTermination":
>>> "false",
>>>
>>>                                             "volumeId":
>>> "fcd8bc58-844b-4370-816e-7dd6b78ed22a"
>>>
>>>                                         }
>>>
>>>                                     ],
>>>
>>>                                     "isRequired": "true"
>>>
>>>                                 }
>>>
>>>                             ]
>>>
>>>                         }
>>>
>>>                     }
>>>
>>>                 ]
>>>
>>>             },
>>>
>>>             "alias": "di-000-001"
>>>
>>>         },
>>>
>>>
>>>
>>> Where the “property” list and “persistence” list in red are the new
>>> additions. The actual exception is this:
>>>
>>>
>>>
>>> TID: [0] [STRATOS] [2015-03-24 18:30:02,497] ERROR
>>> {org.apache.stratos.rest.endpoint.handlers.CustomThrowableExceptionMapper}
>>> -  Internal server error
>>>
>>> java.lang.NumberFormatException: null
>>>
>>>         at java.lang.Integer.parseInt(Integer.java:454)
>>>
>>>         at java.lang.Integer.parseInt(Integer.java:527)
>>>
>>>         at
>>> org.apache.stratos.rest.endpoint.util.converter.ObjectConverter.convertVolumeToStubVolume(ObjectConverter.java:1480)
>>>
>>>         at
>>> org.apache.stratos.rest.endpoint.util.converter.ObjectConverter.convertSubscribableInfo(ObjectConverter.java:1458)
>>>
>>>         at
>>> org.apache.stratos.rest.endpoint.util.converter.ObjectConverter.convertCartridgeReferenceBeansToStubCartridgeContexts(ObjectConverter.java:1420)
>>>
>>>         at
>>> org.apache.stratos.rest.endpoint.util.converter.ObjectConverter.convertApplicationDefinitionToStubApplicationContext(ObjectConverter.java:1226)
>>>
>>>         at
>>> org.apache.stratos.rest.endpoint.api.StratosApiV41Utils.addApplication(StratosApiV41Utils.java:1074)
>>>
>>>         at
>>> org.apache.stratos.rest.endpoint.api.StratosApiV41.addApplication(StratosApiV41.java:600)
>>>
>>>
>>>
>>> And that turns out to be this line:
>>>
>>>
>>>
>>>
>>> volumeContext.setSize(Integer.parseInt(volumeBean.getSize()));
>>>
>>>
>>>
>>> which is maybe not surprising since I have not specified a size. But
>>> then again, I never used to specify a size. So why has this now become
>>> seemingly a required value? Please can you fix this, and otherwise revert
>>> any changes to the programming model that are not strictly required.
>>>
>>>
>>>
>>> If any changes **are** required, please explain them as reverse
>>> engineering this stuff is just painful.
>>>
>>>
>>>
>>> While we are on this subject, please can somebody confirm that the
>>> “property” list as well as the “persistence” list is supported? I’d prefer
>>> to get this stuff sorted in one pass if at all possible J.
>>>
>>>
>>>
>>> Thanks, Shaheed
>>>
>>>
>>>
>>>
>>>
>>> *From:* Udara Liyanage [mailto:udara@wso2.com]
>>> *Sent:* Tuesday, March 24, 2015 3:35 PM
>>> *To:* dev
>>> *Subject:* Re: Persistence Volume Mapping support
>>>
>>>
>>>
>>> Hi,
>>>
>>>
>>>
>>> I tested below scenarios and they are working
>>>
>>>
>>>
>>> Create a volume with a given snapshot
>>>
>>> Create a raw volume
>>>
>>> Attach an existing volume without creating a new volume
>>>
>>> Multiple volumes with above three combinations
>>>
>>>
>>>
>>> Then I will test the mounting extension script
>>>
>>>
>>>
>>> On Tue, Mar 24, 2015 at 11:47 AM, Lahiru Sandaruwan <la...@wso2.com>
>>> wrote:
>>>
>>>  Great.
>>>
>>>
>>>
>>> Thanks.
>>>
>>>
>>>
>>> On Tue, Mar 24, 2015 at 10:16 AM, Udara Liyanage <ud...@wso2.com> wrote:
>>>
>>>  Hi,
>>>
>>>
>>>
>>> I think I found the cause for the error. Region value is appended for
>>> the instance ID at the time of attaching
>>>
>>> RegionOne/1a264759-a7b4-4ab8-b6f6-a6b0624cea79
>>>
>>>
>>>
>>> When I remove the region from the instance ID at debugging. It worked
>>> for me.
>>>
>>> I will fix it.
>>>
>>>
>>>
>>> On Tue, Mar 24, 2015 at 10:00 AM, Udara Liyanage <ud...@wso2.com> wrote:
>>>
>>>  Hi,
>>>
>>>
>>>
>>> I just added a main class inside cc component and start locally. It
>>> should pick the current jclouds version ?
>>>
>>> However I faced the same issue when I tried with stratos at volume
>>> attachment. I will have a look.
>>>
>>>
>>>
>>> On Tue, Mar 24, 2015 at 9:00 AM, Lahiru Sandaruwan <la...@wso2.com>
>>> wrote:
>>>
>>>  Your client is using the same Jclouds version, that we do?
>>>
>>>
>>>
>>>
>>>
>>> On Tue, Mar 24, 2015 at 8:27 AM, Udara Liyanage <ud...@wso2.com> wrote:
>>>
>>> Hi Lahiru,
>>>
>>> I didn't try with Stratos. I wrote a client to create and attach volumes.
>>>
>>> On 24 Mar 2015 07:31, "Lahiru Sandaruwan" <la...@wso2.com> wrote:
>>>
>>>
>>>
>>>
>>>
>>> On Tue, Mar 24, 2015 at 7:01 AM, Udara Liyanage <ud...@wso2.com> wrote:
>>>
>>> Hi Lahiru,
>>>
>>> I could create a new volume and create a new volume from a snapshot and
>>> attach the volume.
>>>
>>>
>>>
>>> Great. So the attaching the volume was successful?  Can you share the
>>> json you used?
>>>
>>>
>>>
>>> Thanks.
>>>
>>> I will do further testing today and keep the thread updated.
>>>
>>>
>>>
>>>
>>>
>>> --
>>>
>>> --
>>> Lahiru Sandaruwan
>>>
>>> Committer and PMC member, Apache Stratos,
>>> Senior Software Engineer,
>>> WSO2 Inc., http://wso2.com
>>>
>>> lean.enterprise.middleware
>>>
>>> phone: +94773325954
>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>>
>>> --
>>> Lahiru Sandaruwan
>>>
>>> Committer and PMC member, Apache Stratos,
>>> Senior Software Engineer,
>>> WSO2 Inc., http://wso2.com
>>>
>>> lean.enterprise.middleware
>>>
>>> phone: +94773325954
>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>>
>>>
>>> Udara Liyanage
>>>
>>> Software Engineer
>>>
>>> WSO2, Inc.: http://wso2.com
>>>
>>> lean. enterprise. middleware
>>>
>>> web: http://udaraliyanage.wordpress.com
>>>
>>> phone: +94 71 443 6897
>>>
>>>
>>>
>>>
>>>
>>> --
>>>
>>>
>>> Udara Liyanage
>>>
>>> Software Engineer
>>>
>>> WSO2, Inc.: http://wso2.com
>>>
>>> lean. enterprise. middleware
>>>
>>> web: http://udaraliyanage.wordpress.com
>>>
>>> phone: +94 71 443 6897
>>>
>>>
>>>
>>>
>>>
>>> --
>>>
>>> --
>>> Lahiru Sandaruwan
>>>
>>> Committer and PMC member, Apache Stratos,
>>> Senior Software Engineer,
>>> WSO2 Inc., http://wso2.com
>>>
>>> lean.enterprise.middleware
>>>
>>> phone: +94773325954
>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>>
>>>
>>> Udara Liyanage
>>>
>>> Software Engineer
>>>
>>> WSO2, Inc.: http://wso2.com
>>>
>>> lean. enterprise. middleware
>>>
>>> web: http://udaraliyanage.wordpress.com
>>>
>>> phone: +94 71 443 6897
>>>
>>
>>
>>
>> --
>> Imesh Gunaratne
>>
>> Technical Lead, WSO2
>> Committer & PMC Member, Apache Stratos
>>
>
>
>
> --
>
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>



-- 
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

phone: +94773325954
email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146

Re: Persistence Volume Mapping support

Posted by Udara Liyanage <ud...@wso2.com>.
Hi Imesh,

There are three scenarios. I will explain them

1) You have a volume snapshot and you want to created volumes from that
snapshot. In this case you have to specify the snapshotId

  {

"snapshotId":"5659ad7b-2eab-4b1a-8738-40df2b32bfcb",
                                        "device": "/dev/vdc",
 "mappingPath": "/home/ubuntu/sdc",
                                        "size": "5",
                                        "removeOnTermination": "true"
                                }

Here Statos will create a volume from the given snaphost with the given
size. Here user has to be carefull to give a size equal or larger than the
snapshot size, otherwise volume creation is falied since you can not create
volumes smaller than the snaphost.

2) You have a precreated volume which you want to attach for the instance.

{

"volumeId":"5659ad7b-2eab-4b1a-8738-40df2b32bfcb",
                                        "device": "/dev/vdc",
 "mappingPath": "/home/ubuntu/sdc",
                                        "removeOnTermination": "true"
                                }

Here Stratos will not create any volume, rather it attach the given volume.
Here you don't need to provide the size.

3) User want to create a raw volume

{

                                        "device": "/dev/vdc",
 "mappingPath": "/home/ubuntu/sdc",
"size": "5",
                                        "removeOnTermination": "true"
                                }

In this scenario a raw volume will be created with the given size.


@Imesh this was the same implementation which was coming from 400.

On Wed, Mar 25, 2015 at 11:36 AM, Imesh Gunaratne <im...@apache.org> wrote:

> Hi Shaheed,
>
> I think the "size" parameter was there in 4.0.0 release, please see [1].
> However I agree that it should not raise a NPE if it was not given rather a
> validation should be done.
>
> Udara: Can you please confirm whether we have done any changes to the
> persistence definition in 4.1.0?
>
> [1]
> https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Persistence+Volume+Mapping
>
> Thanks
>
> On Wed, Mar 25, 2015 at 12:10 AM, Shaheedur Haque (shahhaqu) <
> shahhaqu@cisco.com> wrote:
>
>>  Hi,
>>
>>
>>
>> I finally progressed our other infrastructure to the point where I can
>> usefully test the persistence support. At first, I was confused as to why
>> the volume was not being attached, then I realized I had put the
>> “persistence” JSON in the wrong place. However, when I fixed **that**, I
>> start getting 500/Server Internal Error on Application setup.
>>
>>
>>
>> The JSON structure I have looks like this:
>>
>>
>>
>>         "application": {
>>
>>             "applicationId": "di-000-001",
>>
>>             "application_template_id": "cisco-qvpc-cf-01-0",
>>
>>             "multiTenant": false,
>>
>>             "components": {
>>
>>                 "cartridges": [
>>
>>                     {
>>
>>                         "cartridgeMin": 1,
>>
>>                         "cartridgeMax": 10000000,
>>
>>                         "type": "cisco-qvpc-cf-01-0",
>>
>>                         "subscribableInfo": {
>>
>>                             "deploymentPolicy": "static-1",
>>
>>                             "artifactRepository": {
>>
>>                                 "repoUrl": "
>> http://octl.qmog.cisco.com:10080/git/default.git",
>>
>>                                 "repoUsername": "user",
>>
>>                                 "privateRepo": true,
>>
>>                                 "repoPassword": "password"
>>
>>                             },
>>
>>                             "autoscalingPolicy": "economyPolicy",
>>
>>                             "alias": "cisco-qvpc-cf-01-0",
>>
>>                             "property": [
>>
>>                                 {
>>
>>                                     "name":
>> "payload_parameter.VOLUME_INFO",
>>
>>                                     "value":
>> "di-000-001:fcd8bc58-844b-4370-816e-7dd6b78ed22a"
>>
>>                                 }
>>
>>                             ],
>>
>>                             "persistence": [
>>
>>                                 {
>>
>>                                     "volume": [
>>
>>                                         {
>>
>>                                             "device": "/dev/vdb",
>>
>>                                             "removeOnTermination":
>> "false",
>>
>>                                             "volumeId":
>> "fcd8bc58-844b-4370-816e-7dd6b78ed22a"
>>
>>                                         }
>>
>>                                     ],
>>
>>                                     "isRequired": "true"
>>
>>                                 }
>>
>>                             ]
>>
>>                         }
>>
>>                     }
>>
>>                 ]
>>
>>             },
>>
>>             "alias": "di-000-001"
>>
>>         },
>>
>>
>>
>> Where the “property” list and “persistence” list in red are the new
>> additions. The actual exception is this:
>>
>>
>>
>> TID: [0] [STRATOS] [2015-03-24 18:30:02,497] ERROR
>> {org.apache.stratos.rest.endpoint.handlers.CustomThrowableExceptionMapper}
>> -  Internal server error
>>
>> java.lang.NumberFormatException: null
>>
>>         at java.lang.Integer.parseInt(Integer.java:454)
>>
>>         at java.lang.Integer.parseInt(Integer.java:527)
>>
>>         at
>> org.apache.stratos.rest.endpoint.util.converter.ObjectConverter.convertVolumeToStubVolume(ObjectConverter.java:1480)
>>
>>         at
>> org.apache.stratos.rest.endpoint.util.converter.ObjectConverter.convertSubscribableInfo(ObjectConverter.java:1458)
>>
>>         at
>> org.apache.stratos.rest.endpoint.util.converter.ObjectConverter.convertCartridgeReferenceBeansToStubCartridgeContexts(ObjectConverter.java:1420)
>>
>>         at
>> org.apache.stratos.rest.endpoint.util.converter.ObjectConverter.convertApplicationDefinitionToStubApplicationContext(ObjectConverter.java:1226)
>>
>>         at
>> org.apache.stratos.rest.endpoint.api.StratosApiV41Utils.addApplication(StratosApiV41Utils.java:1074)
>>
>>         at
>> org.apache.stratos.rest.endpoint.api.StratosApiV41.addApplication(StratosApiV41.java:600)
>>
>>
>>
>> And that turns out to be this line:
>>
>>
>>
>>             volumeContext.setSize(Integer.parseInt(volumeBean.getSize()));
>>
>>
>>
>> which is maybe not surprising since I have not specified a size. But then
>> again, I never used to specify a size. So why has this now become seemingly
>> a required value? Please can you fix this, and otherwise revert any changes
>> to the programming model that are not strictly required.
>>
>>
>>
>> If any changes **are** required, please explain them as reverse
>> engineering this stuff is just painful.
>>
>>
>>
>> While we are on this subject, please can somebody confirm that the
>> “property” list as well as the “persistence” list is supported? I’d prefer
>> to get this stuff sorted in one pass if at all possible J.
>>
>>
>>
>> Thanks, Shaheed
>>
>>
>>
>>
>>
>> *From:* Udara Liyanage [mailto:udara@wso2.com]
>> *Sent:* Tuesday, March 24, 2015 3:35 PM
>> *To:* dev
>> *Subject:* Re: Persistence Volume Mapping support
>>
>>
>>
>> Hi,
>>
>>
>>
>> I tested below scenarios and they are working
>>
>>
>>
>> Create a volume with a given snapshot
>>
>> Create a raw volume
>>
>> Attach an existing volume without creating a new volume
>>
>> Multiple volumes with above three combinations
>>
>>
>>
>> Then I will test the mounting extension script
>>
>>
>>
>> On Tue, Mar 24, 2015 at 11:47 AM, Lahiru Sandaruwan <la...@wso2.com>
>> wrote:
>>
>>  Great.
>>
>>
>>
>> Thanks.
>>
>>
>>
>> On Tue, Mar 24, 2015 at 10:16 AM, Udara Liyanage <ud...@wso2.com> wrote:
>>
>>  Hi,
>>
>>
>>
>> I think I found the cause for the error. Region value is appended for the
>> instance ID at the time of attaching
>>
>> RegionOne/1a264759-a7b4-4ab8-b6f6-a6b0624cea79
>>
>>
>>
>> When I remove the region from the instance ID at debugging. It worked for
>> me.
>>
>> I will fix it.
>>
>>
>>
>> On Tue, Mar 24, 2015 at 10:00 AM, Udara Liyanage <ud...@wso2.com> wrote:
>>
>>  Hi,
>>
>>
>>
>> I just added a main class inside cc component and start locally. It
>> should pick the current jclouds version ?
>>
>> However I faced the same issue when I tried with stratos at volume
>> attachment. I will have a look.
>>
>>
>>
>> On Tue, Mar 24, 2015 at 9:00 AM, Lahiru Sandaruwan <la...@wso2.com>
>> wrote:
>>
>>  Your client is using the same Jclouds version, that we do?
>>
>>
>>
>>
>>
>> On Tue, Mar 24, 2015 at 8:27 AM, Udara Liyanage <ud...@wso2.com> wrote:
>>
>> Hi Lahiru,
>>
>> I didn't try with Stratos. I wrote a client to create and attach volumes.
>>
>> On 24 Mar 2015 07:31, "Lahiru Sandaruwan" <la...@wso2.com> wrote:
>>
>>
>>
>>
>>
>> On Tue, Mar 24, 2015 at 7:01 AM, Udara Liyanage <ud...@wso2.com> wrote:
>>
>> Hi Lahiru,
>>
>> I could create a new volume and create a new volume from a snapshot and
>> attach the volume.
>>
>>
>>
>> Great. So the attaching the volume was successful?  Can you share the
>> json you used?
>>
>>
>>
>> Thanks.
>>
>> I will do further testing today and keep the thread updated.
>>
>>
>>
>>
>>
>> --
>>
>> --
>> Lahiru Sandaruwan
>>
>> Committer and PMC member, Apache Stratos,
>> Senior Software Engineer,
>> WSO2 Inc., http://wso2.com
>>
>> lean.enterprise.middleware
>>
>> phone: +94773325954
>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>
>>
>>
>>
>>
>>
>>
>> --
>>
>> --
>> Lahiru Sandaruwan
>>
>> Committer and PMC member, Apache Stratos,
>> Senior Software Engineer,
>> WSO2 Inc., http://wso2.com
>>
>> lean.enterprise.middleware
>>
>> phone: +94773325954
>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>
>>
>>
>>
>>
>>
>>
>> --
>>
>>
>> Udara Liyanage
>>
>> Software Engineer
>>
>> WSO2, Inc.: http://wso2.com
>>
>> lean. enterprise. middleware
>>
>> web: http://udaraliyanage.wordpress.com
>>
>> phone: +94 71 443 6897
>>
>>
>>
>>
>>
>> --
>>
>>
>> Udara Liyanage
>>
>> Software Engineer
>>
>> WSO2, Inc.: http://wso2.com
>>
>> lean. enterprise. middleware
>>
>> web: http://udaraliyanage.wordpress.com
>>
>> phone: +94 71 443 6897
>>
>>
>>
>>
>>
>> --
>>
>> --
>> Lahiru Sandaruwan
>>
>> Committer and PMC member, Apache Stratos,
>> Senior Software Engineer,
>> WSO2 Inc., http://wso2.com
>>
>> lean.enterprise.middleware
>>
>> phone: +94773325954
>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>
>>
>>
>>
>>
>>
>>
>> --
>>
>>
>> Udara Liyanage
>>
>> Software Engineer
>>
>> WSO2, Inc.: http://wso2.com
>>
>> lean. enterprise. middleware
>>
>> web: http://udaraliyanage.wordpress.com
>>
>> phone: +94 71 443 6897
>>
>
>
>
> --
> Imesh Gunaratne
>
> Technical Lead, WSO2
> Committer & PMC Member, Apache Stratos
>



-- 

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897

Re: Persistence Volume Mapping support

Posted by Imesh Gunaratne <im...@apache.org>.
Hi Shaheed,

I think the "size" parameter was there in 4.0.0 release, please see [1].
However I agree that it should not raise a NPE if it was not given rather a
validation should be done.

Udara: Can you please confirm whether we have done any changes to the
persistence definition in 4.1.0?

[1]
https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Persistence+Volume+Mapping

Thanks

On Wed, Mar 25, 2015 at 12:10 AM, Shaheedur Haque (shahhaqu) <
shahhaqu@cisco.com> wrote:

>  Hi,
>
>
>
> I finally progressed our other infrastructure to the point where I can
> usefully test the persistence support. At first, I was confused as to why
> the volume was not being attached, then I realized I had put the
> “persistence” JSON in the wrong place. However, when I fixed **that**, I
> start getting 500/Server Internal Error on Application setup.
>
>
>
> The JSON structure I have looks like this:
>
>
>
>         "application": {
>
>             "applicationId": "di-000-001",
>
>             "application_template_id": "cisco-qvpc-cf-01-0",
>
>             "multiTenant": false,
>
>             "components": {
>
>                 "cartridges": [
>
>                     {
>
>                         "cartridgeMin": 1,
>
>                         "cartridgeMax": 10000000,
>
>                         "type": "cisco-qvpc-cf-01-0",
>
>                         "subscribableInfo": {
>
>                             "deploymentPolicy": "static-1",
>
>                             "artifactRepository": {
>
>                                 "repoUrl": "
> http://octl.qmog.cisco.com:10080/git/default.git",
>
>                                 "repoUsername": "user",
>
>                                 "privateRepo": true,
>
>                                 "repoPassword": "password"
>
>                             },
>
>                             "autoscalingPolicy": "economyPolicy",
>
>                             "alias": "cisco-qvpc-cf-01-0",
>
>                             "property": [
>
>                                 {
>
>                                     "name":
> "payload_parameter.VOLUME_INFO",
>
>                                     "value":
> "di-000-001:fcd8bc58-844b-4370-816e-7dd6b78ed22a"
>
>                                 }
>
>                             ],
>
>                             "persistence": [
>
>                                 {
>
>                                     "volume": [
>
>                                         {
>
>                                             "device": "/dev/vdb",
>
>                                             "removeOnTermination":
> "false",
>
>                                             "volumeId":
> "fcd8bc58-844b-4370-816e-7dd6b78ed22a"
>
>                                         }
>
>                                     ],
>
>                                     "isRequired": "true"
>
>                                 }
>
>                             ]
>
>                         }
>
>                     }
>
>                 ]
>
>             },
>
>             "alias": "di-000-001"
>
>         },
>
>
>
> Where the “property” list and “persistence” list in red are the new
> additions. The actual exception is this:
>
>
>
> TID: [0] [STRATOS] [2015-03-24 18:30:02,497] ERROR
> {org.apache.stratos.rest.endpoint.handlers.CustomThrowableExceptionMapper}
> -  Internal server error
>
> java.lang.NumberFormatException: null
>
>         at java.lang.Integer.parseInt(Integer.java:454)
>
>         at java.lang.Integer.parseInt(Integer.java:527)
>
>         at
> org.apache.stratos.rest.endpoint.util.converter.ObjectConverter.convertVolumeToStubVolume(ObjectConverter.java:1480)
>
>         at
> org.apache.stratos.rest.endpoint.util.converter.ObjectConverter.convertSubscribableInfo(ObjectConverter.java:1458)
>
>         at
> org.apache.stratos.rest.endpoint.util.converter.ObjectConverter.convertCartridgeReferenceBeansToStubCartridgeContexts(ObjectConverter.java:1420)
>
>         at
> org.apache.stratos.rest.endpoint.util.converter.ObjectConverter.convertApplicationDefinitionToStubApplicationContext(ObjectConverter.java:1226)
>
>         at
> org.apache.stratos.rest.endpoint.api.StratosApiV41Utils.addApplication(StratosApiV41Utils.java:1074)
>
>         at
> org.apache.stratos.rest.endpoint.api.StratosApiV41.addApplication(StratosApiV41.java:600)
>
>
>
> And that turns out to be this line:
>
>
>
>             volumeContext.setSize(Integer.parseInt(volumeBean.getSize()));
>
>
>
> which is maybe not surprising since I have not specified a size. But then
> again, I never used to specify a size. So why has this now become seemingly
> a required value? Please can you fix this, and otherwise revert any changes
> to the programming model that are not strictly required.
>
>
>
> If any changes **are** required, please explain them as reverse
> engineering this stuff is just painful.
>
>
>
> While we are on this subject, please can somebody confirm that the
> “property” list as well as the “persistence” list is supported? I’d prefer
> to get this stuff sorted in one pass if at all possible J.
>
>
>
> Thanks, Shaheed
>
>
>
>
>
> *From:* Udara Liyanage [mailto:udara@wso2.com]
> *Sent:* Tuesday, March 24, 2015 3:35 PM
> *To:* dev
> *Subject:* Re: Persistence Volume Mapping support
>
>
>
> Hi,
>
>
>
> I tested below scenarios and they are working
>
>
>
> Create a volume with a given snapshot
>
> Create a raw volume
>
> Attach an existing volume without creating a new volume
>
> Multiple volumes with above three combinations
>
>
>
> Then I will test the mounting extension script
>
>
>
> On Tue, Mar 24, 2015 at 11:47 AM, Lahiru Sandaruwan <la...@wso2.com>
> wrote:
>
>  Great.
>
>
>
> Thanks.
>
>
>
> On Tue, Mar 24, 2015 at 10:16 AM, Udara Liyanage <ud...@wso2.com> wrote:
>
>  Hi,
>
>
>
> I think I found the cause for the error. Region value is appended for the
> instance ID at the time of attaching
>
> RegionOne/1a264759-a7b4-4ab8-b6f6-a6b0624cea79
>
>
>
> When I remove the region from the instance ID at debugging. It worked for
> me.
>
> I will fix it.
>
>
>
> On Tue, Mar 24, 2015 at 10:00 AM, Udara Liyanage <ud...@wso2.com> wrote:
>
>  Hi,
>
>
>
> I just added a main class inside cc component and start locally. It should
> pick the current jclouds version ?
>
> However I faced the same issue when I tried with stratos at volume
> attachment. I will have a look.
>
>
>
> On Tue, Mar 24, 2015 at 9:00 AM, Lahiru Sandaruwan <la...@wso2.com>
> wrote:
>
>  Your client is using the same Jclouds version, that we do?
>
>
>
>
>
> On Tue, Mar 24, 2015 at 8:27 AM, Udara Liyanage <ud...@wso2.com> wrote:
>
> Hi Lahiru,
>
> I didn't try with Stratos. I wrote a client to create and attach volumes.
>
> On 24 Mar 2015 07:31, "Lahiru Sandaruwan" <la...@wso2.com> wrote:
>
>
>
>
>
> On Tue, Mar 24, 2015 at 7:01 AM, Udara Liyanage <ud...@wso2.com> wrote:
>
> Hi Lahiru,
>
> I could create a new volume and create a new volume from a snapshot and
> attach the volume.
>
>
>
> Great. So the attaching the volume was successful?  Can you share the json
> you used?
>
>
>
> Thanks.
>
> I will do further testing today and keep the thread updated.
>
>
>
>
>
> --
>
> --
> Lahiru Sandaruwan
>
> Committer and PMC member, Apache Stratos,
> Senior Software Engineer,
> WSO2 Inc., http://wso2.com
>
> lean.enterprise.middleware
>
> phone: +94773325954
> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>
>
>
>
>
>
> --
>
> --
> Lahiru Sandaruwan
>
> Committer and PMC member, Apache Stratos,
> Senior Software Engineer,
> WSO2 Inc., http://wso2.com
>
> lean.enterprise.middleware
>
> phone: +94773325954
> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>
>
>
>
>
>
> --
>
>
> Udara Liyanage
>
> Software Engineer
>
> WSO2, Inc.: http://wso2.com
>
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
>
> phone: +94 71 443 6897
>
>
>
>
>
> --
>
>
> Udara Liyanage
>
> Software Engineer
>
> WSO2, Inc.: http://wso2.com
>
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
>
> phone: +94 71 443 6897
>
>
>
>
>
> --
>
> --
> Lahiru Sandaruwan
>
> Committer and PMC member, Apache Stratos,
> Senior Software Engineer,
> WSO2 Inc., http://wso2.com
>
> lean.enterprise.middleware
>
> phone: +94773325954
> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>
>
>
>
>
>
> --
>
>
> Udara Liyanage
>
> Software Engineer
>
> WSO2, Inc.: http://wso2.com
>
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
>
> phone: +94 71 443 6897
>



-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

RE: Persistence Volume Mapping support

Posted by "Shaheedur Haque (shahhaqu)" <sh...@cisco.com>.
Hi,

I finally progressed our other infrastructure to the point where I can usefully test the persistence support. At first, I was confused as to why the volume was not being attached, then I realized I had put the “persistence” JSON in the wrong place. However, when I fixed *that*, I start getting 500/Server Internal Error on Application setup.

The JSON structure I have looks like this:

        "application": {
            "applicationId": "di-000-001",
            "application_template_id": "cisco-qvpc-cf-01-0",
            "multiTenant": false,
            "components": {
                "cartridges": [
                    {
                        "cartridgeMin": 1,
                        "cartridgeMax": 10000000,
                        "type": "cisco-qvpc-cf-01-0",
                        "subscribableInfo": {
                            "deploymentPolicy": "static-1",
                            "artifactRepository": {
                                "repoUrl": "http://octl.qmog.cisco.com:10080/git/default.git",
                                "repoUsername": "user",
                                "privateRepo": true,
                                "repoPassword": "password"
                            },
                            "autoscalingPolicy": "economyPolicy",
                            "alias": "cisco-qvpc-cf-01-0",
                            "property": [
                                {
                                    "name": "payload_parameter.VOLUME_INFO",
                                    "value": "di-000-001:fcd8bc58-844b-4370-816e-7dd6b78ed22a"
                                }
                            ],
                            "persistence": [
                                {
                                    "volume": [
                                        {
                                            "device": "/dev/vdb",
                                            "removeOnTermination": "false",
                                            "volumeId": "fcd8bc58-844b-4370-816e-7dd6b78ed22a"
                                        }
                                    ],
                                    "isRequired": "true"
                                }
                            ]
                        }
                    }
                ]
            },
            "alias": "di-000-001"
        },

Where the “property” list and “persistence” list in red are the new additions. The actual exception is this:

TID: [0] [STRATOS] [2015-03-24 18:30:02,497] ERROR {org.apache.stratos.rest.endpoint.handlers.CustomThrowableExceptionMapper} -  Internal server error
java.lang.NumberFormatException: null
        at java.lang.Integer.parseInt(Integer.java:454)
        at java.lang.Integer.parseInt(Integer.java:527)
        at org.apache.stratos.rest.endpoint.util.converter.ObjectConverter.convertVolumeToStubVolume(ObjectConverter.java:1480)
        at org.apache.stratos.rest.endpoint.util.converter.ObjectConverter.convertSubscribableInfo(ObjectConverter.java:1458)
        at org.apache.stratos.rest.endpoint.util.converter.ObjectConverter.convertCartridgeReferenceBeansToStubCartridgeContexts(ObjectConverter.java:1420)
        at org.apache.stratos.rest.endpoint.util.converter.ObjectConverter.convertApplicationDefinitionToStubApplicationContext(ObjectConverter.java:1226)
        at org.apache.stratos.rest.endpoint.api.StratosApiV41Utils.addApplication(StratosApiV41Utils.java:1074)
        at org.apache.stratos.rest.endpoint.api.StratosApiV41.addApplication(StratosApiV41.java:600)

And that turns out to be this line:

            volumeContext.setSize(Integer.parseInt(volumeBean.getSize()));

which is maybe not surprising since I have not specified a size. But then again, I never used to specify a size. So why has this now become seemingly a required value? Please can you fix this, and otherwise revert any changes to the programming model that are not strictly required.

If any changes *are* required, please explain them as reverse engineering this stuff is just painful.

While we are on this subject, please can somebody confirm that the “property” list as well as the “persistence” list is supported? I’d prefer to get this stuff sorted in one pass if at all possible ☺.

Thanks, Shaheed


From: Udara Liyanage [mailto:udara@wso2.com]
Sent: Tuesday, March 24, 2015 3:35 PM
To: dev
Subject: Re: Persistence Volume Mapping support

Hi,

I tested below scenarios and they are working

Create a volume with a given snapshot
Create a raw volume
Attach an existing volume without creating a new volume
Multiple volumes with above three combinations

Then I will test the mounting extension script

On Tue, Mar 24, 2015 at 11:47 AM, Lahiru Sandaruwan <la...@wso2.com>> wrote:
Great.

Thanks.

On Tue, Mar 24, 2015 at 10:16 AM, Udara Liyanage <ud...@wso2.com>> wrote:
Hi,

I think I found the cause for the error. Region value is appended for the instance ID at the time of attaching
RegionOne/1a264759-a7b4-4ab8-b6f6-a6b0624cea79

When I remove the region from the instance ID at debugging. It worked for me.
I will fix it.

On Tue, Mar 24, 2015 at 10:00 AM, Udara Liyanage <ud...@wso2.com>> wrote:
Hi,

I just added a main class inside cc component and start locally. It should pick the current jclouds version ?
However I faced the same issue when I tried with stratos at volume attachment. I will have a look.

On Tue, Mar 24, 2015 at 9:00 AM, Lahiru Sandaruwan <la...@wso2.com>> wrote:
Your client is using the same Jclouds version, that we do?


On Tue, Mar 24, 2015 at 8:27 AM, Udara Liyanage <ud...@wso2.com>> wrote:

Hi Lahiru,

I didn't try with Stratos. I wrote a client to create and attach volumes.
On 24 Mar 2015 07:31, "Lahiru Sandaruwan" <la...@wso2.com>> wrote:


On Tue, Mar 24, 2015 at 7:01 AM, Udara Liyanage <ud...@wso2.com>> wrote:

Hi Lahiru,

I could create a new volume and create a new volume from a snapshot and attach the volume.

Great. So the attaching the volume was successful?  Can you share the json you used?

Thanks.

I will do further testing today and keep the thread updated.



--
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

phone: +94773325954<tel:%2B94773325954>
email: lahirus@wso2.com<ma...@wso2.com> blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146




--
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

phone: +94773325954<tel:%2B94773325954>
email: lahirus@wso2.com<ma...@wso2.com> blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146




--

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com<http://wso2.com/>
lean. enterprise. middleware
web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897



--

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com<http://wso2.com/>
lean. enterprise. middleware
web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897



--
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

phone: +94773325954<tel:%2B94773325954>
email: lahirus@wso2.com<ma...@wso2.com> blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146




--

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com<http://wso2.com/>
lean. enterprise. middleware
web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897

Re: Persistence Volume Mapping support

Posted by Udara Liyanage <ud...@wso2.com>.
Hi,

I tested below scenarios and they are working

Create a volume with a given snapshot
Create a raw volume
Attach an existing volume without creating a new volume
Multiple volumes with above three combinations

Then I will test the mounting extension script

On Tue, Mar 24, 2015 at 11:47 AM, Lahiru Sandaruwan <la...@wso2.com>
wrote:

> Great.
>
> Thanks.
>
> On Tue, Mar 24, 2015 at 10:16 AM, Udara Liyanage <ud...@wso2.com> wrote:
>
>> Hi,
>>
>> I think I found the cause for the error. Region value is appended for the
>> instance ID at the time of attaching
>> RegionOne/1a264759-a7b4-4ab8-b6f6-a6b0624cea79
>>
>> When I remove the region from the instance ID at debugging. It worked for
>> me.
>> I will fix it.
>>
>> On Tue, Mar 24, 2015 at 10:00 AM, Udara Liyanage <ud...@wso2.com> wrote:
>>
>>> Hi,
>>>
>>> I just added a main class inside cc component and start locally. It
>>> should pick the current jclouds version ?
>>> However I faced the same issue when I tried with stratos at volume
>>> attachment. I will have a look.
>>>
>>> On Tue, Mar 24, 2015 at 9:00 AM, Lahiru Sandaruwan <la...@wso2.com>
>>> wrote:
>>>
>>>> Your client is using the same Jclouds version, that we do?
>>>>
>>>>
>>>> On Tue, Mar 24, 2015 at 8:27 AM, Udara Liyanage <ud...@wso2.com> wrote:
>>>>
>>>>> Hi Lahiru,
>>>>>
>>>>> I didn't try with Stratos. I wrote a client to create and attach
>>>>> volumes.
>>>>> On 24 Mar 2015 07:31, "Lahiru Sandaruwan" <la...@wso2.com> wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>> On Tue, Mar 24, 2015 at 7:01 AM, Udara Liyanage <ud...@wso2.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi Lahiru,
>>>>>>>
>>>>>>> I could create a new volume and create a new volume from a snapshot
>>>>>>> and attach the volume.
>>>>>>>
>>>>>>
>>>>>> Great. So the attaching the volume was successful?  Can you share the
>>>>>> json you used?
>>>>>>
>>>>>> Thanks.
>>>>>>
>>>>>>> I will do further testing today and keep the thread updated.
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> --
>>>>>> Lahiru Sandaruwan
>>>>>> Committer and PMC member, Apache Stratos,
>>>>>> Senior Software Engineer,
>>>>>> WSO2 Inc., http://wso2.com
>>>>>> lean.enterprise.middleware
>>>>>>
>>>>>> phone: +94773325954
>>>>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>>>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>>>>
>>>>>>
>>>>
>>>>
>>>> --
>>>> --
>>>> Lahiru Sandaruwan
>>>> Committer and PMC member, Apache Stratos,
>>>> Senior Software Engineer,
>>>> WSO2 Inc., http://wso2.com
>>>> lean.enterprise.middleware
>>>>
>>>> phone: +94773325954
>>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>>
>>>>
>>>
>>>
>>> --
>>>
>>> Udara Liyanage
>>> Software Engineer
>>> WSO2, Inc.: http://wso2.com
>>> lean. enterprise. middleware
>>>
>>> web: http://udaraliyanage.wordpress.com
>>> phone: +94 71 443 6897
>>>
>>
>>
>>
>> --
>>
>> Udara Liyanage
>> Software Engineer
>> WSO2, Inc.: http://wso2.com
>> lean. enterprise. middleware
>>
>> web: http://udaraliyanage.wordpress.com
>> phone: +94 71 443 6897
>>
>
>
>
> --
> --
> Lahiru Sandaruwan
> Committer and PMC member, Apache Stratos,
> Senior Software Engineer,
> WSO2 Inc., http://wso2.com
> lean.enterprise.middleware
>
> phone: +94773325954
> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>


-- 

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897

Re: Persistence Volume Mapping support

Posted by Lahiru Sandaruwan <la...@wso2.com>.
Great.

Thanks.

On Tue, Mar 24, 2015 at 10:16 AM, Udara Liyanage <ud...@wso2.com> wrote:

> Hi,
>
> I think I found the cause for the error. Region value is appended for the
> instance ID at the time of attaching
> RegionOne/1a264759-a7b4-4ab8-b6f6-a6b0624cea79
>
> When I remove the region from the instance ID at debugging. It worked for
> me.
> I will fix it.
>
> On Tue, Mar 24, 2015 at 10:00 AM, Udara Liyanage <ud...@wso2.com> wrote:
>
>> Hi,
>>
>> I just added a main class inside cc component and start locally. It
>> should pick the current jclouds version ?
>> However I faced the same issue when I tried with stratos at volume
>> attachment. I will have a look.
>>
>> On Tue, Mar 24, 2015 at 9:00 AM, Lahiru Sandaruwan <la...@wso2.com>
>> wrote:
>>
>>> Your client is using the same Jclouds version, that we do?
>>>
>>>
>>> On Tue, Mar 24, 2015 at 8:27 AM, Udara Liyanage <ud...@wso2.com> wrote:
>>>
>>>> Hi Lahiru,
>>>>
>>>> I didn't try with Stratos. I wrote a client to create and attach
>>>> volumes.
>>>> On 24 Mar 2015 07:31, "Lahiru Sandaruwan" <la...@wso2.com> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Tue, Mar 24, 2015 at 7:01 AM, Udara Liyanage <ud...@wso2.com>
>>>>> wrote:
>>>>>
>>>>>> Hi Lahiru,
>>>>>>
>>>>>> I could create a new volume and create a new volume from a snapshot
>>>>>> and attach the volume.
>>>>>>
>>>>>
>>>>> Great. So the attaching the volume was successful?  Can you share the
>>>>> json you used?
>>>>>
>>>>> Thanks.
>>>>>
>>>>>> I will do further testing today and keep the thread updated.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> --
>>>>> Lahiru Sandaruwan
>>>>> Committer and PMC member, Apache Stratos,
>>>>> Senior Software Engineer,
>>>>> WSO2 Inc., http://wso2.com
>>>>> lean.enterprise.middleware
>>>>>
>>>>> phone: +94773325954
>>>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>>>
>>>>>
>>>
>>>
>>> --
>>> --
>>> Lahiru Sandaruwan
>>> Committer and PMC member, Apache Stratos,
>>> Senior Software Engineer,
>>> WSO2 Inc., http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> phone: +94773325954
>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>
>>>
>>
>>
>> --
>>
>> Udara Liyanage
>> Software Engineer
>> WSO2, Inc.: http://wso2.com
>> lean. enterprise. middleware
>>
>> web: http://udaraliyanage.wordpress.com
>> phone: +94 71 443 6897
>>
>
>
>
> --
>
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>



-- 
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

phone: +94773325954
email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146

Re: Persistence Volume Mapping support

Posted by Udara Liyanage <ud...@wso2.com>.
Hi,

I think I found the cause for the error. Region value is appended for the
instance ID at the time of attaching
RegionOne/1a264759-a7b4-4ab8-b6f6-a6b0624cea79

When I remove the region from the instance ID at debugging. It worked for
me.
I will fix it.

On Tue, Mar 24, 2015 at 10:00 AM, Udara Liyanage <ud...@wso2.com> wrote:

> Hi,
>
> I just added a main class inside cc component and start locally. It should
> pick the current jclouds version ?
> However I faced the same issue when I tried with stratos at volume
> attachment. I will have a look.
>
> On Tue, Mar 24, 2015 at 9:00 AM, Lahiru Sandaruwan <la...@wso2.com>
> wrote:
>
>> Your client is using the same Jclouds version, that we do?
>>
>>
>> On Tue, Mar 24, 2015 at 8:27 AM, Udara Liyanage <ud...@wso2.com> wrote:
>>
>>> Hi Lahiru,
>>>
>>> I didn't try with Stratos. I wrote a client to create and attach volumes.
>>> On 24 Mar 2015 07:31, "Lahiru Sandaruwan" <la...@wso2.com> wrote:
>>>
>>>>
>>>>
>>>> On Tue, Mar 24, 2015 at 7:01 AM, Udara Liyanage <ud...@wso2.com> wrote:
>>>>
>>>>> Hi Lahiru,
>>>>>
>>>>> I could create a new volume and create a new volume from a snapshot
>>>>> and attach the volume.
>>>>>
>>>>
>>>> Great. So the attaching the volume was successful?  Can you share the
>>>> json you used?
>>>>
>>>> Thanks.
>>>>
>>>>> I will do further testing today and keep the thread updated.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> --
>>>> Lahiru Sandaruwan
>>>> Committer and PMC member, Apache Stratos,
>>>> Senior Software Engineer,
>>>> WSO2 Inc., http://wso2.com
>>>> lean.enterprise.middleware
>>>>
>>>> phone: +94773325954
>>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>>
>>>>
>>
>>
>> --
>> --
>> Lahiru Sandaruwan
>> Committer and PMC member, Apache Stratos,
>> Senior Software Engineer,
>> WSO2 Inc., http://wso2.com
>> lean.enterprise.middleware
>>
>> phone: +94773325954
>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>
>>
>
>
> --
>
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>



-- 

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897

Re: Persistence Volume Mapping support

Posted by Udara Liyanage <ud...@wso2.com>.
Hi,

I just added a main class inside cc component and start locally. It should
pick the current jclouds version ?
However I faced the same issue when I tried with stratos at volume
attachment. I will have a look.

On Tue, Mar 24, 2015 at 9:00 AM, Lahiru Sandaruwan <la...@wso2.com> wrote:

> Your client is using the same Jclouds version, that we do?
>
>
> On Tue, Mar 24, 2015 at 8:27 AM, Udara Liyanage <ud...@wso2.com> wrote:
>
>> Hi Lahiru,
>>
>> I didn't try with Stratos. I wrote a client to create and attach volumes.
>> On 24 Mar 2015 07:31, "Lahiru Sandaruwan" <la...@wso2.com> wrote:
>>
>>>
>>>
>>> On Tue, Mar 24, 2015 at 7:01 AM, Udara Liyanage <ud...@wso2.com> wrote:
>>>
>>>> Hi Lahiru,
>>>>
>>>> I could create a new volume and create a new volume from a snapshot and
>>>> attach the volume.
>>>>
>>>
>>> Great. So the attaching the volume was successful?  Can you share the
>>> json you used?
>>>
>>> Thanks.
>>>
>>>> I will do further testing today and keep the thread updated.
>>>>
>>>
>>>
>>>
>>> --
>>> --
>>> Lahiru Sandaruwan
>>> Committer and PMC member, Apache Stratos,
>>> Senior Software Engineer,
>>> WSO2 Inc., http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> phone: +94773325954
>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>
>>>
>
>
> --
> --
> Lahiru Sandaruwan
> Committer and PMC member, Apache Stratos,
> Senior Software Engineer,
> WSO2 Inc., http://wso2.com
> lean.enterprise.middleware
>
> phone: +94773325954
> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>


-- 

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897

Re: Persistence Volume Mapping support

Posted by Lahiru Sandaruwan <la...@wso2.com>.
Your client is using the same Jclouds version, that we do?


On Tue, Mar 24, 2015 at 8:27 AM, Udara Liyanage <ud...@wso2.com> wrote:

> Hi Lahiru,
>
> I didn't try with Stratos. I wrote a client to create and attach volumes.
> On 24 Mar 2015 07:31, "Lahiru Sandaruwan" <la...@wso2.com> wrote:
>
>>
>>
>> On Tue, Mar 24, 2015 at 7:01 AM, Udara Liyanage <ud...@wso2.com> wrote:
>>
>>> Hi Lahiru,
>>>
>>> I could create a new volume and create a new volume from a snapshot and
>>> attach the volume.
>>>
>>
>> Great. So the attaching the volume was successful?  Can you share the
>> json you used?
>>
>> Thanks.
>>
>>> I will do further testing today and keep the thread updated.
>>>
>>
>>
>>
>> --
>> --
>> Lahiru Sandaruwan
>> Committer and PMC member, Apache Stratos,
>> Senior Software Engineer,
>> WSO2 Inc., http://wso2.com
>> lean.enterprise.middleware
>>
>> phone: +94773325954
>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>
>>


-- 
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

phone: +94773325954
email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146

Re: Persistence Volume Mapping support

Posted by Udara Liyanage <ud...@wso2.com>.
Hi Lahiru,

I didn't try with Stratos. I wrote a client to create and attach volumes.
On 24 Mar 2015 07:31, "Lahiru Sandaruwan" <la...@wso2.com> wrote:

>
>
> On Tue, Mar 24, 2015 at 7:01 AM, Udara Liyanage <ud...@wso2.com> wrote:
>
>> Hi Lahiru,
>>
>> I could create a new volume and create a new volume from a snapshot and
>> attach the volume.
>>
>
> Great. So the attaching the volume was successful?  Can you share the json
> you used?
>
> Thanks.
>
>> I will do further testing today and keep the thread updated.
>>
>
>
>
> --
> --
> Lahiru Sandaruwan
> Committer and PMC member, Apache Stratos,
> Senior Software Engineer,
> WSO2 Inc., http://wso2.com
> lean.enterprise.middleware
>
> phone: +94773325954
> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>

Re: Persistence Volume Mapping support

Posted by Lahiru Sandaruwan <la...@wso2.com>.
On Tue, Mar 24, 2015 at 7:01 AM, Udara Liyanage <ud...@wso2.com> wrote:

> Hi Lahiru,
>
> I could create a new volume and create a new volume from a snapshot and
> attach the volume.
>

Great. So the attaching the volume was successful?  Can you share the json
you used?

Thanks.

> I will do further testing today and keep the thread updated.
>



-- 
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

phone: +94773325954
email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146

Re: Persistence Volume Mapping support

Posted by Udara Liyanage <ud...@wso2.com>.
Hi Lahiru,

I could create a new volume and create a new volume from a snapshot and
attach the volume.
I will do further testing today and keep the thread updated.

Re: Persistence Volume Mapping support

Posted by Lahiru Sandaruwan <la...@wso2.com>.
On Mon, Mar 23, 2015 at 5:04 PM, Udara Liyanage <ud...@wso2.com> wrote:

> Hi Lahiru,
>
> I was able to create an volume when the snapshot id is null. I get the
> same exception when we provide an existing snapshot id.
>

Yes Udara, Same happens with volume id, as i already mentioned in a
previous reply. Even though the volume is there, which is already created,
attaching step fails.

Thanks.

> I am looking into it and update the thread.
>
> On Sat, Mar 21, 2015 at 6:20 PM, Udara Liyanage <ud...@wso2.com> wrote:
>
>> Hi Lahiru,
>>
>> May be jcloud upgrade might have an impact.
>>
>
>
>
> --
>
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>



-- 
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

phone: +94773325954
email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146

Re: Persistence Volume Mapping support

Posted by Udara Liyanage <ud...@wso2.com>.
Hi Lahiru,

I was able to create an volume when the snapshot id is null. I get the same
exception when we provide an existing snapshot id.
I am looking into it and update the thread.

On Sat, Mar 21, 2015 at 6:20 PM, Udara Liyanage <ud...@wso2.com> wrote:

> Hi Lahiru,
>
> May be jcloud upgrade might have an impact.
>



-- 

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897

Re: Persistence Volume Mapping support

Posted by Udara Liyanage <ud...@wso2.com>.
Hi Lahiru,

May be jcloud upgrade might have an impact.

Re: Persistence Volume Mapping support

Posted by Lahiru Sandaruwan <la...@wso2.com>.
On Sat, Mar 21, 2015 at 9:18 AM, Imesh Gunaratne <im...@apache.org> wrote:

> Shall we verify whether this works if we use the OpenStack UI to attach
> the volume?
>

Yes Imesh. It works in UI.

>
> Thanks
>
> On Fri, Mar 20, 2015 at 10:42 PM, Lahiru Sandaruwan <la...@wso2.com>
> wrote:
>
>> Hi Udara,
>>
>> I tried that option as well.
>>
>> Issue here is not at volume creation level, but the attachment level.
>> Therefore even we didn't give the ID, it gets the ID of created volume
>> correctly and input to volumeAttach call. My guess is that doesn't pick the
>> correct ID.
>>
>> Thanks.
>>
>> On Fri, Mar 20, 2015 at 10:28 PM, Udara Liyanage <ud...@wso2.com> wrote:
>>
>>> Hi Lahiru,
>>>
>>> There is an option to attach an already created volume. You can provide
>>> a known volume I'd and check weather it get attached.
>>> On 20 Mar 2015 21:49, "Lahiru Sandaruwan" <la...@wso2.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> I have completed subscribable info support, and now it passes the
>>>> persistence information to instance creation step correctly.
>>>>
>>>> But it failed to attach the volume to the instance after creating a
>>>> volume successfully. Our code pass the instanceId and volumeId correctly
>>>> for the volume attaching call, as per my debug session.
>>>>
>>>> It seems the value that is passed as volumeId doesn't get the correct
>>>> value and send the same value always.
>>>>
>>>> Their rest API is,
>>>>
>>>> http://<host>:<port>/v2/*<volumeId>*
>>>> /servers/<instanceId>/os-volume_attachments
>>>>
>>>> Error was,
>>>>
>>>> Caused by: org.jclouds.http.HttpResponseException: command: POST
>>>> http://192.168.16.99:8774/v2/*cc9383d8a04f40988f2fcf8aab397551*/servers/RegionOne/33b5057b-7095-4cfc-9e2a-d811cf25051e/os-volume_attachments
>>>> HTTP/1.1 failed with response: HTTP/1.1 404 Not Found
>>>>
>>>> Looking into it. Full error at [1].
>>>>
>>>> Thanks.
>>>> [1]
>>>>
>>>> TID: [0] [STRATOS] [2015-03-20 16:05:52,325] ERROR
>>>> {org.apache.stratos.cloud.controller.services.impl.InstanceCreator} -
>>>>  Could not attache volume, [instance]
>>>> RegionOne/33b5057b-7095-4cfc-9e2a-d811cf25051e [volume] Persistence
>>>> Required: , Size: 1, device: /dev/vdb mapping path : null remove on
>>>> termination true SnaphotId null
>>>> org.jclouds.rest.ResourceNotFoundException: 404 Not Found
>>>>
>>>> The resource could not be found.
>>>>
>>>>
>>>> at
>>>> org.jclouds.openstack.nova.v2_0.handlers.NovaErrorHandler.handleError(NovaErrorHandler.java:97)
>>>> at
>>>> org.jclouds.http.handlers.DelegatingErrorHandler.handleError(DelegatingErrorHandler.java:65)
>>>> at
>>>> org.jclouds.http.internal.BaseHttpCommandExecutorService.shouldContinue(BaseHttpCommandExecutorService.java:128)
>>>> at
>>>> org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:98)
>>>> at
>>>> org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:90)
>>>> at
>>>> org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:73)
>>>> at
>>>> org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:44)
>>>> at
>>>> org.jclouds.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:117)
>>>> at
>>>> com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:87)
>>>> at com.sun.proxy.$Proxy146.attachVolumeToServerAsDevice(Unknown Source)
>>>> at
>>>> org.apache.stratos.cloud.controller.iaases.openstack.OpenstackIaas.attachVolume(OpenstackIaas.java:476)
>>>> at
>>>> org.apache.stratos.cloud.controller.services.impl.InstanceCreator.attachVolumes(InstanceCreator.java:132)
>>>> at
>>>> org.apache.stratos.cloud.controller.services.impl.InstanceCreator.run(InstanceCreator.java:73)
>>>> 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)
>>>> Caused by: org.jclouds.http.HttpResponseException: command: POST
>>>> http://192.168.16.99:8774/v2/cc9383d8a04f40988f2fcf8aab397551/servers/RegionOne/33b5057b-7095-4cfc-9e2a-d811cf25051e/os-volume_attachments
>>>> HTTP/1.1 failed with response: HTTP/1.1 404 Not Found; content: [404 Not
>>>> Found
>>>>
>>>> The resource could not be found.
>>>>
>>>>    ]
>>>> at
>>>> org.jclouds.openstack.nova.v2_0.handlers.NovaErrorHandler.handleError(NovaErrorHandler.java:78)
>>>> ... 15 more
>>>>
>>>> On Wed, Mar 18, 2015 at 8:55 AM, Udara Liyanage <ud...@wso2.com> wrote:
>>>>
>>>>> Hi Lashiru,
>>>>>
>>>>> CC backend supports persistence volume. We need to add this to
>>>>> application subscribable info.
>>>>>
>>>>> On Wed, Mar 18, 2015 at 7:57 AM, Lahiru Sandaruwan <la...@wso2.com>
>>>>> wrote:
>>>>>
>>>>>> Hi devs,
>>>>>>
>>>>>> I'm working on $subject. We have had this feature in 4.0.0 version in
>>>>>> cartridge definition and later moved to subscription section. But we have
>>>>>> missed this feature when we moving subscription parameters to Application
>>>>>> in new model.
>>>>>>
>>>>>> I will update this thread as i progress.
>>>>>>
>>>>>> Thanks.
>>>>>>
>>>>>>
>>>>>> --
>>>>>> --
>>>>>> Lahiru Sandaruwan
>>>>>> Committer and PMC member, Apache Stratos,
>>>>>> Senior Software Engineer,
>>>>>> WSO2 Inc., http://wso2.com
>>>>>> lean.enterprise.middleware
>>>>>>
>>>>>> phone: +94773325954
>>>>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>>>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> Udara Liyanage
>>>>> Software Engineer
>>>>> WSO2, Inc.: http://wso2.com
>>>>> lean. enterprise. middleware
>>>>>
>>>>> web: http://udaraliyanage.wordpress.com
>>>>> phone: +94 71 443 6897
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> --
>>>> Lahiru Sandaruwan
>>>> Committer and PMC member, Apache Stratos,
>>>> Senior Software Engineer,
>>>> WSO2 Inc., http://wso2.com
>>>> lean.enterprise.middleware
>>>>
>>>> phone: +94773325954
>>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>>
>>>>
>>
>>
>> --
>> --
>> Lahiru Sandaruwan
>> Committer and PMC member, Apache Stratos,
>> Senior Software Engineer,
>> WSO2 Inc., http://wso2.com
>> lean.enterprise.middleware
>>
>> phone: +94773325954
>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>
>>
>
>
> --
> Imesh Gunaratne
>
> Technical Lead, WSO2
> Committer & PMC Member, Apache Stratos
>



-- 
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

phone: +94773325954
email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146

Re: Persistence Volume Mapping support

Posted by Imesh Gunaratne <im...@apache.org>.
Shall we verify whether this works if we use the OpenStack UI to attach the
volume?

Thanks

On Fri, Mar 20, 2015 at 10:42 PM, Lahiru Sandaruwan <la...@wso2.com>
wrote:

> Hi Udara,
>
> I tried that option as well.
>
> Issue here is not at volume creation level, but the attachment level.
> Therefore even we didn't give the ID, it gets the ID of created volume
> correctly and input to volumeAttach call. My guess is that doesn't pick the
> correct ID.
>
> Thanks.
>
> On Fri, Mar 20, 2015 at 10:28 PM, Udara Liyanage <ud...@wso2.com> wrote:
>
>> Hi Lahiru,
>>
>> There is an option to attach an already created volume. You can provide a
>> known volume I'd and check weather it get attached.
>> On 20 Mar 2015 21:49, "Lahiru Sandaruwan" <la...@wso2.com> wrote:
>>
>>> Hi,
>>>
>>> I have completed subscribable info support, and now it passes the
>>> persistence information to instance creation step correctly.
>>>
>>> But it failed to attach the volume to the instance after creating a
>>> volume successfully. Our code pass the instanceId and volumeId correctly
>>> for the volume attaching call, as per my debug session.
>>>
>>> It seems the value that is passed as volumeId doesn't get the correct
>>> value and send the same value always.
>>>
>>> Their rest API is,
>>>
>>> http://<host>:<port>/v2/*<volumeId>*
>>> /servers/<instanceId>/os-volume_attachments
>>>
>>> Error was,
>>>
>>> Caused by: org.jclouds.http.HttpResponseException: command: POST
>>> http://192.168.16.99:8774/v2/*cc9383d8a04f40988f2fcf8aab397551*/servers/RegionOne/33b5057b-7095-4cfc-9e2a-d811cf25051e/os-volume_attachments
>>> HTTP/1.1 failed with response: HTTP/1.1 404 Not Found
>>>
>>> Looking into it. Full error at [1].
>>>
>>> Thanks.
>>> [1]
>>>
>>> TID: [0] [STRATOS] [2015-03-20 16:05:52,325] ERROR
>>> {org.apache.stratos.cloud.controller.services.impl.InstanceCreator} -
>>>  Could not attache volume, [instance]
>>> RegionOne/33b5057b-7095-4cfc-9e2a-d811cf25051e [volume] Persistence
>>> Required: , Size: 1, device: /dev/vdb mapping path : null remove on
>>> termination true SnaphotId null
>>> org.jclouds.rest.ResourceNotFoundException: 404 Not Found
>>>
>>> The resource could not be found.
>>>
>>>
>>> at
>>> org.jclouds.openstack.nova.v2_0.handlers.NovaErrorHandler.handleError(NovaErrorHandler.java:97)
>>> at
>>> org.jclouds.http.handlers.DelegatingErrorHandler.handleError(DelegatingErrorHandler.java:65)
>>> at
>>> org.jclouds.http.internal.BaseHttpCommandExecutorService.shouldContinue(BaseHttpCommandExecutorService.java:128)
>>> at
>>> org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:98)
>>> at
>>> org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:90)
>>> at
>>> org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:73)
>>> at
>>> org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:44)
>>> at
>>> org.jclouds.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:117)
>>> at
>>> com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:87)
>>> at com.sun.proxy.$Proxy146.attachVolumeToServerAsDevice(Unknown Source)
>>> at
>>> org.apache.stratos.cloud.controller.iaases.openstack.OpenstackIaas.attachVolume(OpenstackIaas.java:476)
>>> at
>>> org.apache.stratos.cloud.controller.services.impl.InstanceCreator.attachVolumes(InstanceCreator.java:132)
>>> at
>>> org.apache.stratos.cloud.controller.services.impl.InstanceCreator.run(InstanceCreator.java:73)
>>> 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)
>>> Caused by: org.jclouds.http.HttpResponseException: command: POST
>>> http://192.168.16.99:8774/v2/cc9383d8a04f40988f2fcf8aab397551/servers/RegionOne/33b5057b-7095-4cfc-9e2a-d811cf25051e/os-volume_attachments
>>> HTTP/1.1 failed with response: HTTP/1.1 404 Not Found; content: [404 Not
>>> Found
>>>
>>> The resource could not be found.
>>>
>>>    ]
>>> at
>>> org.jclouds.openstack.nova.v2_0.handlers.NovaErrorHandler.handleError(NovaErrorHandler.java:78)
>>> ... 15 more
>>>
>>> On Wed, Mar 18, 2015 at 8:55 AM, Udara Liyanage <ud...@wso2.com> wrote:
>>>
>>>> Hi Lashiru,
>>>>
>>>> CC backend supports persistence volume. We need to add this to
>>>> application subscribable info.
>>>>
>>>> On Wed, Mar 18, 2015 at 7:57 AM, Lahiru Sandaruwan <la...@wso2.com>
>>>> wrote:
>>>>
>>>>> Hi devs,
>>>>>
>>>>> I'm working on $subject. We have had this feature in 4.0.0 version in
>>>>> cartridge definition and later moved to subscription section. But we have
>>>>> missed this feature when we moving subscription parameters to Application
>>>>> in new model.
>>>>>
>>>>> I will update this thread as i progress.
>>>>>
>>>>> Thanks.
>>>>>
>>>>>
>>>>> --
>>>>> --
>>>>> Lahiru Sandaruwan
>>>>> Committer and PMC member, Apache Stratos,
>>>>> Senior Software Engineer,
>>>>> WSO2 Inc., http://wso2.com
>>>>> lean.enterprise.middleware
>>>>>
>>>>> phone: +94773325954
>>>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Udara Liyanage
>>>> Software Engineer
>>>> WSO2, Inc.: http://wso2.com
>>>> lean. enterprise. middleware
>>>>
>>>> web: http://udaraliyanage.wordpress.com
>>>> phone: +94 71 443 6897
>>>>
>>>
>>>
>>>
>>> --
>>> --
>>> Lahiru Sandaruwan
>>> Committer and PMC member, Apache Stratos,
>>> Senior Software Engineer,
>>> WSO2 Inc., http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> phone: +94773325954
>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>
>>>
>
>
> --
> --
> Lahiru Sandaruwan
> Committer and PMC member, Apache Stratos,
> Senior Software Engineer,
> WSO2 Inc., http://wso2.com
> lean.enterprise.middleware
>
> phone: +94773325954
> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>


-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Re: Persistence Volume Mapping support

Posted by Lahiru Sandaruwan <la...@wso2.com>.
On Sat, Mar 21, 2015 at 9:27 AM, Udara Liyanage <ud...@wso2.com> wrote:

>
>
> On Fri, Mar 20, 2015 at 10:42 PM, Lahiru Sandaruwan <la...@wso2.com>
> wrote:
>
>> Hi Udara,
>>
>> I tried that option as well.
>>
>> Issue here is not at volume creation level, but the attachment level.
>> Therefore even we didn't give the ID, it gets the ID of created volume
>> correctly and input to volumeAttach call. My guess is that doesn't pick the
>> correct ID.
>>
>
> What so you mean by it doesn't pick the correct ID. Did you mean it does
> n't pick the correct volume ID?
>

Yes.

>
>> Thanks.
>>
>> On Fri, Mar 20, 2015 at 10:28 PM, Udara Liyanage <ud...@wso2.com> wrote:
>>
>>> Hi Lahiru,
>>>
>>> There is an option to attach an already created volume. You can provide
>>> a known volume I'd and check weather it get attached.
>>> On 20 Mar 2015 21:49, "Lahiru Sandaruwan" <la...@wso2.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> I have completed subscribable info support, and now it passes the
>>>> persistence information to instance creation step correctly.
>>>>
>>>> But it failed to attach the volume to the instance after creating a
>>>> volume successfully. Our code pass the instanceId and volumeId correctly
>>>> for the volume attaching call, as per my debug session.
>>>>
>>>> It seems the value that is passed as volumeId doesn't get the correct
>>>> value and send the same value always.
>>>>
>>>> Their rest API is,
>>>>
>>>> http://<host>:<port>/v2/*<volumeId>*
>>>> /servers/<instanceId>/os-volume_attachments
>>>>
>>>> Error was,
>>>>
>>>> Caused by: org.jclouds.http.HttpResponseException: command: POST
>>>> http://192.168.16.99:8774/v2/*cc9383d8a04f40988f2fcf8aab397551*/servers/RegionOne/33b5057b-7095-4cfc-9e2a-d811cf25051e/os-volume_attachments
>>>> HTTP/1.1 failed with response: HTTP/1.1 404 Not Found
>>>>
>>>> Looking into it. Full error at [1].
>>>>
>>>> Thanks.
>>>> [1]
>>>>
>>>> TID: [0] [STRATOS] [2015-03-20 16:05:52,325] ERROR
>>>> {org.apache.stratos.cloud.controller.services.impl.InstanceCreator} -
>>>>  Could not attache volume, [instance]
>>>> RegionOne/33b5057b-7095-4cfc-9e2a-d811cf25051e [volume] Persistence
>>>> Required: , Size: 1, device: /dev/vdb mapping path : null remove on
>>>> termination true SnaphotId null
>>>> org.jclouds.rest.ResourceNotFoundException: 404 Not Found
>>>>
>>>> The resource could not be found.
>>>>
>>>>
>>>> at
>>>> org.jclouds.openstack.nova.v2_0.handlers.NovaErrorHandler.handleError(NovaErrorHandler.java:97)
>>>> at
>>>> org.jclouds.http.handlers.DelegatingErrorHandler.handleError(DelegatingErrorHandler.java:65)
>>>> at
>>>> org.jclouds.http.internal.BaseHttpCommandExecutorService.shouldContinue(BaseHttpCommandExecutorService.java:128)
>>>> at
>>>> org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:98)
>>>> at
>>>> org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:90)
>>>> at
>>>> org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:73)
>>>> at
>>>> org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:44)
>>>> at
>>>> org.jclouds.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:117)
>>>> at
>>>> com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:87)
>>>> at com.sun.proxy.$Proxy146.attachVolumeToServerAsDevice(Unknown Source)
>>>> at
>>>> org.apache.stratos.cloud.controller.iaases.openstack.OpenstackIaas.attachVolume(OpenstackIaas.java:476)
>>>> at
>>>> org.apache.stratos.cloud.controller.services.impl.InstanceCreator.attachVolumes(InstanceCreator.java:132)
>>>> at
>>>> org.apache.stratos.cloud.controller.services.impl.InstanceCreator.run(InstanceCreator.java:73)
>>>> 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)
>>>> Caused by: org.jclouds.http.HttpResponseException: command: POST
>>>> http://192.168.16.99:8774/v2/cc9383d8a04f40988f2fcf8aab397551/servers/RegionOne/33b5057b-7095-4cfc-9e2a-d811cf25051e/os-volume_attachments
>>>> HTTP/1.1 failed with response: HTTP/1.1 404 Not Found; content: [404 Not
>>>> Found
>>>>
>>>> The resource could not be found.
>>>>
>>>>    ]
>>>> at
>>>> org.jclouds.openstack.nova.v2_0.handlers.NovaErrorHandler.handleError(NovaErrorHandler.java:78)
>>>> ... 15 more
>>>>
>>>> On Wed, Mar 18, 2015 at 8:55 AM, Udara Liyanage <ud...@wso2.com> wrote:
>>>>
>>>>> Hi Lashiru,
>>>>>
>>>>> CC backend supports persistence volume. We need to add this to
>>>>> application subscribable info.
>>>>>
>>>>> On Wed, Mar 18, 2015 at 7:57 AM, Lahiru Sandaruwan <la...@wso2.com>
>>>>> wrote:
>>>>>
>>>>>> Hi devs,
>>>>>>
>>>>>> I'm working on $subject. We have had this feature in 4.0.0 version in
>>>>>> cartridge definition and later moved to subscription section. But we have
>>>>>> missed this feature when we moving subscription parameters to Application
>>>>>> in new model.
>>>>>>
>>>>>> I will update this thread as i progress.
>>>>>>
>>>>>> Thanks.
>>>>>>
>>>>>>
>>>>>> --
>>>>>> --
>>>>>> Lahiru Sandaruwan
>>>>>> Committer and PMC member, Apache Stratos,
>>>>>> Senior Software Engineer,
>>>>>> WSO2 Inc., http://wso2.com
>>>>>> lean.enterprise.middleware
>>>>>>
>>>>>> phone: +94773325954
>>>>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>>>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> Udara Liyanage
>>>>> Software Engineer
>>>>> WSO2, Inc.: http://wso2.com
>>>>> lean. enterprise. middleware
>>>>>
>>>>> web: http://udaraliyanage.wordpress.com
>>>>> phone: +94 71 443 6897
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> --
>>>> Lahiru Sandaruwan
>>>> Committer and PMC member, Apache Stratos,
>>>> Senior Software Engineer,
>>>> WSO2 Inc., http://wso2.com
>>>> lean.enterprise.middleware
>>>>
>>>> phone: +94773325954
>>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>>
>>>>
>>
>>
>> --
>> --
>> Lahiru Sandaruwan
>> Committer and PMC member, Apache Stratos,
>> Senior Software Engineer,
>> WSO2 Inc., http://wso2.com
>> lean.enterprise.middleware
>>
>> phone: +94773325954
>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>
>>
>
>
> --
>
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>



-- 
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

phone: +94773325954
email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146

Re: Persistence Volume Mapping support

Posted by Udara Liyanage <ud...@wso2.com>.
On Fri, Mar 20, 2015 at 10:42 PM, Lahiru Sandaruwan <la...@wso2.com>
wrote:

> Hi Udara,
>
> I tried that option as well.
>
> Issue here is not at volume creation level, but the attachment level.
> Therefore even we didn't give the ID, it gets the ID of created volume
> correctly and input to volumeAttach call. My guess is that doesn't pick the
> correct ID.
>

What so you mean by it doesn't pick the correct ID. Did you mean it does
n't pick the correct volume ID?

>
> Thanks.
>
> On Fri, Mar 20, 2015 at 10:28 PM, Udara Liyanage <ud...@wso2.com> wrote:
>
>> Hi Lahiru,
>>
>> There is an option to attach an already created volume. You can provide a
>> known volume I'd and check weather it get attached.
>> On 20 Mar 2015 21:49, "Lahiru Sandaruwan" <la...@wso2.com> wrote:
>>
>>> Hi,
>>>
>>> I have completed subscribable info support, and now it passes the
>>> persistence information to instance creation step correctly.
>>>
>>> But it failed to attach the volume to the instance after creating a
>>> volume successfully. Our code pass the instanceId and volumeId correctly
>>> for the volume attaching call, as per my debug session.
>>>
>>> It seems the value that is passed as volumeId doesn't get the correct
>>> value and send the same value always.
>>>
>>> Their rest API is,
>>>
>>> http://<host>:<port>/v2/*<volumeId>*
>>> /servers/<instanceId>/os-volume_attachments
>>>
>>> Error was,
>>>
>>> Caused by: org.jclouds.http.HttpResponseException: command: POST
>>> http://192.168.16.99:8774/v2/*cc9383d8a04f40988f2fcf8aab397551*/servers/RegionOne/33b5057b-7095-4cfc-9e2a-d811cf25051e/os-volume_attachments
>>> HTTP/1.1 failed with response: HTTP/1.1 404 Not Found
>>>
>>> Looking into it. Full error at [1].
>>>
>>> Thanks.
>>> [1]
>>>
>>> TID: [0] [STRATOS] [2015-03-20 16:05:52,325] ERROR
>>> {org.apache.stratos.cloud.controller.services.impl.InstanceCreator} -
>>>  Could not attache volume, [instance]
>>> RegionOne/33b5057b-7095-4cfc-9e2a-d811cf25051e [volume] Persistence
>>> Required: , Size: 1, device: /dev/vdb mapping path : null remove on
>>> termination true SnaphotId null
>>> org.jclouds.rest.ResourceNotFoundException: 404 Not Found
>>>
>>> The resource could not be found.
>>>
>>>
>>> at
>>> org.jclouds.openstack.nova.v2_0.handlers.NovaErrorHandler.handleError(NovaErrorHandler.java:97)
>>> at
>>> org.jclouds.http.handlers.DelegatingErrorHandler.handleError(DelegatingErrorHandler.java:65)
>>> at
>>> org.jclouds.http.internal.BaseHttpCommandExecutorService.shouldContinue(BaseHttpCommandExecutorService.java:128)
>>> at
>>> org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:98)
>>> at
>>> org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:90)
>>> at
>>> org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:73)
>>> at
>>> org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:44)
>>> at
>>> org.jclouds.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:117)
>>> at
>>> com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:87)
>>> at com.sun.proxy.$Proxy146.attachVolumeToServerAsDevice(Unknown Source)
>>> at
>>> org.apache.stratos.cloud.controller.iaases.openstack.OpenstackIaas.attachVolume(OpenstackIaas.java:476)
>>> at
>>> org.apache.stratos.cloud.controller.services.impl.InstanceCreator.attachVolumes(InstanceCreator.java:132)
>>> at
>>> org.apache.stratos.cloud.controller.services.impl.InstanceCreator.run(InstanceCreator.java:73)
>>> 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)
>>> Caused by: org.jclouds.http.HttpResponseException: command: POST
>>> http://192.168.16.99:8774/v2/cc9383d8a04f40988f2fcf8aab397551/servers/RegionOne/33b5057b-7095-4cfc-9e2a-d811cf25051e/os-volume_attachments
>>> HTTP/1.1 failed with response: HTTP/1.1 404 Not Found; content: [404 Not
>>> Found
>>>
>>> The resource could not be found.
>>>
>>>    ]
>>> at
>>> org.jclouds.openstack.nova.v2_0.handlers.NovaErrorHandler.handleError(NovaErrorHandler.java:78)
>>> ... 15 more
>>>
>>> On Wed, Mar 18, 2015 at 8:55 AM, Udara Liyanage <ud...@wso2.com> wrote:
>>>
>>>> Hi Lashiru,
>>>>
>>>> CC backend supports persistence volume. We need to add this to
>>>> application subscribable info.
>>>>
>>>> On Wed, Mar 18, 2015 at 7:57 AM, Lahiru Sandaruwan <la...@wso2.com>
>>>> wrote:
>>>>
>>>>> Hi devs,
>>>>>
>>>>> I'm working on $subject. We have had this feature in 4.0.0 version in
>>>>> cartridge definition and later moved to subscription section. But we have
>>>>> missed this feature when we moving subscription parameters to Application
>>>>> in new model.
>>>>>
>>>>> I will update this thread as i progress.
>>>>>
>>>>> Thanks.
>>>>>
>>>>>
>>>>> --
>>>>> --
>>>>> Lahiru Sandaruwan
>>>>> Committer and PMC member, Apache Stratos,
>>>>> Senior Software Engineer,
>>>>> WSO2 Inc., http://wso2.com
>>>>> lean.enterprise.middleware
>>>>>
>>>>> phone: +94773325954
>>>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Udara Liyanage
>>>> Software Engineer
>>>> WSO2, Inc.: http://wso2.com
>>>> lean. enterprise. middleware
>>>>
>>>> web: http://udaraliyanage.wordpress.com
>>>> phone: +94 71 443 6897
>>>>
>>>
>>>
>>>
>>> --
>>> --
>>> Lahiru Sandaruwan
>>> Committer and PMC member, Apache Stratos,
>>> Senior Software Engineer,
>>> WSO2 Inc., http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> phone: +94773325954
>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>
>>>
>
>
> --
> --
> Lahiru Sandaruwan
> Committer and PMC member, Apache Stratos,
> Senior Software Engineer,
> WSO2 Inc., http://wso2.com
> lean.enterprise.middleware
>
> phone: +94773325954
> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>


-- 

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897

Re: Persistence Volume Mapping support

Posted by Lahiru Sandaruwan <la...@wso2.com>.
Hi Udara,

I tried that option as well.

Issue here is not at volume creation level, but the attachment level.
Therefore even we didn't give the ID, it gets the ID of created volume
correctly and input to volumeAttach call. My guess is that doesn't pick the
correct ID.

Thanks.

On Fri, Mar 20, 2015 at 10:28 PM, Udara Liyanage <ud...@wso2.com> wrote:

> Hi Lahiru,
>
> There is an option to attach an already created volume. You can provide a
> known volume I'd and check weather it get attached.
> On 20 Mar 2015 21:49, "Lahiru Sandaruwan" <la...@wso2.com> wrote:
>
>> Hi,
>>
>> I have completed subscribable info support, and now it passes the
>> persistence information to instance creation step correctly.
>>
>> But it failed to attach the volume to the instance after creating a
>> volume successfully. Our code pass the instanceId and volumeId correctly
>> for the volume attaching call, as per my debug session.
>>
>> It seems the value that is passed as volumeId doesn't get the correct
>> value and send the same value always.
>>
>> Their rest API is,
>>
>> http://<host>:<port>/v2/*<volumeId>*
>> /servers/<instanceId>/os-volume_attachments
>>
>> Error was,
>>
>> Caused by: org.jclouds.http.HttpResponseException: command: POST
>> http://192.168.16.99:8774/v2/*cc9383d8a04f40988f2fcf8aab397551*/servers/RegionOne/33b5057b-7095-4cfc-9e2a-d811cf25051e/os-volume_attachments
>> HTTP/1.1 failed with response: HTTP/1.1 404 Not Found
>>
>> Looking into it. Full error at [1].
>>
>> Thanks.
>> [1]
>>
>> TID: [0] [STRATOS] [2015-03-20 16:05:52,325] ERROR
>> {org.apache.stratos.cloud.controller.services.impl.InstanceCreator} -
>>  Could not attache volume, [instance]
>> RegionOne/33b5057b-7095-4cfc-9e2a-d811cf25051e [volume] Persistence
>> Required: , Size: 1, device: /dev/vdb mapping path : null remove on
>> termination true SnaphotId null
>> org.jclouds.rest.ResourceNotFoundException: 404 Not Found
>>
>> The resource could not be found.
>>
>>
>> at
>> org.jclouds.openstack.nova.v2_0.handlers.NovaErrorHandler.handleError(NovaErrorHandler.java:97)
>> at
>> org.jclouds.http.handlers.DelegatingErrorHandler.handleError(DelegatingErrorHandler.java:65)
>> at
>> org.jclouds.http.internal.BaseHttpCommandExecutorService.shouldContinue(BaseHttpCommandExecutorService.java:128)
>> at
>> org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:98)
>> at
>> org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:90)
>> at
>> org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:73)
>> at
>> org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:44)
>> at
>> org.jclouds.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:117)
>> at
>> com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:87)
>> at com.sun.proxy.$Proxy146.attachVolumeToServerAsDevice(Unknown Source)
>> at
>> org.apache.stratos.cloud.controller.iaases.openstack.OpenstackIaas.attachVolume(OpenstackIaas.java:476)
>> at
>> org.apache.stratos.cloud.controller.services.impl.InstanceCreator.attachVolumes(InstanceCreator.java:132)
>> at
>> org.apache.stratos.cloud.controller.services.impl.InstanceCreator.run(InstanceCreator.java:73)
>> 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)
>> Caused by: org.jclouds.http.HttpResponseException: command: POST
>> http://192.168.16.99:8774/v2/cc9383d8a04f40988f2fcf8aab397551/servers/RegionOne/33b5057b-7095-4cfc-9e2a-d811cf25051e/os-volume_attachments
>> HTTP/1.1 failed with response: HTTP/1.1 404 Not Found; content: [404 Not
>> Found
>>
>> The resource could not be found.
>>
>>    ]
>> at
>> org.jclouds.openstack.nova.v2_0.handlers.NovaErrorHandler.handleError(NovaErrorHandler.java:78)
>> ... 15 more
>>
>> On Wed, Mar 18, 2015 at 8:55 AM, Udara Liyanage <ud...@wso2.com> wrote:
>>
>>> Hi Lashiru,
>>>
>>> CC backend supports persistence volume. We need to add this to
>>> application subscribable info.
>>>
>>> On Wed, Mar 18, 2015 at 7:57 AM, Lahiru Sandaruwan <la...@wso2.com>
>>> wrote:
>>>
>>>> Hi devs,
>>>>
>>>> I'm working on $subject. We have had this feature in 4.0.0 version in
>>>> cartridge definition and later moved to subscription section. But we have
>>>> missed this feature when we moving subscription parameters to Application
>>>> in new model.
>>>>
>>>> I will update this thread as i progress.
>>>>
>>>> Thanks.
>>>>
>>>>
>>>> --
>>>> --
>>>> Lahiru Sandaruwan
>>>> Committer and PMC member, Apache Stratos,
>>>> Senior Software Engineer,
>>>> WSO2 Inc., http://wso2.com
>>>> lean.enterprise.middleware
>>>>
>>>> phone: +94773325954
>>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>>
>>>>
>>>
>>>
>>> --
>>>
>>> Udara Liyanage
>>> Software Engineer
>>> WSO2, Inc.: http://wso2.com
>>> lean. enterprise. middleware
>>>
>>> web: http://udaraliyanage.wordpress.com
>>> phone: +94 71 443 6897
>>>
>>
>>
>>
>> --
>> --
>> Lahiru Sandaruwan
>> Committer and PMC member, Apache Stratos,
>> Senior Software Engineer,
>> WSO2 Inc., http://wso2.com
>> lean.enterprise.middleware
>>
>> phone: +94773325954
>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>
>>


-- 
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

phone: +94773325954
email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146

Re: Persistence Volume Mapping support

Posted by Udara Liyanage <ud...@wso2.com>.
Hi Lahiru,

There is an option to attach an already created volume. You can provide a
known volume I'd and check weather it get attached.
On 20 Mar 2015 21:49, "Lahiru Sandaruwan" <la...@wso2.com> wrote:

> Hi,
>
> I have completed subscribable info support, and now it passes the
> persistence information to instance creation step correctly.
>
> But it failed to attach the volume to the instance after creating a volume
> successfully. Our code pass the instanceId and volumeId correctly for the
> volume attaching call, as per my debug session.
>
> It seems the value that is passed as volumeId doesn't get the correct
> value and send the same value always.
>
> Their rest API is,
>
> http://<host>:<port>/v2/*<volumeId>*
> /servers/<instanceId>/os-volume_attachments
>
> Error was,
>
> Caused by: org.jclouds.http.HttpResponseException: command: POST
> http://192.168.16.99:8774/v2/*cc9383d8a04f40988f2fcf8aab397551*/servers/RegionOne/33b5057b-7095-4cfc-9e2a-d811cf25051e/os-volume_attachments
> HTTP/1.1 failed with response: HTTP/1.1 404 Not Found
>
> Looking into it. Full error at [1].
>
> Thanks.
> [1]
>
> TID: [0] [STRATOS] [2015-03-20 16:05:52,325] ERROR
> {org.apache.stratos.cloud.controller.services.impl.InstanceCreator} -
>  Could not attache volume, [instance]
> RegionOne/33b5057b-7095-4cfc-9e2a-d811cf25051e [volume] Persistence
> Required: , Size: 1, device: /dev/vdb mapping path : null remove on
> termination true SnaphotId null
> org.jclouds.rest.ResourceNotFoundException: 404 Not Found
>
> The resource could not be found.
>
>
> at
> org.jclouds.openstack.nova.v2_0.handlers.NovaErrorHandler.handleError(NovaErrorHandler.java:97)
> at
> org.jclouds.http.handlers.DelegatingErrorHandler.handleError(DelegatingErrorHandler.java:65)
> at
> org.jclouds.http.internal.BaseHttpCommandExecutorService.shouldContinue(BaseHttpCommandExecutorService.java:128)
> at
> org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:98)
> at
> org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:90)
> at
> org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:73)
> at
> org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:44)
> at
> org.jclouds.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:117)
> at
> com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:87)
> at com.sun.proxy.$Proxy146.attachVolumeToServerAsDevice(Unknown Source)
> at
> org.apache.stratos.cloud.controller.iaases.openstack.OpenstackIaas.attachVolume(OpenstackIaas.java:476)
> at
> org.apache.stratos.cloud.controller.services.impl.InstanceCreator.attachVolumes(InstanceCreator.java:132)
> at
> org.apache.stratos.cloud.controller.services.impl.InstanceCreator.run(InstanceCreator.java:73)
> 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)
> Caused by: org.jclouds.http.HttpResponseException: command: POST
> http://192.168.16.99:8774/v2/cc9383d8a04f40988f2fcf8aab397551/servers/RegionOne/33b5057b-7095-4cfc-9e2a-d811cf25051e/os-volume_attachments
> HTTP/1.1 failed with response: HTTP/1.1 404 Not Found; content: [404 Not
> Found
>
> The resource could not be found.
>
>    ]
> at
> org.jclouds.openstack.nova.v2_0.handlers.NovaErrorHandler.handleError(NovaErrorHandler.java:78)
> ... 15 more
>
> On Wed, Mar 18, 2015 at 8:55 AM, Udara Liyanage <ud...@wso2.com> wrote:
>
>> Hi Lashiru,
>>
>> CC backend supports persistence volume. We need to add this to
>> application subscribable info.
>>
>> On Wed, Mar 18, 2015 at 7:57 AM, Lahiru Sandaruwan <la...@wso2.com>
>> wrote:
>>
>>> Hi devs,
>>>
>>> I'm working on $subject. We have had this feature in 4.0.0 version in
>>> cartridge definition and later moved to subscription section. But we have
>>> missed this feature when we moving subscription parameters to Application
>>> in new model.
>>>
>>> I will update this thread as i progress.
>>>
>>> Thanks.
>>>
>>>
>>> --
>>> --
>>> Lahiru Sandaruwan
>>> Committer and PMC member, Apache Stratos,
>>> Senior Software Engineer,
>>> WSO2 Inc., http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> phone: +94773325954
>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>
>>>
>>
>>
>> --
>>
>> Udara Liyanage
>> Software Engineer
>> WSO2, Inc.: http://wso2.com
>> lean. enterprise. middleware
>>
>> web: http://udaraliyanage.wordpress.com
>> phone: +94 71 443 6897
>>
>
>
>
> --
> --
> Lahiru Sandaruwan
> Committer and PMC member, Apache Stratos,
> Senior Software Engineer,
> WSO2 Inc., http://wso2.com
> lean.enterprise.middleware
>
> phone: +94773325954
> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>

Re: Persistence Volume Mapping support

Posted by Lahiru Sandaruwan <la...@wso2.com>.
Hi,

I have completed subscribable info support, and now it passes the
persistence information to instance creation step correctly.

But it failed to attach the volume to the instance after creating a volume
successfully. Our code pass the instanceId and volumeId correctly for the
volume attaching call, as per my debug session.

It seems the value that is passed as volumeId doesn't get the correct value
and send the same value always.

Their rest API is,

http://<host>:<port>/v2/*<volumeId>*
/servers/<instanceId>/os-volume_attachments

Error was,

Caused by: org.jclouds.http.HttpResponseException: command: POST
http://192.168.16.99:8774/v2/*cc9383d8a04f40988f2fcf8aab397551*/servers/RegionOne/33b5057b-7095-4cfc-9e2a-d811cf25051e/os-volume_attachments
HTTP/1.1 failed with response: HTTP/1.1 404 Not Found

Looking into it. Full error at [1].

Thanks.
[1]

TID: [0] [STRATOS] [2015-03-20 16:05:52,325] ERROR
{org.apache.stratos.cloud.controller.services.impl.InstanceCreator} -
 Could not attache volume, [instance]
RegionOne/33b5057b-7095-4cfc-9e2a-d811cf25051e [volume] Persistence
Required: , Size: 1, device: /dev/vdb mapping path : null remove on
termination true SnaphotId null
org.jclouds.rest.ResourceNotFoundException: 404 Not Found

The resource could not be found.


at
org.jclouds.openstack.nova.v2_0.handlers.NovaErrorHandler.handleError(NovaErrorHandler.java:97)
at
org.jclouds.http.handlers.DelegatingErrorHandler.handleError(DelegatingErrorHandler.java:65)
at
org.jclouds.http.internal.BaseHttpCommandExecutorService.shouldContinue(BaseHttpCommandExecutorService.java:128)
at
org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:98)
at
org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:90)
at
org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:73)
at
org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:44)
at
org.jclouds.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:117)
at
com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:87)
at com.sun.proxy.$Proxy146.attachVolumeToServerAsDevice(Unknown Source)
at
org.apache.stratos.cloud.controller.iaases.openstack.OpenstackIaas.attachVolume(OpenstackIaas.java:476)
at
org.apache.stratos.cloud.controller.services.impl.InstanceCreator.attachVolumes(InstanceCreator.java:132)
at
org.apache.stratos.cloud.controller.services.impl.InstanceCreator.run(InstanceCreator.java:73)
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)
Caused by: org.jclouds.http.HttpResponseException: command: POST
http://192.168.16.99:8774/v2/cc9383d8a04f40988f2fcf8aab397551/servers/RegionOne/33b5057b-7095-4cfc-9e2a-d811cf25051e/os-volume_attachments
HTTP/1.1 failed with response: HTTP/1.1 404 Not Found; content: [404 Not
Found

The resource could not be found.

   ]
at
org.jclouds.openstack.nova.v2_0.handlers.NovaErrorHandler.handleError(NovaErrorHandler.java:78)
... 15 more

On Wed, Mar 18, 2015 at 8:55 AM, Udara Liyanage <ud...@wso2.com> wrote:

> Hi Lashiru,
>
> CC backend supports persistence volume. We need to add this to application
> subscribable info.
>
> On Wed, Mar 18, 2015 at 7:57 AM, Lahiru Sandaruwan <la...@wso2.com>
> wrote:
>
>> Hi devs,
>>
>> I'm working on $subject. We have had this feature in 4.0.0 version in
>> cartridge definition and later moved to subscription section. But we have
>> missed this feature when we moving subscription parameters to Application
>> in new model.
>>
>> I will update this thread as i progress.
>>
>> Thanks.
>>
>>
>> --
>> --
>> Lahiru Sandaruwan
>> Committer and PMC member, Apache Stratos,
>> Senior Software Engineer,
>> WSO2 Inc., http://wso2.com
>> lean.enterprise.middleware
>>
>> phone: +94773325954
>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>
>>
>
>
> --
>
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>



-- 
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

phone: +94773325954
email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146

Re: Persistence Volume Mapping support

Posted by Udara Liyanage <ud...@wso2.com>.
Hi Lashiru,

CC backend supports persistence volume. We need to add this to application
subscribable info.

On Wed, Mar 18, 2015 at 7:57 AM, Lahiru Sandaruwan <la...@wso2.com> wrote:

> Hi devs,
>
> I'm working on $subject. We have had this feature in 4.0.0 version in
> cartridge definition and later moved to subscription section. But we have
> missed this feature when we moving subscription parameters to Application
> in new model.
>
> I will update this thread as i progress.
>
> Thanks.
>
>
> --
> --
> Lahiru Sandaruwan
> Committer and PMC member, Apache Stratos,
> Senior Software Engineer,
> WSO2 Inc., http://wso2.com
> lean.enterprise.middleware
>
> phone: +94773325954
> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>


-- 

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897