[
https://issues.apache.org/jira/browse/DTACLOUD-519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13611094#comment-13611094
]
Ronelle Landy commented on DTACLOUD-519:
----------------------------------------
Having a hard time verifying this fix as I can't create a volumeTemplate (which
I need in order to delete it):
curl --user "un:pw" -H "Content-Type: application/xml" -H "Accept:
application/xml" -X POST -d '<VolumeTemplateCreate
xmlns="http://schemas.dmtf.org/cimi/1"> <name>test_vol_template</name>
<description>test_volume_template</description> <volumeConfig
href="http://localhost:3001/cimi/volume_configurations/3"/>
</VolumeTemplateCreate>' http://localhost:3001/cimi/volume_templates |more
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:--
0<?xml version='1.0' encoding='utf-8' ?>
<error status='500' url='/cimi/volume_templates'>
<backend driver='mock' provider='default'></backend>
<code>500</code>
<message><![CDATA[volume_image is not present]]></message>
<backtrace>
<![CDATA[/usr/share/gems/gems/sequel-3.44.0/lib/sequel/model/base.rb:1248:in
`save'
/usr/share/gems/gems/sequel-3.44.0/lib/sequel/model/associations.rb:1385:in
`block in def_one_
to_many'
/usr/share/gems/gems/sequel-3.44.0/lib/sequel/model/associations.rb:1530:in
`add_associated_ob
ject'
/usr/share/gems/gems/sequel-3.44.0/lib/sequel/model/associations.rb:1108:in
`block in def_add_
method'
/home/workspace/deltacloud/server/lib/cimi/service/volume_template_create.rb:19:in
`create'
/home/workspace/deltacloud/server/lib/cimi/collections/volume_templates.rb:50:in
`block (3 lev
els) in <class:VolumeTemplates>'
/usr/share/gems/gems/sinatra-rabbit-1.1.6/lib/sinatra/rabbit/base.rb:400:in
`instance_eval'
/usr/share/gems/gems/sinatra-rabbit-1.1.6/lib/sinatra/rabbit/base.rb:400:in
`block in control'
/usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:1293:in `call'
/usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:1293:in `block
in compile!'
/usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:860:in `[]'
/usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:860:in `block
(3 levels) in route
!'
/usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:876:in
`route_eval'
/usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:860:in `block
(2 levels) in route
!'
/usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:897:in `block
in process_route'
/usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:895:in `catch'
/usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:895:in
`process_route'
/usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:859:in `block
in route!'
/usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:858:in `each'
/usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:858:in `route!'
/usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:963:in `block
in dispatch!'
/usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:946:in `block
in invoke'
/usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:946:in `catch'
/usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:946:in `invoke'
/usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:960:in
`dispatch!'
Thoughts? Suggestions?
> 500 error - deleting volume Template
> -------------------------------------
>
> Key: DTACLOUD-519
> URL: https://issues.apache.org/jira/browse/DTACLOUD-519
> Project: DeltaCloud
> Issue Type: Bug
> Components: CIMI/Frontend
> Reporter: Martha Chumo
> Assignee: Michal Fojtik
>
> running curl -v -X DELETE --user "mockuser:mockpassword"
> http://localhost:3001/cimi/volume_templates/<some-volume-template-you-have>
> gives me: {"code":500,"message":"can't convert Hash into
> Integer","error":"TypeError"}
> Here's the full stacktrace:
> E, [2013-03-20T13:00:25.432974 #13738] ERROR -- 500: [TypeError] can't
> convert Hash into Integer
> /home/martha/openSource/deltacloud/server/lib/cimi/service/volume_template.rb:37:in
> `first'
> /home/martha/openSource/deltacloud/server/lib/cimi/service/volume_template.rb:37:in
> `delete!'
> /home/martha/openSource/deltacloud/server/lib/cimi/collections/volume_templates.rb:62:in
> `block (3 levels) in <class:VolumeTemplates>'
> /home/martha/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-rabbit-1.1.6/lib/sinatra/rabbit/base.rb:400:in
> `instance_eval'
> /home/martha/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-rabbit-1.1.6/lib/sinatra/rabbit/base.rb:400:in
> `block in control'
> /home/martha/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.5/lib/sinatra/base.rb:1293:in
> `call'
> /home/martha/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.5/lib/sinatra/base.rb:1293:in
> `block in compile!'
> /home/martha/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.5/lib/sinatra/base.rb:860:in
> `[]'
> /home/martha/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.5/lib/sinatra/base.rb:860:in
> `block (3 levels) in route!'
> /home/martha/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.5/lib/sinatra/base.rb:876:in
> `route_eval'
> /home/martha/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.5/lib/sinatra/base.rb:860:in
> `block (2 levels) in route!'
> /home/martha/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.5/lib/sinatra/base.rb:897:in
> `block in process_route'
> /home/martha/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.5/lib/sinatra/base.rb:895:in
> `catch'
> /home/martha/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.5/lib/sinatra/base.rb:895:in
> `process_route'
> /home/martha/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.5/lib/sinatra/base.rb:859:in
> `block in route!'
> /home/martha/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.5/lib/sinatra/base.rb:858:in
> `each'
> /home/martha/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.5/lib/sinatra/base.rb:858:in
> `route!'
> /home/martha/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.5/lib/sinatra/base.rb:963:in
> `block in dispatch!'
> /home/martha/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.5/lib/sinatra/base.rb:946:in
> `block in invoke'
> /home/martha/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.5/lib/sinatra/base.rb:946:in
> `catch'
> /home/martha/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.5/lib/sinatra/base.rb:946:in
> `invoke'
> 127.0.0.1 - - [20/Mar/2013 13:00:25] "DELETE /cimi/volume_templates/47
> HTTP/1.1" 500 76 0.0557
> Marios suspects this is from the model service separation.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira