deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ronelle Landy (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DTACLOUD-498) mock driver doesn't update bucket size when a blob is created
Date Fri, 01 Mar 2013 18:39:14 GMT

    [ https://issues.apache.org/jira/browse/DTACLOUD-498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13590808#comment-13590808
] 

Ronelle Landy commented on DTACLOUD-498:
----------------------------------------

Applying this patch and starting the Deltacloud server pointing to the mock driver returns
the error below:

>> tracker apply 03b3210c
[03b3210c] Are you sure you want to apply patch to current branch? [Y/n]Y
Applying: DTACLOUD-498 - nit in mock driver create/delete blobs - update bucket size

[root@qeblade39 server]# rake mock:fixtures:reset
Remove mock data in /var/tmp/deltacloud-root/mock
Copy mock data to /var/tmp/deltacloud-root/mock
  (from ./lib/deltacloud/drivers/mock/data)

[root@qeblade39 server]# ./bin/deltacloud-db-upgrade

[root@qeblade39 server]# ./bin/deltacloudd -i mock 
Starting Deltacloud API :: mock :: http://localhost:3001/api
/home/dcloud/workspace/deltacloud/server/lib/deltacloud/helpers/driver_helper.rb:59:in `require_relative':
/home/dcloud/workspace/deltacloud/server/lib/deltacloud/drivers/mock/mock_driver.rb:503: syntax
error, unexpected tCONSTANT, expecting ')' (SyntaxError)
      Blob.new(@client.store(:blobs, blob))
          ^
/home/dcloud/workspace/deltacloud/server/lib/deltacloud/drivers/mock/mock_driver.rb:514: syntax
error, unexpected tIVAR, expecting ')'
        @client.destroy(:blobs, blob_id)
               ^
	from /home/dcloud/workspace/deltacloud/server/lib/deltacloud/helpers/driver_helper.rb:59:in
`driver'
	from /home/dcloud/workspace/deltacloud/server/lib/deltacloud/collections/instances.rb:22:in
`block in <class:Instances>'
	from /usr/local/share/gems/gems/sinatra-rabbit-1.1.5/lib/sinatra/rabbit/base.rb:349:in `call'
	from /usr/local/share/gems/gems/sinatra-rabbit-1.1.5/lib/sinatra/rabbit/base.rb:349:in `block
in generate'
	from /usr/local/share/gems/gems/sinatra-rabbit-1.1.5/lib/sinatra/rabbit/base.rb:347:in `each'
	from /usr/local/share/gems/gems/sinatra-rabbit-1.1.5/lib/sinatra/rabbit/base.rb:347:in `generate'
	from /usr/local/share/gems/gems/sinatra-rabbit-1.1.5/lib/sinatra/rabbit/base.rb:240:in `operation'
	from /home/dcloud/workspace/deltacloud/server/lib/deltacloud/helpers/rabbit_helper.rb:21:in
`standard_index_operation'
	from /home/dcloud/workspace/deltacloud/server/lib/deltacloud/collections/instances.rb:44:in
`block in <class:Instances>'
	from /usr/local/share/gems/gems/sinatra-rabbit-1.1.5/lib/sinatra/rabbit/base.rb:113:in `class_eval'
	from /usr/local/share/gems/gems/sinatra-rabbit-1.1.5/lib/sinatra/rabbit/base.rb:113:in `generate'
	from /usr/local/share/gems/gems/sinatra-rabbit-1.1.5/lib/sinatra/rabbit/dsl.rb:36:in `block
in collection'
	from /usr/local/share/gems/gems/sinatra-rabbit-1.1.5/lib/sinatra/rabbit/base_collection.rb:65:in
`rescue in collection_class'
	from /usr/local/share/gems/gems/sinatra-rabbit-1.1.5/lib/sinatra/rabbit/base_collection.rb:62:in
`collection_class'
	from /usr/local/share/gems/gems/sinatra-rabbit-1.1.5/lib/sinatra/rabbit/dsl.rb:34:in `collection'
	from /home/dcloud/workspace/deltacloud/server/lib/deltacloud/collections/instances.rb:41:in
`<class:Instances>'
	from /home/dcloud/workspace/deltacloud/server/lib/deltacloud/collections/instances.rb:17:in
`<module:Collections>'
	from /home/dcloud/workspace/deltacloud/server/lib/deltacloud/collections/instances.rb:16:in
`<top (required)>'
	from /usr/share/rubygems/rubygems/custom_require.rb:36:in `require'
	from /usr/share/rubygems/rubygems/custom_require.rb:36:in `require'
	from /home/dcloud/workspace/deltacloud/server/lib/deltacloud/helpers/collection_helper.rb:83:in
`block in load_collections_for'
	from /home/dcloud/workspace/deltacloud/server/lib/deltacloud/helpers/collection_helper.rb:80:in
`each'
	from /home/dcloud/workspace/deltacloud/server/lib/deltacloud/helpers/collection_helper.rb:80:in
`load_collections_for'
	from /home/dcloud/workspace/deltacloud/server/lib/deltacloud/collections.rb:25:in `<module:Collections>'
	from /home/dcloud/workspace/deltacloud/server/lib/deltacloud/collections.rb:22:in `<module:Deltacloud>'
	from /home/dcloud/workspace/deltacloud/server/lib/deltacloud/collections.rb:20:in `<top
(required)>'
	from /home/dcloud/workspace/deltacloud/server/lib/deltacloud/server.rb:26:in `require_relative'
	from /home/dcloud/workspace/deltacloud/server/lib/deltacloud/server.rb:26:in `<top (required)>'
	from /home/dcloud/workspace/deltacloud/server/lib/deltacloud_rack.rb:42:in `require_relative'
	from /home/dcloud/workspace/deltacloud/server/lib/deltacloud_rack.rb:42:in `require_frontend!'
	from /home/dcloud/workspace/deltacloud/server/lib/deltacloud_rack.rb:151:in `require!'
	from /home/dcloud/workspace/deltacloud/server/lib/deltacloud_rack.rb:67:in `block in generate_routes'
	from /home/dcloud/workspace/deltacloud/server/lib/deltacloud_rack.rb:61:in `each'
	from /home/dcloud/workspace/deltacloud/server/lib/deltacloud_rack.rb:61:in `inject'
	from /home/dcloud/workspace/deltacloud/server/lib/deltacloud_rack.rb:61:in `generate_routes'
	from /home/dcloud/workspace/deltacloud/server/config.ru:38:in `block in <main>'
	from /usr/local/share/gems/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
	from /usr/local/share/gems/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
	from /home/dcloud/workspace/deltacloud/server/config.ru:1:in `new'
	from /home/dcloud/workspace/deltacloud/server/config.ru:1:in `<main>'
	from /usr/local/share/gems/gems/thin-1.5.0/lib/rack/adapter/loader.rb:33:in `eval'
	from /usr/local/share/gems/gems/thin-1.5.0/lib/rack/adapter/loader.rb:33:in `load'
	from /usr/local/share/gems/gems/thin-1.5.0/lib/thin/controllers/controller.rb:181:in `load_rackup_config'
	from /usr/local/share/gems/gems/thin-1.5.0/lib/thin/controllers/controller.rb:71:in `start'
	from /usr/local/share/gems/gems/thin-1.5.0/lib/thin/runner.rb:187:in `run_command'
	from /usr/local/share/gems/gems/thin-1.5.0/lib/thin/runner.rb:152:in `run!'
	from ./bin/deltacloudd:260:in `<main>'

                
> mock driver doesn't update bucket size when a blob is created
> -------------------------------------------------------------
>
>                 Key: DTACLOUD-498
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-498
>             Project: DeltaCloud
>          Issue Type: Bug
>          Components: Server
>            Reporter: Jan Provaznik
>            Assignee: Marios Andreou
>            Priority: Minor
>         Attachments: 0001-DTACLOUD-498-nit-in-mock-driver-create-delete-blobs-.patch
>
>
> If I create a blob for a mock driver, then bucket size returns incorrect number of blobs.
It's not a big deal but it's annoying because it can happen when running deltacloud client
tests (if blob deletion fails).
> 127.000.000.001.45166-127.000.000.001.03001: GET /api/buckets/bucket1 HTTP/1.1
> Accept: application/xml
> Accept-Encoding: gzip, deflate
> Authorization: Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
> User-Agent: Ruby
> Host: localhost:3001
>  
>  
> 127.000.000.001.03001-127.000.000.001.45166: HTTP/1.1 200 OK
> Content-Type: application/xml
> X-Backend-Runtime: 0.002238750457763672
> Server: Apache-Deltacloud/1.1.1
> X-Deltacloud-Driver: mock
> Content-Length: 505
> ETag: 51560b495bc803adcb213dae216911a7
> Cache-Control: max-age=0, private, must-revalidate
> Date: Mon, 25 Feb 2013 13:25:36 GMT
> Connection: keep-alive
>  
> <?xml version='1.0' encoding='utf-8' ?>
> <bucket href='http://localhost:3001/api/buckets/bucket1' id='bucket1'>
>   <name>bucket1</name>
>   <size>3</size>
>   <blob href='http://localhost:3001/api/buckets/bucket1/blob1' id='blob1'></blob>
>   <blob href='http://localhost:3001/api/buckets/bucket1/some_new_blob' id='some_new_blob'></blob>
>   <blob href='http://localhost:3001/api/buckets/bucket1/blob2' id='blob2'></blob>
>   <blob href='http://localhost:3001/api/buckets/bucket1/blob3' id='blob3'></blob>
> </bucket>

--
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

Mime
View raw message