DiskFile provides inconsistent view of metadata with fast-POST
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
Fix Released
|
Undecided
|
David Goetz |
Bug Description
When running swift-proxy with 'object_
Premise: an instance of the DiskFile class should accurately expose a correct representation of the stored data regardless of who creates the instance. If there is a failure, the failure should be explicit and readable data should not be discarded silently.
Failure: an instance of the DiskFile class will not report the correctly stored Content-Length for any object with a .meta file unless it is passed into the constructor as disallowed_
Steps to reproduce:
With a cluster configured for fast-POST (i.e. object_post_as_copy = false) upload an object, then POST a metadata update.
Example:
swift upload mycontainer myfile
swift post mycontainer myfile -m Color:Blue
Result:
python -c "from swift.obj.diskfile import DiskFile; print DiskFile(
{'name': '/AUTH_
Expected:
python -c "from swift.obj.diskfile import DiskFile; print DiskFile(
{'Content-
Before the change in c9de9f, DISALLOWED_HEADERS was a constant shared between the DiskFile and object-server, it was not part of any agreed interface between the two layers of abstraction, it was not possible for DiskFile to "incorrectly" report the Content-Length of an object stored on-disk correctly. The new diskfile abstraction does not need to accept a configurable set of allowed metadata key updates, it only needs to expose the metadata keys which it can not accurately accept into put_metadata.
Changed in swift: | |
assignee: | nobody → clayg (clay-gerrard) |
status: | New → In Progress |
Changed in swift: | |
assignee: | clayg (clay-gerrard) → David Goetz (david-goetz) |
Changed in swift: | |
milestone: | none → 1.10.0-rc1 |
status: | Fix Committed → Fix Released |
Changed in swift: | |
milestone: | 1.10.0-rc1 → 1.10.0 |
Reviewed: https:/ /review. openstack. org/39446 github. com/openstack/ swift/commit/ e8aa23e762b06b5 3fb0ca6bd03e003 24a8f6dba4
Committed: http://
Submitter: Jenkins
Branch: master
commit e8aa23e762b06b5 3fb0ca6bd03e003 24a8f6dba4
Author: Clay Gerrard <email address hidden>
Date: Wed Jul 31 02:57:59 2013 -0700
change .data vrs .meta file metadata filtering in obj.diskfile
Add DATAFILE_ SYSTEM_ META to diskfile.py which is a set of
system-set metadata keys that cannot be changed with a POST.
Fixes: bug #1214607
Change-Id: I4bdfc1e4813a1d 27fe726ba83481c 6e7194aab7f