You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by "Ronelle Landy (Created) (JIRA)" <ji...@apache.org> on 2012/03/23 20:19:28 UTC

[jira] [Created] (DTACLOUD-174) Executing "GET api/buckets/:bucket_id/:blob_id" where blob_id is non-existant returns 200 OK

Executing "GET api/buckets/:bucket_id/:blob_id" where blob_id is non-existant returns 200 OK
--------------------------------------------------------------------------------------------

                 Key: DTACLOUD-174
                 URL: https://issues.apache.org/jira/browse/DTACLOUD-174
             Project: DeltaCloud
          Issue Type: Bug
          Components: Server
         Environment:  - Deltacloud git commit version 7e372dfca79c02a799046287e5936129216b781b - branch 'master' of https://git-wip-us.apache.org/repos/asf/deltacloud
 - ec2 provider
 - Fedora 16, RHEL 6.2
            Reporter: Ronelle Landy
            Assignee: Marios Andreou


This issue was found by attempting to create a blob using the PUT format, but with empty upload_file. Deltacloud still says blob is created - GET api/buckets/:bucket_id does not return that blob.

 (note from Marios - real bug is here) When you use --upload-file with no input, it actually does a GET.  GET on a non-existant blob returns 200 OK

 curl  -H 'content-type: text/html' -H 'X-Deltacloud-Blobmeta-Name:myblob' -H  'X-Deltacloud-Blobmeta-Version:2.4' -H  'X-Deltacloud-Blobmeta-Author:rlandy' -iv --upload-file ""  --user  "username:password" "http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob7?format=xml"
* About to connect() to localhost port 3009 (#0)
*   Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 3009 (#0)
* Server auth using Basic with user 'AKIAJCBB265A57CGKR2Q'
> GET /api/buckets/bucket-rlandy2/03222012blob7?format=xml HTTP/1.1

(Note from Marios): HERE...^^^^^^^^^^^^^
The real bug then is that a GET on a non-existant blob returns 200 OK. This is due to the s3 gem.

> Authorization: Basic QUtJQUpDQkIyNjVBNTdDR0tSMlE6bVJxUG80QzU2NmVwT2F1SXhPNGZhRnNPZGVUeXVzN29PVmRIS2d3NQ==
> 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: localhost:3009
> Accept: */*
> content-type: text/html
> X-Deltacloud-Blobmeta-Name:myblob
> X-Deltacloud-Blobmeta-Version:2.4
> X-Deltacloud-Blobmeta-Author:rlandy
> 
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Content-Type: application/xml
Content-Type: application/xml
< ETag: "1e2b9f0b138187d17b3858795ffff479"
ETag: "1e2b9f0b138187d17b3858795ffff479"
< X-Frame-Options: sameorigin
X-Frame-Options: sameorigin
< Server: Apache-Deltacloud/0.5.0
Server: Apache-Deltacloud/0.5.0
< Date: Thu, 22 Mar 2012 21:09:07 GMT
Date: Thu, 22 Mar 2012 21:09:07 GMT
< X-Runtime: 0.841249
X-Runtime: 0.841249
< X-XSS-Protection: 1; mode=block
X-XSS-Protection: 1; mode=block
< Content-Length: 417
Content-Length: 417
< Cache-Control: max-age=0, private, must-revalidate
Cache-Control: max-age=0, private, must-revalidate
< Connection: keep-alive
Connection: keep-alive
< 
<?xml version='1.0' encoding='utf-8' ?>
<blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob7' id='03222012blob7'>
  <bucket>bucket-rlandy2</bucket>
  <content_length></content_length>
  <content_type></content_type>
  <last_modified></last_modified>
  <user_metadata>
  </user_metadata>
  <content href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob7/content'></content>
</blob>
* Connection #0 to host localhost left intact
* Closing connection #0

Note that 03222012blob7 is not returned here:
[rlandy@localhost server]$ curl -X GET --user "username:password" "http://localhost:3009/api/buckets/bucket-rlandy2?format=xml"
<?xml version='1.0' encoding='utf-8' ?>
<bucket href='http://localhost:3009/api/buckets/bucket-rlandy2' id='bucket-rlandy2'>
  <name>bucket-rlandy2</name>
  <size>6</size>
  <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob1' id='03222012blob1'></blob>
  <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob2' id='03222012blob2'></blob>
  <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob3' id='03222012blob3'></blob>
  <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob4' id='03222012blob4'></blob>
  <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob5' id='03222012blob5'></blob>
  <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob6' id='03222012blob6'></blob>
</bucket>
[rlandy@localhost server]$


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DTACLOUD-174) Executing "GET api/buckets/:bucket_id/:blob_id" where blob_id is non-existant returns 200 OK

Posted by "Ronelle Landy (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DTACLOUD-174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13240426#comment-13240426 ] 

Ronelle Landy commented on DTACLOUD-174:
----------------------------------------

Tested on deltacloud git commit version 59659586a6783bd4c851056813ed8369d08d4589 + attached patch:

curl -X GET --user "uname:password" "http://qe-blade-02.idm.lab.bos.redhat.com:3009/api/buckets/bucket_rlandy/nonblob?format=xml"
<h1>Not Found</h1>

Testing the initial command logged in this JIRA:

curl -H 'content-type: text/html' -H 'X-Deltacloud-Blobmeta-Name:myblob' -H 'X-Deltacloud-Blobmeta-Version:2.4' -H 'X-Deltacloud-Blobmeta-Author:rlandy' -iv --upload-file "" --user "uname:password" "http://qe-blade-02.idm.lab.bos.redhat.com:3009/api/buckets/bucket_rlandy/03222012blob7?format=xml" 
* About to connect() to qe-blade-02.idm.lab.bos.redhat.com port 3009 (#0)
*   Trying 10.16.76.33... connected
* Connected to qe-blade-02.idm.lab.bos.redhat.com (10.16.76.33) port 3009 (#0)
* Server auth using Basic with user 'xxx'
> GET /api/buckets/bucket_rlandy/03222012blob7?format=xml HTTP/1.1
> Authorization: Basic QUtJQUpDQkIyNjVBNTdDR0tSMlE6bVJxUG80QzU2NmVwT2F1SXhPNGZhRnNPZGVUeXVzN29PVmRIS2d3NQ==
> 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-02.idm.lab.bos.redhat.com:3009
> Accept: */*
> content-type: text/html
> X-Deltacloud-Blobmeta-Name:myblob
> X-Deltacloud-Blobmeta-Version:2.4
> X-Deltacloud-Blobmeta-Author:rlandy
> 
< HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
< Content-Type: text/html;charset=utf-8
Content-Type: text/html;charset=utf-8
< Content-Length: 18
Content-Length: 18
< X-Cascade: pass
X-Cascade: pass
< Date: Wed, 28 Mar 2012 13:58:41 GMT
Date: Wed, 28 Mar 2012 13:58:41 GMT
< X-XSS-Protection: 1; mode=block
X-XSS-Protection: 1; mode=block
< X-Frame-Options: sameorigin
X-Frame-Options: sameorigin
< X-Runtime: 0.429197
X-Runtime: 0.429197
< Server: Apache-Deltacloud/0.5.0
Server: Apache-Deltacloud/0.5.0
< Connection: keep-alive
Connection: keep-alive

< 
* Connection #0 to host qe-blade-02.idm.lab.bos.redhat.com left intact
* Closing connection #0
<h1>Not Found</h1>[rlandy@localhost /]$ 

Verified that the correct 'Not Found' message is returned.


                
> Executing "GET api/buckets/:bucket_id/:blob_id" where blob_id is non-existant returns 200 OK
> --------------------------------------------------------------------------------------------
>
>                 Key: DTACLOUD-174
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-174
>             Project: DeltaCloud
>          Issue Type: Bug
>          Components: Server
>         Environment:  - Deltacloud git commit version 7e372dfca79c02a799046287e5936129216b781b - branch 'master' of https://git-wip-us.apache.org/repos/asf/deltacloud
>  - ec2 provider
>  - Fedora 16, RHEL 6.2
>            Reporter: Ronelle Landy
>            Assignee: Ronelle Landy
>         Attachments: 0001-Fixes-DTACLOUD_174-GET-on-non-existant-blob-should-r.patch
>
>
> This issue was found by attempting to create a blob using the PUT format, but with empty upload_file. Deltacloud still says blob is created - GET api/buckets/:bucket_id does not return that blob.
>  (note from Marios - real bug is here) When you use --upload-file with no input, it actually does a GET.  GET on a non-existant blob returns 200 OK
>  curl  -H 'content-type: text/html' -H 'X-Deltacloud-Blobmeta-Name:myblob' -H  'X-Deltacloud-Blobmeta-Version:2.4' -H  'X-Deltacloud-Blobmeta-Author:rlandy' -iv --upload-file ""  --user  "username:password" "http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob7?format=xml"
> * About to connect() to localhost port 3009 (#0)
> *   Trying 127.0.0.1... connected
> * Connected to localhost (127.0.0.1) port 3009 (#0)
> * Server auth using Basic with user 'AKIAJCBB265A57CGKR2Q'
> > GET /api/buckets/bucket-rlandy2/03222012blob7?format=xml HTTP/1.1
> (Note from Marios): HERE...^^^^^^^^^^^^^
> The real bug then is that a GET on a non-existant blob returns 200 OK. This is due to the s3 gem.
> > Authorization: Basic QUtJQUpDQkIyNjVBNTdDR0tSMlE6bVJxUG80QzU2NmVwT2F1SXhPNGZhRnNPZGVUeXVzN29PVmRIS2d3NQ==
> > 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: localhost:3009
> > Accept: */*
> > content-type: text/html
> > X-Deltacloud-Blobmeta-Name:myblob
> > X-Deltacloud-Blobmeta-Version:2.4
> > X-Deltacloud-Blobmeta-Author:rlandy
> > 
> < HTTP/1.1 200 OK
> HTTP/1.1 200 OK
> < Content-Type: application/xml
> Content-Type: application/xml
> < ETag: "1e2b9f0b138187d17b3858795ffff479"
> ETag: "1e2b9f0b138187d17b3858795ffff479"
> < X-Frame-Options: sameorigin
> X-Frame-Options: sameorigin
> < Server: Apache-Deltacloud/0.5.0
> Server: Apache-Deltacloud/0.5.0
> < Date: Thu, 22 Mar 2012 21:09:07 GMT
> Date: Thu, 22 Mar 2012 21:09:07 GMT
> < X-Runtime: 0.841249
> X-Runtime: 0.841249
> < X-XSS-Protection: 1; mode=block
> X-XSS-Protection: 1; mode=block
> < Content-Length: 417
> Content-Length: 417
> < Cache-Control: max-age=0, private, must-revalidate
> Cache-Control: max-age=0, private, must-revalidate
> < Connection: keep-alive
> Connection: keep-alive
> < 
> <?xml version='1.0' encoding='utf-8' ?>
> <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob7' id='03222012blob7'>
>   <bucket>bucket-rlandy2</bucket>
>   <content_length></content_length>
>   <content_type></content_type>
>   <last_modified></last_modified>
>   <user_metadata>
>   </user_metadata>
>   <content href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob7/content'></content>
> </blob>
> * Connection #0 to host localhost left intact
> * Closing connection #0
> Note that 03222012blob7 is not returned here:
> [rlandy@localhost server]$ curl -X GET --user "username:password" "http://localhost:3009/api/buckets/bucket-rlandy2?format=xml"
> <?xml version='1.0' encoding='utf-8' ?>
> <bucket href='http://localhost:3009/api/buckets/bucket-rlandy2' id='bucket-rlandy2'>
>   <name>bucket-rlandy2</name>
>   <size>6</size>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob1' id='03222012blob1'></blob>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob2' id='03222012blob2'></blob>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob3' id='03222012blob3'></blob>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob4' id='03222012blob4'></blob>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob5' id='03222012blob5'></blob>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob6' id='03222012blob6'></blob>
> </bucket>
> [rlandy@localhost server]$

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (DTACLOUD-174) Executing "GET api/buckets/:bucket_id/:blob_id" where blob_id is non-existant returns 200 OK

Posted by "Marios Andreou (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DTACLOUD-174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marios Andreou reassigned DTACLOUD-174:
---------------------------------------

    Assignee: Ronelle Landy  (was: Marios Andreou)
    
> Executing "GET api/buckets/:bucket_id/:blob_id" where blob_id is non-existant returns 200 OK
> --------------------------------------------------------------------------------------------
>
>                 Key: DTACLOUD-174
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-174
>             Project: DeltaCloud
>          Issue Type: Bug
>          Components: Server
>         Environment:  - Deltacloud git commit version 7e372dfca79c02a799046287e5936129216b781b - branch 'master' of https://git-wip-us.apache.org/repos/asf/deltacloud
>  - ec2 provider
>  - Fedora 16, RHEL 6.2
>            Reporter: Ronelle Landy
>            Assignee: Ronelle Landy
>         Attachments: 0001-Fixes-DTACLOUD_174-GET-on-non-existant-blob-should-r.patch
>
>
> This issue was found by attempting to create a blob using the PUT format, but with empty upload_file. Deltacloud still says blob is created - GET api/buckets/:bucket_id does not return that blob.
>  (note from Marios - real bug is here) When you use --upload-file with no input, it actually does a GET.  GET on a non-existant blob returns 200 OK
>  curl  -H 'content-type: text/html' -H 'X-Deltacloud-Blobmeta-Name:myblob' -H  'X-Deltacloud-Blobmeta-Version:2.4' -H  'X-Deltacloud-Blobmeta-Author:rlandy' -iv --upload-file ""  --user  "username:password" "http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob7?format=xml"
> * About to connect() to localhost port 3009 (#0)
> *   Trying 127.0.0.1... connected
> * Connected to localhost (127.0.0.1) port 3009 (#0)
> * Server auth using Basic with user 'AKIAJCBB265A57CGKR2Q'
> > GET /api/buckets/bucket-rlandy2/03222012blob7?format=xml HTTP/1.1
> (Note from Marios): HERE...^^^^^^^^^^^^^
> The real bug then is that a GET on a non-existant blob returns 200 OK. This is due to the s3 gem.
> > Authorization: Basic QUtJQUpDQkIyNjVBNTdDR0tSMlE6bVJxUG80QzU2NmVwT2F1SXhPNGZhRnNPZGVUeXVzN29PVmRIS2d3NQ==
> > 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: localhost:3009
> > Accept: */*
> > content-type: text/html
> > X-Deltacloud-Blobmeta-Name:myblob
> > X-Deltacloud-Blobmeta-Version:2.4
> > X-Deltacloud-Blobmeta-Author:rlandy
> > 
> < HTTP/1.1 200 OK
> HTTP/1.1 200 OK
> < Content-Type: application/xml
> Content-Type: application/xml
> < ETag: "1e2b9f0b138187d17b3858795ffff479"
> ETag: "1e2b9f0b138187d17b3858795ffff479"
> < X-Frame-Options: sameorigin
> X-Frame-Options: sameorigin
> < Server: Apache-Deltacloud/0.5.0
> Server: Apache-Deltacloud/0.5.0
> < Date: Thu, 22 Mar 2012 21:09:07 GMT
> Date: Thu, 22 Mar 2012 21:09:07 GMT
> < X-Runtime: 0.841249
> X-Runtime: 0.841249
> < X-XSS-Protection: 1; mode=block
> X-XSS-Protection: 1; mode=block
> < Content-Length: 417
> Content-Length: 417
> < Cache-Control: max-age=0, private, must-revalidate
> Cache-Control: max-age=0, private, must-revalidate
> < Connection: keep-alive
> Connection: keep-alive
> < 
> <?xml version='1.0' encoding='utf-8' ?>
> <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob7' id='03222012blob7'>
>   <bucket>bucket-rlandy2</bucket>
>   <content_length></content_length>
>   <content_type></content_type>
>   <last_modified></last_modified>
>   <user_metadata>
>   </user_metadata>
>   <content href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob7/content'></content>
> </blob>
> * Connection #0 to host localhost left intact
> * Closing connection #0
> Note that 03222012blob7 is not returned here:
> [rlandy@localhost server]$ curl -X GET --user "username:password" "http://localhost:3009/api/buckets/bucket-rlandy2?format=xml"
> <?xml version='1.0' encoding='utf-8' ?>
> <bucket href='http://localhost:3009/api/buckets/bucket-rlandy2' id='bucket-rlandy2'>
>   <name>bucket-rlandy2</name>
>   <size>6</size>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob1' id='03222012blob1'></blob>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob2' id='03222012blob2'></blob>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob3' id='03222012blob3'></blob>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob4' id='03222012blob4'></blob>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob5' id='03222012blob5'></blob>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob6' id='03222012blob6'></blob>
> </bucket>
> [rlandy@localhost server]$

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (DTACLOUD-174) Executing "GET api/buckets/:bucket_id/:blob_id" where blob_id is non-existant returns 200 OK

Posted by "Ronelle Landy (Closed) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DTACLOUD-174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ronelle Landy closed DTACLOUD-174.
----------------------------------


Closing issue as fixed.

Tested deltacloud git commit version: a16c34de06776f91fb68cc49e6e1f7d2c815fc01

curl -X GET --user "uname:password" "http://localhost:3009/api/buckets/bucket_rlandy/noblob?format=xml"
<h1>Not Found</h1>

$ curl -H 'content-type: text/html' -H 'X-Deltacloud-Blobmeta-Name:myblob' -H 'X-Deltacloud-Blobmeta-Version:2.4' -H 'X-Deltacloud-Blobmeta-Author:rlandy' -iv --upload-file "" --user "uname:password" "http://localhost:3009/api/buckets/bucket_rlandy/03222012blob7?format=xml" 
* About to connect() to localhost port 3009 (#0)
*   Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 3009 (#0)
* Server auth using Basic with user 'xxx'
> GET /api/buckets/bucket_rlandy/03222012blob7?format=xml HTTP/1.1
> Authorization: Basic QUtJQUpDQkIyNjVBNTdDR0tSMlE6bVJxUG80QzU2NmVwT2F1SXhPNGZhRnNPZGVUeXVzN29PVmRIS2d3NQ==
> 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: localhost:3009
> Accept: */*
> content-type: text/html
> X-Deltacloud-Blobmeta-Name:myblob
> X-Deltacloud-Blobmeta-Version:2.4
> X-Deltacloud-Blobmeta-Author:rlandy
> 
< HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
< X-Frame-Options: sameorigin
X-Frame-Options: sameorigin
< Content-Type: text/html;charset=utf-8
Content-Type: text/html;charset=utf-8
< Content-Length: 18
Content-Length: 18
< Server: Apache-Deltacloud/0.5.0
Server: Apache-Deltacloud/0.5.0
< X-Runtime: 0.470474
X-Runtime: 0.470474
< X-Cascade: pass
X-Cascade: pass
< Date: Thu, 29 Mar 2012 17:46:27 GMT
Date: Thu, 29 Mar 2012 17:46:27 GMT
< X-XSS-Protection: 1; mode=block
X-XSS-Protection: 1; mode=block
< Connection: keep-alive
Connection: keep-alive

< 
* Connection #0 to host localhost left intact
* Closing connection #0
<h1>Not Found</h1>[rlandy@localhost /]$ 

                
> Executing "GET api/buckets/:bucket_id/:blob_id" where blob_id is non-existant returns 200 OK
> --------------------------------------------------------------------------------------------
>
>                 Key: DTACLOUD-174
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-174
>             Project: DeltaCloud
>          Issue Type: Bug
>          Components: Server
>         Environment:  - Deltacloud git commit version 7e372dfca79c02a799046287e5936129216b781b - branch 'master' of https://git-wip-us.apache.org/repos/asf/deltacloud
>  - ec2 provider
>  - Fedora 16, RHEL 6.2
>            Reporter: Ronelle Landy
>            Assignee: Ronelle Landy
>         Attachments: 0001-Fixes-DTACLOUD_174-GET-on-non-existant-blob-should-r.patch
>
>
> This issue was found by attempting to create a blob using the PUT format, but with empty upload_file. Deltacloud still says blob is created - GET api/buckets/:bucket_id does not return that blob.
>  (note from Marios - real bug is here) When you use --upload-file with no input, it actually does a GET.  GET on a non-existant blob returns 200 OK
>  curl  -H 'content-type: text/html' -H 'X-Deltacloud-Blobmeta-Name:myblob' -H  'X-Deltacloud-Blobmeta-Version:2.4' -H  'X-Deltacloud-Blobmeta-Author:rlandy' -iv --upload-file ""  --user  "username:password" "http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob7?format=xml"
> * About to connect() to localhost port 3009 (#0)
> *   Trying 127.0.0.1... connected
> * Connected to localhost (127.0.0.1) port 3009 (#0)
> * Server auth using Basic with user 'AKIAJCBB265A57CGKR2Q'
> > GET /api/buckets/bucket-rlandy2/03222012blob7?format=xml HTTP/1.1
> (Note from Marios): HERE...^^^^^^^^^^^^^
> The real bug then is that a GET on a non-existant blob returns 200 OK. This is due to the s3 gem.
> > Authorization: Basic QUtJQUpDQkIyNjVBNTdDR0tSMlE6bVJxUG80QzU2NmVwT2F1SXhPNGZhRnNPZGVUeXVzN29PVmRIS2d3NQ==
> > 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: localhost:3009
> > Accept: */*
> > content-type: text/html
> > X-Deltacloud-Blobmeta-Name:myblob
> > X-Deltacloud-Blobmeta-Version:2.4
> > X-Deltacloud-Blobmeta-Author:rlandy
> > 
> < HTTP/1.1 200 OK
> HTTP/1.1 200 OK
> < Content-Type: application/xml
> Content-Type: application/xml
> < ETag: "1e2b9f0b138187d17b3858795ffff479"
> ETag: "1e2b9f0b138187d17b3858795ffff479"
> < X-Frame-Options: sameorigin
> X-Frame-Options: sameorigin
> < Server: Apache-Deltacloud/0.5.0
> Server: Apache-Deltacloud/0.5.0
> < Date: Thu, 22 Mar 2012 21:09:07 GMT
> Date: Thu, 22 Mar 2012 21:09:07 GMT
> < X-Runtime: 0.841249
> X-Runtime: 0.841249
> < X-XSS-Protection: 1; mode=block
> X-XSS-Protection: 1; mode=block
> < Content-Length: 417
> Content-Length: 417
> < Cache-Control: max-age=0, private, must-revalidate
> Cache-Control: max-age=0, private, must-revalidate
> < Connection: keep-alive
> Connection: keep-alive
> < 
> <?xml version='1.0' encoding='utf-8' ?>
> <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob7' id='03222012blob7'>
>   <bucket>bucket-rlandy2</bucket>
>   <content_length></content_length>
>   <content_type></content_type>
>   <last_modified></last_modified>
>   <user_metadata>
>   </user_metadata>
>   <content href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob7/content'></content>
> </blob>
> * Connection #0 to host localhost left intact
> * Closing connection #0
> Note that 03222012blob7 is not returned here:
> [rlandy@localhost server]$ curl -X GET --user "username:password" "http://localhost:3009/api/buckets/bucket-rlandy2?format=xml"
> <?xml version='1.0' encoding='utf-8' ?>
> <bucket href='http://localhost:3009/api/buckets/bucket-rlandy2' id='bucket-rlandy2'>
>   <name>bucket-rlandy2</name>
>   <size>6</size>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob1' id='03222012blob1'></blob>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob2' id='03222012blob2'></blob>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob3' id='03222012blob3'></blob>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob4' id='03222012blob4'></blob>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob5' id='03222012blob5'></blob>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob6' id='03222012blob6'></blob>
> </bucket>
> [rlandy@localhost server]$

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (DTACLOUD-174) Executing "GET api/buckets/:bucket_id/:blob_id" where blob_id is non-existant returns 200 OK

Posted by "Marios Andreou (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DTACLOUD-174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marios Andreou resolved DTACLOUD-174.
-------------------------------------

    Resolution: Fixed
      Assignee: Ronelle Landy  (was: Marios Andreou)

pushed to master:

commit a16c34de06776f91fb68cc49e6e1f7d2c815fc01
Author: marios <ma...@redhat.com>
Date:   Mon Mar 26 15:07:25 2012 +0300

    Fixes DTACLOUD_174: GET on non-existant blob should return 404 (ec2 driver was giving 200OK)
    
    https://issues.apache.org/jira/browse/DTACLOUD-174

                
> Executing "GET api/buckets/:bucket_id/:blob_id" where blob_id is non-existant returns 200 OK
> --------------------------------------------------------------------------------------------
>
>                 Key: DTACLOUD-174
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-174
>             Project: DeltaCloud
>          Issue Type: Bug
>          Components: Server
>         Environment:  - Deltacloud git commit version 7e372dfca79c02a799046287e5936129216b781b - branch 'master' of https://git-wip-us.apache.org/repos/asf/deltacloud
>  - ec2 provider
>  - Fedora 16, RHEL 6.2
>            Reporter: Ronelle Landy
>            Assignee: Ronelle Landy
>         Attachments: 0001-Fixes-DTACLOUD_174-GET-on-non-existant-blob-should-r.patch
>
>
> This issue was found by attempting to create a blob using the PUT format, but with empty upload_file. Deltacloud still says blob is created - GET api/buckets/:bucket_id does not return that blob.
>  (note from Marios - real bug is here) When you use --upload-file with no input, it actually does a GET.  GET on a non-existant blob returns 200 OK
>  curl  -H 'content-type: text/html' -H 'X-Deltacloud-Blobmeta-Name:myblob' -H  'X-Deltacloud-Blobmeta-Version:2.4' -H  'X-Deltacloud-Blobmeta-Author:rlandy' -iv --upload-file ""  --user  "username:password" "http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob7?format=xml"
> * About to connect() to localhost port 3009 (#0)
> *   Trying 127.0.0.1... connected
> * Connected to localhost (127.0.0.1) port 3009 (#0)
> * Server auth using Basic with user 'AKIAJCBB265A57CGKR2Q'
> > GET /api/buckets/bucket-rlandy2/03222012blob7?format=xml HTTP/1.1
> (Note from Marios): HERE...^^^^^^^^^^^^^
> The real bug then is that a GET on a non-existant blob returns 200 OK. This is due to the s3 gem.
> > Authorization: Basic QUtJQUpDQkIyNjVBNTdDR0tSMlE6bVJxUG80QzU2NmVwT2F1SXhPNGZhRnNPZGVUeXVzN29PVmRIS2d3NQ==
> > 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: localhost:3009
> > Accept: */*
> > content-type: text/html
> > X-Deltacloud-Blobmeta-Name:myblob
> > X-Deltacloud-Blobmeta-Version:2.4
> > X-Deltacloud-Blobmeta-Author:rlandy
> > 
> < HTTP/1.1 200 OK
> HTTP/1.1 200 OK
> < Content-Type: application/xml
> Content-Type: application/xml
> < ETag: "1e2b9f0b138187d17b3858795ffff479"
> ETag: "1e2b9f0b138187d17b3858795ffff479"
> < X-Frame-Options: sameorigin
> X-Frame-Options: sameorigin
> < Server: Apache-Deltacloud/0.5.0
> Server: Apache-Deltacloud/0.5.0
> < Date: Thu, 22 Mar 2012 21:09:07 GMT
> Date: Thu, 22 Mar 2012 21:09:07 GMT
> < X-Runtime: 0.841249
> X-Runtime: 0.841249
> < X-XSS-Protection: 1; mode=block
> X-XSS-Protection: 1; mode=block
> < Content-Length: 417
> Content-Length: 417
> < Cache-Control: max-age=0, private, must-revalidate
> Cache-Control: max-age=0, private, must-revalidate
> < Connection: keep-alive
> Connection: keep-alive
> < 
> <?xml version='1.0' encoding='utf-8' ?>
> <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob7' id='03222012blob7'>
>   <bucket>bucket-rlandy2</bucket>
>   <content_length></content_length>
>   <content_type></content_type>
>   <last_modified></last_modified>
>   <user_metadata>
>   </user_metadata>
>   <content href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob7/content'></content>
> </blob>
> * Connection #0 to host localhost left intact
> * Closing connection #0
> Note that 03222012blob7 is not returned here:
> [rlandy@localhost server]$ curl -X GET --user "username:password" "http://localhost:3009/api/buckets/bucket-rlandy2?format=xml"
> <?xml version='1.0' encoding='utf-8' ?>
> <bucket href='http://localhost:3009/api/buckets/bucket-rlandy2' id='bucket-rlandy2'>
>   <name>bucket-rlandy2</name>
>   <size>6</size>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob1' id='03222012blob1'></blob>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob2' id='03222012blob2'></blob>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob3' id='03222012blob3'></blob>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob4' id='03222012blob4'></blob>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob5' id='03222012blob5'></blob>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob6' id='03222012blob6'></blob>
> </bucket>
> [rlandy@localhost server]$

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DTACLOUD-174) Executing "GET api/buckets/:bucket_id/:blob_id" where blob_id is non-existant returns 200 OK

Posted by "Marios Andreou (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DTACLOUD-174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marios Andreou updated DTACLOUD-174:
------------------------------------

    Attachment: 0001-Fixes-DTACLOUD_174-GET-on-non-existant-blob-should-r.patch

please test with attached patch
                
> Executing "GET api/buckets/:bucket_id/:blob_id" where blob_id is non-existant returns 200 OK
> --------------------------------------------------------------------------------------------
>
>                 Key: DTACLOUD-174
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-174
>             Project: DeltaCloud
>          Issue Type: Bug
>          Components: Server
>         Environment:  - Deltacloud git commit version 7e372dfca79c02a799046287e5936129216b781b - branch 'master' of https://git-wip-us.apache.org/repos/asf/deltacloud
>  - ec2 provider
>  - Fedora 16, RHEL 6.2
>            Reporter: Ronelle Landy
>            Assignee: Marios Andreou
>         Attachments: 0001-Fixes-DTACLOUD_174-GET-on-non-existant-blob-should-r.patch
>
>
> This issue was found by attempting to create a blob using the PUT format, but with empty upload_file. Deltacloud still says blob is created - GET api/buckets/:bucket_id does not return that blob.
>  (note from Marios - real bug is here) When you use --upload-file with no input, it actually does a GET.  GET on a non-existant blob returns 200 OK
>  curl  -H 'content-type: text/html' -H 'X-Deltacloud-Blobmeta-Name:myblob' -H  'X-Deltacloud-Blobmeta-Version:2.4' -H  'X-Deltacloud-Blobmeta-Author:rlandy' -iv --upload-file ""  --user  "username:password" "http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob7?format=xml"
> * About to connect() to localhost port 3009 (#0)
> *   Trying 127.0.0.1... connected
> * Connected to localhost (127.0.0.1) port 3009 (#0)
> * Server auth using Basic with user 'AKIAJCBB265A57CGKR2Q'
> > GET /api/buckets/bucket-rlandy2/03222012blob7?format=xml HTTP/1.1
> (Note from Marios): HERE...^^^^^^^^^^^^^
> The real bug then is that a GET on a non-existant blob returns 200 OK. This is due to the s3 gem.
> > Authorization: Basic QUtJQUpDQkIyNjVBNTdDR0tSMlE6bVJxUG80QzU2NmVwT2F1SXhPNGZhRnNPZGVUeXVzN29PVmRIS2d3NQ==
> > 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: localhost:3009
> > Accept: */*
> > content-type: text/html
> > X-Deltacloud-Blobmeta-Name:myblob
> > X-Deltacloud-Blobmeta-Version:2.4
> > X-Deltacloud-Blobmeta-Author:rlandy
> > 
> < HTTP/1.1 200 OK
> HTTP/1.1 200 OK
> < Content-Type: application/xml
> Content-Type: application/xml
> < ETag: "1e2b9f0b138187d17b3858795ffff479"
> ETag: "1e2b9f0b138187d17b3858795ffff479"
> < X-Frame-Options: sameorigin
> X-Frame-Options: sameorigin
> < Server: Apache-Deltacloud/0.5.0
> Server: Apache-Deltacloud/0.5.0
> < Date: Thu, 22 Mar 2012 21:09:07 GMT
> Date: Thu, 22 Mar 2012 21:09:07 GMT
> < X-Runtime: 0.841249
> X-Runtime: 0.841249
> < X-XSS-Protection: 1; mode=block
> X-XSS-Protection: 1; mode=block
> < Content-Length: 417
> Content-Length: 417
> < Cache-Control: max-age=0, private, must-revalidate
> Cache-Control: max-age=0, private, must-revalidate
> < Connection: keep-alive
> Connection: keep-alive
> < 
> <?xml version='1.0' encoding='utf-8' ?>
> <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob7' id='03222012blob7'>
>   <bucket>bucket-rlandy2</bucket>
>   <content_length></content_length>
>   <content_type></content_type>
>   <last_modified></last_modified>
>   <user_metadata>
>   </user_metadata>
>   <content href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob7/content'></content>
> </blob>
> * Connection #0 to host localhost left intact
> * Closing connection #0
> Note that 03222012blob7 is not returned here:
> [rlandy@localhost server]$ curl -X GET --user "username:password" "http://localhost:3009/api/buckets/bucket-rlandy2?format=xml"
> <?xml version='1.0' encoding='utf-8' ?>
> <bucket href='http://localhost:3009/api/buckets/bucket-rlandy2' id='bucket-rlandy2'>
>   <name>bucket-rlandy2</name>
>   <size>6</size>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob1' id='03222012blob1'></blob>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob2' id='03222012blob2'></blob>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob3' id='03222012blob3'></blob>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob4' id='03222012blob4'></blob>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob5' id='03222012blob5'></blob>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob6' id='03222012blob6'></blob>
> </bucket>
> [rlandy@localhost server]$

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (DTACLOUD-174) Executing "GET api/buckets/:bucket_id/:blob_id" where blob_id is non-existant returns 200 OK

Posted by "Ronelle Landy (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DTACLOUD-174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ronelle Landy reassigned DTACLOUD-174:
--------------------------------------

    Assignee: Marios Andreou  (was: Ronelle Landy)

Assinging back to Marios to commit the patch to the git master branch. Will close the JIRA out once this fix has been tested in master.
                
> Executing "GET api/buckets/:bucket_id/:blob_id" where blob_id is non-existant returns 200 OK
> --------------------------------------------------------------------------------------------
>
>                 Key: DTACLOUD-174
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-174
>             Project: DeltaCloud
>          Issue Type: Bug
>          Components: Server
>         Environment:  - Deltacloud git commit version 7e372dfca79c02a799046287e5936129216b781b - branch 'master' of https://git-wip-us.apache.org/repos/asf/deltacloud
>  - ec2 provider
>  - Fedora 16, RHEL 6.2
>            Reporter: Ronelle Landy
>            Assignee: Marios Andreou
>         Attachments: 0001-Fixes-DTACLOUD_174-GET-on-non-existant-blob-should-r.patch
>
>
> This issue was found by attempting to create a blob using the PUT format, but with empty upload_file. Deltacloud still says blob is created - GET api/buckets/:bucket_id does not return that blob.
>  (note from Marios - real bug is here) When you use --upload-file with no input, it actually does a GET.  GET on a non-existant blob returns 200 OK
>  curl  -H 'content-type: text/html' -H 'X-Deltacloud-Blobmeta-Name:myblob' -H  'X-Deltacloud-Blobmeta-Version:2.4' -H  'X-Deltacloud-Blobmeta-Author:rlandy' -iv --upload-file ""  --user  "username:password" "http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob7?format=xml"
> * About to connect() to localhost port 3009 (#0)
> *   Trying 127.0.0.1... connected
> * Connected to localhost (127.0.0.1) port 3009 (#0)
> * Server auth using Basic with user 'AKIAJCBB265A57CGKR2Q'
> > GET /api/buckets/bucket-rlandy2/03222012blob7?format=xml HTTP/1.1
> (Note from Marios): HERE...^^^^^^^^^^^^^
> The real bug then is that a GET on a non-existant blob returns 200 OK. This is due to the s3 gem.
> > Authorization: Basic QUtJQUpDQkIyNjVBNTdDR0tSMlE6bVJxUG80QzU2NmVwT2F1SXhPNGZhRnNPZGVUeXVzN29PVmRIS2d3NQ==
> > 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: localhost:3009
> > Accept: */*
> > content-type: text/html
> > X-Deltacloud-Blobmeta-Name:myblob
> > X-Deltacloud-Blobmeta-Version:2.4
> > X-Deltacloud-Blobmeta-Author:rlandy
> > 
> < HTTP/1.1 200 OK
> HTTP/1.1 200 OK
> < Content-Type: application/xml
> Content-Type: application/xml
> < ETag: "1e2b9f0b138187d17b3858795ffff479"
> ETag: "1e2b9f0b138187d17b3858795ffff479"
> < X-Frame-Options: sameorigin
> X-Frame-Options: sameorigin
> < Server: Apache-Deltacloud/0.5.0
> Server: Apache-Deltacloud/0.5.0
> < Date: Thu, 22 Mar 2012 21:09:07 GMT
> Date: Thu, 22 Mar 2012 21:09:07 GMT
> < X-Runtime: 0.841249
> X-Runtime: 0.841249
> < X-XSS-Protection: 1; mode=block
> X-XSS-Protection: 1; mode=block
> < Content-Length: 417
> Content-Length: 417
> < Cache-Control: max-age=0, private, must-revalidate
> Cache-Control: max-age=0, private, must-revalidate
> < Connection: keep-alive
> Connection: keep-alive
> < 
> <?xml version='1.0' encoding='utf-8' ?>
> <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob7' id='03222012blob7'>
>   <bucket>bucket-rlandy2</bucket>
>   <content_length></content_length>
>   <content_type></content_type>
>   <last_modified></last_modified>
>   <user_metadata>
>   </user_metadata>
>   <content href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob7/content'></content>
> </blob>
> * Connection #0 to host localhost left intact
> * Closing connection #0
> Note that 03222012blob7 is not returned here:
> [rlandy@localhost server]$ curl -X GET --user "username:password" "http://localhost:3009/api/buckets/bucket-rlandy2?format=xml"
> <?xml version='1.0' encoding='utf-8' ?>
> <bucket href='http://localhost:3009/api/buckets/bucket-rlandy2' id='bucket-rlandy2'>
>   <name>bucket-rlandy2</name>
>   <size>6</size>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob1' id='03222012blob1'></blob>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob2' id='03222012blob2'></blob>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob3' id='03222012blob3'></blob>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob4' id='03222012blob4'></blob>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob5' id='03222012blob5'></blob>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob6' id='03222012blob6'></blob>
> </bucket>
> [rlandy@localhost server]$

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira