[
https://issues.apache.org/jira/browse/DTACLOUD-448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Martha Chumo reopened DTACLOUD-448:
-----------------------------------
Marios, am not sure if your patch was pushed to master because the same issue
is back. (I'm running the code on maser). When I try to create a
machine_template without properties, this is the stacktrace.
server ruby-1.9.3-p374 Rails 3.2.11 master
$ curl -v --user "mockuser:mockpassword" -X POST -d
'<MachineTemplateCreate><name>myXmlTestMachineTemplate1</name><description>Description
of my MachineTemplate</description><machineConfig
href="http://localhost:3001/cimi/machine_configurations/m1-xlarge"/><machineImage
href="http://localhost:3001/cimi/machine_images/img3"/></MachineTemplateCreate>'
-H "Content-Type: application/xml" -H "Accept: application/xml"
http://localhost:3001/cimi/machine_templates
gives me:
E, [2013-02-13T09:30:46.036688 #19311] ERROR -- 500: [NoMethodError] undefined
method `inject' for nil:NilClass
/home/martha/.rvm/gems/ruby-1.9.3-p374/gems/deltacloud-core-1.1.0/lib/cimi/models/machine_template.rb:74:in
`create_from_xml'
/home/martha/.rvm/gems/ruby-1.9.3-p374/gems/deltacloud-core-1.1.0/lib/cimi/collections/machine_templates.rb:51:in
`block (3 levels) in <class:MachineTemplates>'
/home/martha/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-rabbit-1.1.3/lib/sinatra/rabbit/base.rb:396:in
`instance_eval'
/home/martha/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-rabbit-1.1.3/lib/sinatra/rabbit/base.rb:396:in
`block in control'
/home/martha/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.4/lib/sinatra/base.rb:1293:in
`call'
/home/martha/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.4/lib/sinatra/base.rb:1293:in
`block in compile!'
/home/martha/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.4/lib/sinatra/base.rb:860:in
`[]'
/home/martha/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.4/lib/sinatra/base.rb:860:in
`block (3 levels) in route!'
/home/martha/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.4/lib/sinatra/base.rb:876:in
`route_eval'
/home/martha/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.4/lib/sinatra/base.rb:860:in
`block (2 levels) in route!'
/home/martha/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.4/lib/sinatra/base.rb:897:in
`block in process_route'
/home/martha/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.4/lib/sinatra/base.rb:895:in
`catch'
/home/martha/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.4/lib/sinatra/base.rb:895:in
`process_route'
/home/martha/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.4/lib/sinatra/base.rb:859:in
`block in route!'
/home/martha/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.4/lib/sinatra/base.rb:858:in
`each'
/home/martha/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.4/lib/sinatra/base.rb:858:in
`route!'
/home/martha/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.4/lib/sinatra/base.rb:963:in
`block in dispatch!'
/home/martha/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.4/lib/sinatra/base.rb:946:in
`block in invoke'
/home/martha/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.4/lib/sinatra/base.rb:946:in
`catch'
/home/martha/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.4/lib/sinatra/base.rb:946:in
`invoke'
/home/martha/.rvm/gems/ruby-1.9.3-p374/gems/sinatra-1.3.4/lib/sinatra/base.rb:960:in
`dispatch!'
127.0.0.1 - - [13/Feb/2013 09:30:46] "POST /cimi/machine_templates HTTP/1.1"
500 1818 0.8421
> 500 Error when creating a machine template with no properties
> --------------------------------------------------------------
>
> Key: DTACLOUD-448
> URL: https://issues.apache.org/jira/browse/DTACLOUD-448
> Project: DeltaCloud
> Issue Type: Bug
> Components: Server
> Reporter: Martha Chumo
> Assignee: Marios Andreou
> Attachments:
> 0001-CIMI-bug-create-CIMI-db-resource-with-no-properties-.patch
>
>
> Here is part of the error trace-->
> 127.0.0.1 - - [31/Jan/2013 13:09:06] "POST /cimi/machine_templates HTTP/1.1"
> 500 1818 1.1468
> E, [2013-01-31T13:09:07.481446 #7345] ERROR -- 500: [NoMethodError] undefined
> method `inject' for nil:NilClass
> /home/martha/.rvm/gems/ruby-1.9.3-p194/gems/deltacloud-core-1.1.0/lib/cimi/models/machine_template.rb:74:in
> `create_from_xml'
> /home/martha/.rvm/gems/ruby-1.9.3-p194/gems/deltacloud-core-1.1.0/lib/cimi/collections/machine_templates.rb:51:in
> `block (3 levels) in <class:MachineTemplates>'
> /home/martha/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-rabbit-1.1.3/lib/sinatra/rabbit/base.rb:396:in
> `instance_eval'
> /home/martha/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-rabbit-1.1.3/lib/sinatra/rabbit/base.rb:396:in
> `block in control'
--
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