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:[email protected]]
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
<[email protected]<mailto:[email protected]>> wrote:
Great.
Thanks.
On Tue, Mar 24, 2015 at 10:16 AM, Udara Liyanage
<[email protected]<mailto:[email protected]>> 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
<[email protected]<mailto:[email protected]>> 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
<[email protected]<mailto:[email protected]>> wrote:
Your client is using the same Jclouds version, that we do?
On Tue, Mar 24, 2015 at 8:27 AM, Udara Liyanage
<[email protected]<mailto:[email protected]>> 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"
<[email protected]<mailto:[email protected]>> wrote:
On Tue, Mar 24, 2015 at 7:01 AM, Udara Liyanage
<[email protected]<mailto:[email protected]>> 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: [email protected]<mailto:[email protected]> 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: [email protected]<mailto:[email protected]> 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: [email protected]<mailto:[email protected]> 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