Comment 3 for bug 1641239

Revision history for this message
Joshua Randall (jcrandall) wrote :

We were seeing occasional failures when attempting to make an update to an existing image, which occurred both using the glance cli or using the SDK `update` method. We believe we have tracked the underlying cause down to this issue.

To assist others in finding this, the user-facing error message we were getting was an HTTP exception from the server:

```
415 Unsupported Media Type: The server could not comply with the request since it is either malformed or otherwise incorrect.
```

This occurs when images.update() is called (which in turn results in a call to `patch`).

The server is expecting a content-type of 'application/openstack-images-v2.1-json-patch' but because of this bug, sometimes it gets the default content-type of application/octet-stream instead. I believe what is happening is that the client is sending both Content-Type headers with a nondeterministic ordering, and depending on the order the server either parses the patch correctly or returns the 415 status code.

We observe this behaviour in release versions 2.1.0 - 2.6.0, but not in release 2.0.0 (which pre-dates the commits that appear to cause this bug).