Comment 2 for bug 1598093

Revision history for this message
Dariusz DziaƂak (ddzialak) wrote : Re: [Bug 1598093] Re: Dynamic Large Object does not work with "?" in prefix

The header is always url-encoded, so in the request there is already "%3F".
Do you want to uncode it once again?
For the next week I'll be unavailable but for now I reproduced that bug
with python-swiftclient.

manifest location: container/file?2
prefix for segments: segments/file?2/1467410424.120684/123000000/6000000/

Looks like dlo is formatting wrong request to the proxy and try to get
"segments/file" which does not exists (and there is 404 response):

Jul 1 22:40:08 108253809cd3 object-server: 127.0.0.1 - -
[01/Jul/2016:22:40:08 +0000] "GET /sdb1/104/AUTH_test/container/file%3F2"
200 - "GET http://127.0.0.1:8080/v1/AUTH_test/container/file%3F2"
"tx61bc267352de45129421f-005776f148" "proxy-server 544" 0.0009
Jul 1 22:40:08 108253809cd3 container-server: 127.0.0.1 - -
[01/Jul/2016:22:40:08 +0000] "GET /sdb1/64/AUTH_test/segments" 200 4578
"tx61bc267352de45129421f-005776f148" "GET
http://127.0.0.1:8080/v1/AUTH_test/segments?format=json&prefix=file%3F2/1467410424.120684/123000000/6000000/"
"proxy-server 544" 0.0042
Jul 1 22:40:08 108253809cd3 proxy-server: - - 01/Jul/2016/22/40/08 GET
/v1/AUTH_test/segments%3Fformat%3Djson%26prefix%3Dfile%253F2/1467410424.120684/123000000/6000000/
HTTP/1.0 200 -
python-requests/2.2.1%20CPython/2.7.6%20Linux/4.4.0-24-generic%20DLO%20MultipartGET
AUTH_tk53ba255234764381902cbddfcd64bdc1 - 4578 -
tx61bc267352de45129421f-005776f148 - 0.0085 DLO - 1467412808.672676086
1467412808.681154013
Jul 1 22:40:08 108253809cd3 object-server: 127.0.0.1 - -
[01/Jul/2016:22:40:08 +0000] "GET /sdb1/95/AUTH_test/segments/file" 404 -
"GET
http://127.0.0.1:8080/v1/AUTH_test/segments/file?2/1467410424.120684/123000000/6000000/00000000?multipart-manifest=get"
"tx61bc267352de45129421f-005776f148" "proxy-server 544" 0.0004

It's even more funny, I've stored object: segments/file and received log:
Jul 1 22:47:46 108253809cd3 proxy-server: - - 01/Jul/2016/22/47/46 GET
/v1/AUTH_test/segments/file%3F2/1467410424.120684/123000000/6000000/00000020%3Fmultipart-manifest%3Dget
HTTP/1.0 499 -
python-requests/2.2.1%20CPython/2.7.6%20Linux/4.4.0-24-generic%20%20DLO%20MultipartGET
AUTH_tk53ba255234764381902cbddfcd64bdc1 - 3014656 -
txa172304a884d4e8585287-005776f308 - 0.0303 DLO - 1467413266.517827034
1467413266.548119068
Jul 1 22:47:46 108253809cd3 proxy-server: Client disconnected on read
(txn: txa172304a884d4e8585287-005776f308)
Jul 1 22:47:46 108253809cd3 proxy-server: Too many bytes for
/v1/AUTH_test/container/file%3F2; truncating in /v1/AUTH_test/segments/file
with -14656 bytes left: #012Traceback (most recent call last):#012 File
"/usr/lib/python2.7/dist-packages/swift/common/request_helpers.py", line
346, in __iter__#012 'left': bytes_left})#012SegmentError: Too many
bytes for /v1/AUTH_test/container/file%3F2; truncating in
/v1/AUTH_test/segments/file with -14656 bytes left (txn:
txa172304a884d4e8585287-005776f308)

BUT client left that file:
root@108253809cd3:/# swift download container 'file?2'
file?2 [auth 0.016s, headers 0.066s, total 10.564s, 11.661 MB/s]
root@108253809cd3:/# lswift stat container 'file?2'
           URL: http://127.0.0.1:8080/v1/AUTH_test/container/file?2
    Auth Token: AUTH_tk53ba255234764381902cbddfcd64bdc1
       Account: AUTH_test
     Container: container
        Object: file?2
  Content Type: application/octet-stream
Content Length: 123000000
 Last Modified: Fri, 01 Jul 2016 22:00:57 GMT
          ETag: "854673b7d042ff5e68160dfcb166a47d"
root@108253809cd3:/# md5sum file\?2
1ed7087fb609ca77421eb5bfdb3768a1 file?2
root@108253809cd3:/# md5sum file # original one
bee124f5472bb2234eec6a953433bd17 file

so, etag of dlo object seems to be something else then md5 of whole file so
how client can deduce that contents are invalid?

On Fri, Jul 1, 2016 at 8:48 PM, Tim Burke <email address hidden> wrote:

> Does it work if you replace '?' with '%3F' (so the question mark is URL-
> encoded)?
>
> Either way, the 500 is definitely a bug.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1598093
>
> Title:
> Dynamic Large Object does not work with "?" in prefix
>
> Status in OpenStack Object Storage (swift):
> New
>
> Bug description:
> It's about storing dlo manifest with header X-Object-Manifest:
> <container>/<prefix>
>
> I've tried to put segments to virtual directory (prefix) with char "?"
> but reading such object failed with "500 Internal Server Error"
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/swift/+bug/1598093/+subscriptions
>