object metadata not updated when file modified from file interface
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
swiftonfile |
Fix Committed
|
Medium
|
Bill Owen |
Bug Description
1. Create a file from the file interface or from the object interface
2. initially file downloads correctly with curl or swift client
3. modify the file on the file side by appending to the end of the file, for example "echo test >> obj.txt". This leaves the swift xattrs unchanged, but they are now showing the wrong size and etag.
4. download the file - the appended data is not downloaded. This is because content-length in the http request is set to the original size, so only the original N bytes of the file are downloaded. The etag for those bytes is correct still, so no message is logged by swift client.
5. modify the file by re-writing it to be shorter than the original object, without modifying the xattrs. For example, "echo t > obj.txt".
6. download hangs because content-length header is still set to the original size, and get request hangs waiting for content-length bytes to be delivered.
7. modify the file again by appending to it so that it's now longer than the original size, for example "date >> obj.txt", repeated until file length is larger than original object length stored in metadata.
8. download using curl successfully downloads the first N bytes of the object data, but etag is not correct (but not checked on the server side). The extra bytes are not downloaded.
9. download using swift client. The first N bytes of the object data are successfully downloaded, but the swift client logs a message about etag mismatch.
10. modify the file by so that xattrs are wiped out (for example, vi & save the file).
download returns the correct object data because new xattrs are calculated based on file contents in this case.
I think utils.validate_
Changed in swiftonfile: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in swiftonfile: | |
assignee: | nobody → Bill Owen (billowen) |
Changed in swiftonfile: | |
status: | Confirmed → In Progress |
Change abandoned by Prashanth Pai (<email address hidden>) on branch: master /review. openstack. org/151897
Review: https:/
Reason: This change will be broken down into multiple smaller changes.