← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1334368] Re: HEAD and GET inconsistencies in Keystone

 

Reviewed:  https://review.openstack.org/104673
Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=883311d64fd749315ee3639bff6c730e86026ac5
Submitter: Jenkins
Branch:    master

commit 883311d64fd749315ee3639bff6c730e86026ac5
Author: Morgan Fainberg <morgan.fainberg@xxxxxxxxx>
Date:   Thu Jul 3 13:13:10 2014 -0700

    Re-enable 'check_trust_roles'
    
    Re-enable the 'check_trust_roles' method. This can be
    merged after the patches for change id
    I13ce159cbe9739d4bf5d321fc4bd069245f32734 are merged
    (master and stable/icehouse for Keystone).
    
    This changeset updates the new location for the check_trust_role
    HTTP status validation (in services/identity/v3/json/identity_client.py).
    Previously this was located in identity/admin/v3/test_trusts.py.
    
    Commented code indicating the above location change occurred has been
    removed.
    
    Change-Id: If1b7f18d7a357f4b3a4b478e300a17f2cc4a6159
    Closes-Bug: #1334368


** Changed in: tempest
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1334368

Title:
  HEAD and GET inconsistencies in Keystone

Status in OpenStack Identity (Keystone):
  Fix Committed
Status in Keystone icehouse series:
  Fix Committed
Status in Tempest:
  Fix Released

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.api.identity.admin.v3.test_trusts.TrustsV3TestJSON.test_trust_expire[gate,smoke]
  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/api/identity/admin/v3/test_trusts.py", line 241, in test_trust_expire
  2014-06-25 05:20:37.820 |         self.check_trust_roles()
  2014-06-25 05:20:37.820 |       File "tempest/api/identity/admin/v3/test_trusts.py", line 173, in check_trust_roles
  2014-06-25 05:20:37.821 |         self.assertEqual('204', resp['status'])
  2014-06-25 05:20:37.821 |       File "/usr/local/lib/python2.7/dist-packages/testtools/testcase.py", line 321, in assertEqual
  2014-06-25 05:20:37.821 |         self.assertThat(observed, matcher, message)
  2014-06-25 05:20:37.821 |       File "/usr/local/lib/python2.7/dist-packages/testtools/testcase.py", line 406, in assertThat
  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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1334368/+subscriptions


References