Comment 6 for bug 966671

Revision history for this message
Samuel Merritt (torgomatic) wrote :

This isn't something that can be checked at object-server start. Devices can be mounted and unmounted while the object server is running, the ring can change while the object server is running... and that's just off the top of my head.

One way to fix this might be to change the ordering of data and metadata writes in the object server. Currently, it looks something like this:

  * create tempfile
  * fallocate()
  * write data, ..., write data
  * write xattrs
  * rename tempfile

If we moved the metadata writing up, then we'd be better off:

  * create tempfile
  * fallocate()
  * write xattrs
  * write data, ..., write data
  * rename tempfile

Then we could catch IOError with the right errno and turn that into a 507 response from the object server, and we can also log a human-readable message about xattr support at the same time.

If we did that, then the proxy could see the 507 and move on to a handoff node before sending any request body to the backend; as it is now, the proxy sends all the bytes over and then gets a 500, which is wasteful.