HEAD and GET inconsistencies in Keystone
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Identity (keystone) |
Fix Released
|
Medium
|
Morgan Fainberg | ||
Icehouse |
Fix Released
|
Medium
|
Morgan Fainberg | ||
openstack-api-site |
Fix Released
|
Medium
|
Diane Fleming | ||
tempest |
Fix Released
|
Undecided
|
Morgan Fainberg |
Bug Description
While trying to convert Keystone to gate/check under mod_wsgi, it was noticed that occasionally a few HEAD calls were returning HTTP 200 where under eventlet they consistently return HTTP 204.
This is an inconsistency within Keystone. Based upon the RFC, HEAD should be identitcal to GET except that there is no body returned. Apache + MOD_WSGI in some cases converts a HEAD request to a GET request to the back-end wsgi application to avoid issues where the headers cannot be built to be sent as part of the response (this can occur when no content is returned from the wsgi app).
This situation shows that Keystone should likely never build specific HEAD request methods and have HEAD simply call to the controller GET handler, the wsgi-layer should then simply remove the response body.
This will help to simplify Keystone's code as well as mkae the API responses more consistent.
Example Error in Gate:
2014-06-25 05:20:37.820 | tempest.
2014-06-25 05:20:37.820 | -------
2014-06-25 05:20:37.820 |
2014-06-25 05:20:37.820 | Captured traceback:
2014-06-25 05:20:37.820 | ~~~~~~~~~~~~~~~~~~~
2014-06-25 05:20:37.820 | Traceback (most recent call last):
2014-06-25 05:20:37.820 | File "tempest/
2014-06-25 05:20:37.820 | self.check_
2014-06-25 05:20:37.820 | File "tempest/
2014-06-25 05:20:37.821 | self.assertEqua
2014-06-25 05:20:37.821 | File "/usr/local/
2014-06-25 05:20:37.821 | self.assertThat
2014-06-25 05:20:37.821 | File "/usr/local/
2014-06-25 05:20:37.821 | raise mismatch_error
2014-06-25 05:20:37.821 | MismatchError: '204' != '200'
This is likely going to require changes to Keystone, Keystoneclient, Tempest, and possibly services that consume data from keystone.
Changed in keystone: | |
importance: | Undecided → Medium |
status: | New → Triaged |
assignee: | nobody → Morgan Fainberg (mdrnstm) |
Changed in keystone: | |
milestone: | none → juno-2 |
status: | Fix Committed → Fix Released |
tags: | added: in-stable-icehouse |
tags: | added: identity-api |
Changed in openstack-api-site: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in keystone: | |
milestone: | juno-2 → 2014.2 |
Morgon,
I verified this and Apache converts HEAD to GET.