[
https://issues.apache.org/jira/browse/DTACLOUD-375?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Marios Andreou updated DTACLOUD-375:
------------------------------------
Attachment: 0001-CIMI-tidy-up-nits-in-Volumes-VolumeConfigs-especiall.patch
Your syntax was fine - there were some nits in the code. Also fix some nits in
how we get the size for volumeConfigs (was being reported incorrectly... as
deltacloud volumes are GB but we were converting to kibibyte assuming they were
in MB).
also at http://tracker.deltacloud.org/set/145
> CIMI: Creating a Volume using volumeTemplate/volumeConfig errors out
> --------------------------------------------------------------------
>
> Key: DTACLOUD-375
> URL: https://issues.apache.org/jira/browse/DTACLOUD-375
> Project: DeltaCloud
> Issue Type: Bug
> Components: CIMI/Frontend
> Environment: Deltacloud 1.0.5 +
> CIMI
> Ruby 1.9.3
> Reporter: Ronelle Landy
> Assignee: Marios Andreou
> Attachments:
> 0001-CIMI-tidy-up-nits-in-Volumes-VolumeConfigs-especiall.patch
>
>
> So, this may be a case of user-error but I can not create a volume from a
> volumeTemplate including a volumeConfig. 500 error is copied below. If this
> is user-error, please comment on the correct syntax.
> curl -X POST --user "u:p" -H "Content-Type: application/json" -d '{"name":
> "myvolume", "description": "test volume", "volumeTemplate": { "volumeConfig":
> {"href":"http://qe-blade-01.idm.lab.bos.redhat.com:3001/cimi/volume_configurations/2"
> }}}' http://qe-blade-01.idm.lab.bos.redhat.com:3001//cimi/volumes?format=xml
> <error status='500' url='//cimi/volumes'>
> <kind>backend_error</kind>
> <message><![CDATA[nil is not a symbol]]></message>
> <backend driver='mock'>
> <code>500</code>
> </backend>
> <backtrace>[
> Abbreviated trace
> pass fulltrace=1 as query param to see everything
> $app = /home/dcloud/workspace/deltacloud/server/lib
> ]
> $app/cimi/collections/volumes.rb:19:in `respond_to?'
> $app/cimi/collections/volumes.rb:19:in `block in <class:Volumes>'
> ...
> $app/sinatra/rack_accept.rb:164:in `call'
> ...
> $app/sinatra/rack_accept.rb:164:in `call'
> ...
> $app/sinatra/rack_accept.rb:164:in `call'
> ...
> $app/sinatra/rack_accept.rb:164:in `call'
> ...
> $app/sinatra/rack_accept.rb:164:in `call'
> ...
> $app/sinatra/rack_accept.rb:164:in `call'
> ...
> $app/sinatra/rack_accept.rb:164:in `call'
> ...
> $app/sinatra/rack_accept.rb:164:in `call'
> ...
> $app/sinatra/rack_accept.rb:164:in `call'
> ...
> $app/sinatra/rack_accept.rb:164:in `call'
> ...
> $app/sinatra/rack_accept.rb:164:in `call'
> ...
> $app/sinatra/rack_accept.rb:164:in `call'
> ...
> $app/sinatra/rack_accept.rb:164:in `call'
> ...
> $app/sinatra/rack_driver_select.rb:45:in `call'
> $app/sinatra/rack_matrix_params.rb:104:in `call'
> $app/sinatra/rack_etag.rb:41:in `call'
> $app/sinatra/rack_date.rb:31:in `call'
> $app/sinatra/rack_logger.rb:76:in `call'
> $app/sinatra/rack_accept.rb:164:in `call'
> ...
> $app/sinatra/rack_matrix_params.rb:104:in `call'
> ...</backtrace>
> </error>
> Let's try this a different way ...
> curl -v -X POST -H "Content-Type:application/xml" --user "un:pw" -d
> '<Volume><name>myName</name><description>hi</description><volumeTemplate><volumeConfig
>
> href="http://qe-blade-01.idm.lab.bos.redhat.com:3001/cimi/volume_configurations/2"></volumeConfig></volumeTemplate></Volume>'
> "qe-blade-01.idm.lab.bos.redhat.com:3001/cimi/volumes?format=xml"
> * About to connect() to qe-blade-01.idm.lab.bos.redhat.com port 3001 (#0)
> * Trying 10.16.76.32... connected
> * Connected to qe-blade-01.idm.lab.bos.redhat.com (10.16.76.32) port 3001 (#0)
> * Server auth using Basic with user 'mockuser'
> > POST /cimi/volumes?format=xml HTTP/1.1
> > Authorization: Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
> > User-Agent: curl/7.21.7 (x86_64-redhat-linux-gnu) libcurl/7.21.7
> > NSS/3.13.1.0 zlib/1.2.5 libidn/1.22 libssh2/1.2.7
> > Host: qe-blade-01.idm.lab.bos.redhat.com:3001
> > Accept: */*
> > Content-Type:application/xml
> > Content-Length: 210
> >
> < HTTP/1.1 500 Internal Server Error
> < X-Frame-Options: sameorigin
> < X-XSS-Protection: 1; mode=block
> < Content-Type: application/xml
> < CIMI-Specification-Version: 1.0.5
> < Content-Length: 1472
> < Date: Mon, 19 Nov 2012 20:52:55 GMT
> < Connection: keep-alive
> < Server: thin 1.5.0 codename Knife
> <
> <error status='500' url='/cimi/volumes'>
> <kind>backend_error</kind>
> <message><![CDATA[nil is not a symbol]]></message>
> <backend driver='mock'>
> <code>500</code>
> </backend>
> <backtrace>[
> Abbreviated trace
> pass fulltrace=1 as query param to see everything
> $app = /home/dcloud/workspace/deltacloud/server/lib
> ]
> $app/cimi/collections/volumes.rb:19:in `respond_to?'
> $app/cimi/collections/volumes.rb:19:in `block in <class:Volumes>'
> ...
> $app/sinatra/rack_accept.rb:164:in `call'
> ...
> $app/sinatra/rack_accept.rb:164:in `call'
> ...
> $app/sinatra/rack_accept.rb:164:in `call'
> ...
> $app/sinatra/rack_accept.rb:164:in `call'
> ...
> $app/sinatra/rack_accept.rb:164:in `call'
> ...
> $app/sinatra/rack_accept.rb:164:in `call'
> ...
> $app/sinatra/rack_accept.rb:164:in `call'
> ...
> $app/sinatra/rack_accept.rb:164:in `call'
> ...
> $app/sinatra/rack_accept.rb:164:in `call'
> ...
> $app/sinatra/rack_accept.rb:164:in `call'
> ...
> $app/sinatra/rack_accept.rb:164:in `call'
> ...
> $app/sinatra/rack_accept.rb:164:in `call'
> ...
> $app/sinatra/rack_accept.rb:164:in `call'
> ...
> $app/sinatra/rack_driver_select.rb:45:in `call'
> $app/sinatra/rack_matrix_params.rb:104:in `call'
> $app/sinatra/rack_etag.rb:41:in `call'
> $app/sinatra/rack_date.rb:31:in `call'
> $app/sinatra/rack_logger.rb:76:in `call'
> $app/sinatra/rack_accept.rb:164:in `call'
> ...
> $app/sinatra/rack_matrix_params.rb:104:in `call'
> ...</backtrace>
> </error>
> * Connection #0 to host qe-blade-01.idm.lab.bos.redhat.com left intact
> * Closing connection #0
--
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