awkward copy request logs

Bug #1381178 reported by clayg
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)

Bug Description

so this request:

curl -H 'x-auth-token: xxx' http://saio:8080/v1/AUTH_test/test/test -XCOPY -H 'destination: test/monkies'

got logged as:

Oct 14 18:36:08 saio proxy-server: 14/Oct/2014/18/36/08 COPY /v1/AUTH_test/test/monkies HTTP/1.0 201 - curl/7.22.0%20%28x86_64-pc-linux-gnu%29%20libcurl/7.22.0%20OpenSSL/1.0.1%20zlib/ AUTH_tk3e9714a60... - - - tx98f0dc4835d4462f97e56-00543d6d18 - 0.0367 - x-copy-from:/test/test 1413311768.468540907 1413311768.505238056

I think this is wrong for two reasons:

1) I didn't copy /v1/AUTH_test/test/monkies, I *COPY* /v1/AUTH_test/test/test
2) I didn't 'x-copy-from: /test/test', I 'destination: test/monkies'

I think we should either, log the request as delivered copy (copy /test/test destination test/monkies) - or probably better/easier log the request as processed (put test/monkies x-copy-from test/test).

I think at one time we decided that we should only log GET/HEAD/PUT/POST and the COPY verb was to be logged as PUT with x-copy-from as it's processed - but maybe with the double proxy-logging middleware we missed a place where we need to straighten out the method? Similar to what happend in #1025433?

Changed in swift:
assignee: nobody → Victor Feitosa (victor-feitosa)
Revision history for this message
Victor Feitosa (victor-feitosa) wrote :

I think you're misreading your log message. Please try to copy again and check your log once again. My log in latest master prompts the following:

    HTTP/1.1 201 Created
    Content-Length: 0
    X-Copied-From-Last-Modified: Wed, 11 Feb 2015 17:15:37 GMT
    X-Copied-From: container1/testfile
    Last-Modified: Wed, 11 Feb 2015 19:08:32 GMT
    Etag: b229fb388c5bd807c6cef941dcf0de1f
    X-Object-Meta-Orig-Filename: testfile
    X-Copied-From-Account: testaccount
    Content-Type: text/html; charset=UTF-8
    X-Trans-Id: tx3c5dc3501d394be5863bc-0054dba8af
    Date: Wed, 11 Feb 2015 19:08:31 GMT

'X-Copied-From' is correct and the file is copied correctly.
The command is: curl -v -i -X COPY -H "X-Auth-Token: $TOKEN" -H "Destination: container2/testfilecopie"

I'll put this as incomplete. If you're still experience weird log messages please notify.

Changed in swift:
status: New → Invalid
assignee: Victor Feitosa (victor-feitosa) → nobody
Revision history for this message
Christian Schwede (cschwede) wrote :

I see the same log entry like Clay, thus marking this bug as Confirmed.

Looks like the log message could take some improvement for COPY requests (as Clay mentioned).

Changed in swift:
status: Invalid → Confirmed
Revision history for this message
Victor Feitosa (victor-feitosa) wrote :

Check the release you're both using, i tried the same thing again and i got success and a clean log message yet again...

Revision history for this message
Christian Schwede (cschwede) wrote :

Victor, I was using the latest commit from the master branch. Which release did you use?

Could you also paste your log messages here (the one from the logfile itself, not the message returned from the client you posted above)? That would be very helpful.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers