DeltaCloud
  1. DeltaCloud
  2. DTACLOUD-172

Creating blob using PUT/format=json returns 'HTTP/1.1 406 Not Acceptable' - blob is successfully created

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Component/s: Server
    • Labels:
      None
    • Environment:

      Description

      Creating blob using PUT/format=json returns 'HTTP/1.1 406 Not Acceptable' although blob is successfully created:

      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 "/home/rlandy/Temp/rhel62rhevm.xml" --user "username:password" "http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob6?format=json"

      • 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'
        > PUT /api/buckets/bucket-rlandy2/03222012blob6?format=json 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
        > Content-Length: 931
        > Expect: 100-continue
        >
      • Done waiting for 100-continue
      • We are completely uploaded and fine
        < HTTP/1.1 406 Not Acceptable
        HTTP/1.1 406 Not Acceptable
        < Content-Type: text/html;charset=utf-8
        Content-Type: text/html;charset=utf-8
        < 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 20:48:02 GMT
        Date: Thu, 22 Mar 2012 20:48:02 GMT
        < X-Runtime: 0.907590
        X-Runtime: 0.907590
        < X-XSS-Protection: 1; mode=block
        X-XSS-Protection: 1; mode=block
        < Content-Length: 0
        Content-Length: 0
        < Connection: keep-alive
        Connection: keep-alive
        <
      • Connection #0 to host localhost left intact
      • Closing connection #0

      Assigning to Marios as requested

        Activity

        Hide
        Marios Andreou added a comment -

        attached patch should resolve issue

        Show
        Marios Andreou added a comment - attached patch should resolve issue
        Hide
        Marios Andreou added a comment -

        please test with attached patch

        Show
        Marios Andreou added a comment - please test with attached patch
        Hide
        Ronelle Landy added a comment -

        Tested with deltacloud git commit version: 59659586a6783bd4c851056813ed8369d08d4589 plus attached patch.

        Verified that deltacloud no longer returns a 'HTTP/1.1 406 Not Acceptable' with json output:

        >> curl -H 'content-type: text/html' -H 'X-Deltacloud-Blobmeta-Name:blob03272012_3' -H 'X-Deltacloud-Blobmeta-Version:2.4' -H 'X-Deltacloud-Blobmeta-Author:rlandy' -iv --upload-file "/home/rlandy/Temp/rhel62rhevm.xml" --user "username:password" "http://qe-blade-02.idm.lab.bos.redhat.com:3009/api/buckets/bucket_rlandy/blob03272012_3?format=json"

        • 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'
          > PUT /api/buckets/bucket_rlandy/blob03272012_3?format=json 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:blob03272012_3
          > X-Deltacloud-Blobmeta-Version:2.4
          > X-Deltacloud-Blobmeta-Author:rlandy
          > Content-Length: 931
          > Expect: 100-continue
          >
        • Done waiting for 100-continue
        • We are completely uploaded and fine
          < HTTP/1.1 200 OK
          HTTP/1.1 200 OK
          < X-XSS-Protection: 1; mode=block
          X-XSS-Protection: 1; mode=block
          < X-Runtime: 0.587748
          X-Runtime: 0.587748
          < Content-Length: 336
          Content-Length: 336
          < Cache-Control: max-age=0, private, must-revalidate
          Cache-Control: max-age=0, private, must-revalidate
          < X-Frame-Options: sameorigin
          X-Frame-Options: sameorigin
          < Server: Apache-Deltacloud/0.5.0
          Server: Apache-Deltacloud/0.5.0
          < ETag: "69c6a109f9b1db2bf0154d70afae56a9"
          ETag: "69c6a109f9b1db2bf0154d70afae56a9"
          < Date: Tue, 27 Mar 2012 22:13:15 GMT
          Date: Tue, 27 Mar 2012 22:13:15 GMT
          < Content-Type: application/json
          Content-Type: application/json
          < Connection: keep-alive
          Connection: keep-alive

        <

        • Connection #0 to host qe-blade-02.idm.lab.bos.redhat.com left intact
        • Closing connection #0
          {"blob":{"content_length":931,"href":"http://qe-blade-02.idm.lab.bos.redhat.com:3009/api/buckets/bucket_rlandy/blob03272012_3","last_modified":"","bucket":"bucket_rlandy","content_type":"text/html","user_metadata":[["x-amz-meta-name","blob03272012_3"],["x-amz-meta-author","rlandy"],["x-amz-meta-version","2.4"]],"id":"blob03272012_3"}}[rlandy@localhost /]$
        Show
        Ronelle Landy added a comment - Tested with deltacloud git commit version: 59659586a6783bd4c851056813ed8369d08d4589 plus attached patch. Verified that deltacloud no longer returns a 'HTTP/1.1 406 Not Acceptable' with json output: >> curl -H 'content-type: text/html' -H 'X-Deltacloud-Blobmeta-Name:blob03272012_3' -H 'X-Deltacloud-Blobmeta-Version:2.4' -H 'X-Deltacloud-Blobmeta-Author:rlandy' -iv --upload-file "/home/rlandy/Temp/rhel62rhevm.xml" --user "username:password" "http://qe-blade-02.idm.lab.bos.redhat.com:3009/api/buckets/bucket_rlandy/blob03272012_3?format=json" 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' > PUT /api/buckets/bucket_rlandy/blob03272012_3?format=json 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:blob03272012_3 > X-Deltacloud-Blobmeta-Version:2.4 > X-Deltacloud-Blobmeta-Author:rlandy > Content-Length: 931 > Expect: 100-continue > Done waiting for 100-continue We are completely uploaded and fine < HTTP/1.1 200 OK HTTP/1.1 200 OK < X-XSS-Protection: 1; mode=block X-XSS-Protection: 1; mode=block < X-Runtime: 0.587748 X-Runtime: 0.587748 < Content-Length: 336 Content-Length: 336 < Cache-Control: max-age=0, private, must-revalidate Cache-Control: max-age=0, private, must-revalidate < X-Frame-Options: sameorigin X-Frame-Options: sameorigin < Server: Apache-Deltacloud/0.5.0 Server: Apache-Deltacloud/0.5.0 < ETag: "69c6a109f9b1db2bf0154d70afae56a9" ETag: "69c6a109f9b1db2bf0154d70afae56a9" < Date: Tue, 27 Mar 2012 22:13:15 GMT Date: Tue, 27 Mar 2012 22:13:15 GMT < Content-Type: application/json Content-Type: application/json < Connection: keep-alive Connection: keep-alive < Connection #0 to host qe-blade-02.idm.lab.bos.redhat.com left intact Closing connection #0 {"blob":{"content_length":931,"href":"http://qe-blade-02.idm.lab.bos.redhat.com:3009/api/buckets/bucket_rlandy/blob03272012_3","last_modified":"","bucket":"bucket_rlandy","content_type":"text/html","user_metadata":[ ["x-amz-meta-name","blob03272012_3"] , ["x-amz-meta-author","rlandy"] , ["x-amz-meta-version","2.4"] ],"id":"blob03272012_3"}} [rlandy@localhost /] $
        Hide
        Ronelle Landy added a comment -

        Assigning back to Marios to commit the attached patch to git master branch. Will close out this JIRA once tests are run and verification is done on the code in master branch.

        Show
        Ronelle Landy added a comment - Assigning back to Marios to commit the attached patch to git master branch. Will close out this JIRA once tests are run and verification is done on the code in master branch.
        Hide
        Marios Andreou added a comment -

        Pushed to master:

        commit d2d9cab9475f104bcf9156f33f51ad71927c1262
        Author: marios <marios@redhat.com>
        Date: Mon Mar 26 14:12:09 2012 +0300

        Fixes DTACLOUD-172: Adds json format for non-streaming blob creation

        https://issues.apache.org/jira/browse/DTACLOUD-172

        Show
        Marios Andreou added a comment - Pushed to master: commit d2d9cab9475f104bcf9156f33f51ad71927c1262 Author: marios <marios@redhat.com> Date: Mon Mar 26 14:12:09 2012 +0300 Fixes DTACLOUD-172 : Adds json format for non-streaming blob creation https://issues.apache.org/jira/browse/DTACLOUD-172
        Hide
        Marios Andreou added a comment -

        pushed to master - please test and close, thanks.

        Show
        Marios Andreou added a comment - pushed to master - please test and close, thanks.
        Hide
        Ronelle Landy added a comment -

        Closing JIRA as fixed.

        Tested deltacloud commit version: bd67983cac800cec97e4ff5aa0b3ac491452a2f7

        curl -H 'content-type: text/html' -H 'X-Deltacloud-Blobmeta-Name:blob_name03272012_4' -H 'X-Deltacloud-Blobmeta-Version:2.4' -H 'X-Deltacloud-Blobmeta-Author:rlandy' -iv --upload-file "/home/rlandy/Temp/rhel62rhevm.xml" --user "uname:password" "http://localhost:4008/api/buckets/bucket_rlandy/blob03272012_4?format=json"

        • About to connect() to localhost port 4008 (#0)
        • Trying 127.0.0.1... connected
        • Connected to localhost (127.0.0.1) port 4008 (#0)
        • Server auth using Basic with user 'xxx'
          > PUT /api/buckets/bucket_rlandy/blob03272012_4?format=json 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:4008
          > Accept: /
          > content-type: text/html
          > X-Deltacloud-Blobmeta-Name:blob_name03272012_4
          > X-Deltacloud-Blobmeta-Version:2.4
          > X-Deltacloud-Blobmeta-Author:rlandy
          > Content-Length: 931
          > Expect: 100-continue
          >
        • Done waiting for 100-continue
        • We are completely uploaded and fine
          < HTTP/1.1 200 OK
          HTTP/1.1 200 OK
          < Content-Type: application/json
          Content-Type: application/json
          < Server: Apache-Deltacloud/0.5.0
          Server: Apache-Deltacloud/0.5.0
          < Content-Length: 316
          Content-Length: 316
          < X-XSS-Protection: 1; mode=block
          X-XSS-Protection: 1; mode=block
          < Cache-Control: max-age=0, private, must-revalidate
          Cache-Control: max-age=0, private, must-revalidate
          < X-Frame-Options: sameorigin
          X-Frame-Options: sameorigin
          < ETag: "b619f18dc22e418da2f62b19bedcb303"
          ETag: "b619f18dc22e418da2f62b19bedcb303"
          < Date: Wed, 28 Mar 2012 18:24:31 GMT
          Date: Wed, 28 Mar 2012 18:24:31 GMT
          < X-Runtime: 0.424842
          X-Runtime: 0.424842
          < Connection: keep-alive
          Connection: keep-alive

        <

        • Connection #0 to host localhost left intact
        • Closing connection #0
          {"blob":{"href":"http://localhost:4008/api/buckets/bucket_rlandy/blob03272012_4","last_modified":"","bucket":"bucket_rlandy","content_type":"text/html","id":"blob03272012_4","user_metadata":[["x-amz-meta-version","2.4"],["x-amz-meta-name","blob_name03272012_4"],["x-amz-meta-author","rlandy"]],"content_length":931}}[rlandy@localhost /]$
        Show
        Ronelle Landy added a comment - Closing JIRA as fixed. Tested deltacloud commit version: bd67983cac800cec97e4ff5aa0b3ac491452a2f7 curl -H 'content-type: text/html' -H 'X-Deltacloud-Blobmeta-Name:blob_name03272012_4' -H 'X-Deltacloud-Blobmeta-Version:2.4' -H 'X-Deltacloud-Blobmeta-Author:rlandy' -iv --upload-file "/home/rlandy/Temp/rhel62rhevm.xml" --user "uname:password" "http://localhost:4008/api/buckets/bucket_rlandy/blob03272012_4?format=json" About to connect() to localhost port 4008 (#0) Trying 127.0.0.1... connected Connected to localhost (127.0.0.1) port 4008 (#0) Server auth using Basic with user 'xxx' > PUT /api/buckets/bucket_rlandy/blob03272012_4?format=json 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:4008 > Accept: / > content-type: text/html > X-Deltacloud-Blobmeta-Name:blob_name03272012_4 > X-Deltacloud-Blobmeta-Version:2.4 > X-Deltacloud-Blobmeta-Author:rlandy > Content-Length: 931 > Expect: 100-continue > Done waiting for 100-continue We are completely uploaded and fine < HTTP/1.1 200 OK HTTP/1.1 200 OK < Content-Type: application/json Content-Type: application/json < Server: Apache-Deltacloud/0.5.0 Server: Apache-Deltacloud/0.5.0 < Content-Length: 316 Content-Length: 316 < X-XSS-Protection: 1; mode=block X-XSS-Protection: 1; mode=block < Cache-Control: max-age=0, private, must-revalidate Cache-Control: max-age=0, private, must-revalidate < X-Frame-Options: sameorigin X-Frame-Options: sameorigin < ETag: "b619f18dc22e418da2f62b19bedcb303" ETag: "b619f18dc22e418da2f62b19bedcb303" < Date: Wed, 28 Mar 2012 18:24:31 GMT Date: Wed, 28 Mar 2012 18:24:31 GMT < X-Runtime: 0.424842 X-Runtime: 0.424842 < Connection: keep-alive Connection: keep-alive < Connection #0 to host localhost left intact Closing connection #0 {"blob":{"href":"http://localhost:4008/api/buckets/bucket_rlandy/blob03272012_4","last_modified":"","bucket":"bucket_rlandy","content_type":"text/html","id":"blob03272012_4","user_metadata":[ ["x-amz-meta-version","2.4"] , ["x-amz-meta-name","blob_name03272012_4"] , ["x-amz-meta-author","rlandy"] ],"content_length":931}} [rlandy@localhost /] $

          People

          • Assignee:
            Ronelle Landy
            Reporter:
            Ronelle Landy
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development