X-Timestamp missing from object PUT/COPY response headers

Bug #1509429 reported by Robert Francis
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
In Progress
Low
Mustafa Çelik

Bug Description

Swift version 2.5.1.dev6
The Swift API, http://developer.openstack.org/api-ref-objectstorage-v1.html , indicates that object PUT/COPY should include X-Timestamp in the response headers, but a simple test indicates that X-Timestamp is missing.

Revision history for this message
Robert Francis (robefran) wrote :
Revision history for this message
clayg (clay-gerrard) wrote :

That was never in the response, not sure why it got documented that way.

Although I seem to recall last time I noticed it that it wasn't going to be anything crazy to add it.

I think the X-Timestamp is missing from most other unsafe operations on the other storage servers too (e.g. container POST).

Changed in swift:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Robert Francis (robefran) wrote :

Perhaps the best way to fix this is to update the Swift API under openstack-api-site to match the implemented behaviour.
I would raise the importance to Medium, I always get nervous when behaviour does not match the API. Makes me suspicious of the entire API. We should also add some tests to catch when behaviour does not match the published API.

I was going to use the X-Timestamp in the COPY response as part of tiering middleware.
I was going to use this X-Timestamp to force the timestamp of the symlink created after the copy to the cold-tier.
Clay, you discussed this timestamp manipulation in the tiering spec as a way to close a window of vulnerability between the COPY and the symlink creation.

I don't absolutely need the X-Timestamp from the COPY response, but it would be nice.
As an alternative, I can have the tiering middleware generate a timestamp, and force both the copied object and the symlink to
both use this middleware-generated timestamp.

Revision history for this message
Jason Gu (jasongu) wrote :

After going through each of the response headers documented under Swift API, I found additional missing X-Timestamps responses from the following APIs:

- Account:
                    POST

- Container:
                    POST PUT DELETE

- Object:
                   COPY POST PUT

Changed in swift:
assignee: nobody → Mustafa (celikmustafa89)
Revision history for this message
Robert Francis (robefran) wrote :

Mustafa, do you plan to fix this in Swift, or in the docs (openstack-api-site) ?

Revision history for this message
Mustafa Çelik (celikmustafa89) wrote :

in swift

Revision history for this message
Jason Gu (jasongu) wrote :

Hi Mustafa, just a heads up but I have a functional test for the APIs, which I will upload to the community soon.

Revision history for this message
Mustafa Çelik (celikmustafa89) wrote :

also object delete does not have timestamp either

- Object:
                 DELETE

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to swift (master)

Fix proposed to branch: master
Review: https://review.openstack.org/268163

Changed in swift:
status: Confirmed → In Progress
Revision history for this message
Mustafa Çelik (celikmustafa89) wrote :

I sent my code to review. Can you review it?

Also I'am working on openstack-api-site for this bug. I'm gone sent it soon for review.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to swift (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/269810

Revision history for this message
Mustafa Çelik (celikmustafa89) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.