Bug 1061329
| Summary: | Keystone returns HTTP 400 as SQLAlchemy raises None exceptions | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Community] RDO | Reporter: | Pavel Sedlák <psedlak> | ||||||
| Component: | distribution | Assignee: | Alan Pevec <apevec> | ||||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Ami Jeain <ajeain> | ||||||
| Severity: | unspecified | Docs Contact: | |||||||
| Priority: | unspecified | ||||||||
| Version: | unspecified | CC: | afazekas, apevec, ayoung, jlennox, markmc, msuchy, pbrady, psedlak, ukalifon, yeylon | ||||||
| Target Milestone: | GA | ||||||||
| Target Release: | Icehouse | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2014-05-07 15:42:06 UTC | Type: | Bug | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Bug Depends On: | |||||||||
| Bug Blocks: | 1061137 | ||||||||
| Attachments: |
|
||||||||
|
Description
Pavel Sedlák
2014-02-04 15:58:06 UTC
Created attachment 859223 [details]
answer file used with packstack
Created attachment 859224 [details] keystone.log APIv2 deprecation warnings filtered out with: > cat keystone.log | grep -v 'Deprecated: v2 API is deprecated as of Icehouse in favor of v3 API and may be removed in K.' > keystone_filtered.log So i'm by no means an expert in this but looking briefly exc info is cleared by preserves_excinfo defined here: https://bitbucket.org/eventlet/eventlet/src/ba405bb1eb5981c703624967d13f04f0352093c6/eventlet/support/greenlets.py?at=default so if you are using greenlet>=0.3.2 which is what is currently defined by the global requirements.txt then exception handling should be ok. Can you confirm that this is the case? I'm not sure what the fallback modes are. I don't think this is something we'll ever be able to handle in keystone. > so if you are using greenlet>=0.3.2 which is what is currently defined by
> the global requirements.txt then exception handling should be ok.
RDO el6 uses greenlet from EPEL6 which has python-greenlet-0.3.1-12.el6
> With RDO-Icehouse (m2 testday packages) on RHEL-6.5, Please try m3 and http://copr-be.cloud.fedoraproject.org/results/jruzicka/rdo-icehouse-epel-6/epel-6-x86_64/python-greenlet-0.4.2-1.el6/python-greenlet-0.4.2-1.el6.x86_64.rpm Upgrading to python-greenlet-0.4.2-1.el6.x86_64.rpm does not solves the issue, however it is recommended to use a version which is matches to the global-requirements. Upgrading sqlalchemy to 0.8.5 (same as in the current fedora) solves the issue, I also tried 0.7.10 which does not solves the issue. SQLAlchemy 0.8.6 also working. I recommend to upgrade to sqlalchemy to >=0.8.5. Looks like the global requirements wrong about the minimum sqlalchemy version: SQLAlchemy>=0.7.8,<=0.9.99 Look like an evenlet issue, evenlet upgrade also solves the issue. The current global requirement is : eventlet>=0.13.0 The currently packaged: python-eventlet-0.9.17-2.el6.noarch the pip installed version was: eventlet-0.14.0.tar.gz Simple CLI reproducer for an another similar failure: # keystone tenant-create --name foo +-------------+----------------------------------+ | Property | Value | +-------------+----------------------------------+ | description | | | enabled | True | | id | 260b1573ef924d159a2ddb70b2cccb96 | | name | foo | +-------------+----------------------------------+ # # Wrong response # # keystone tenant-create --name foo exceptions must be old-style classes or derived from BaseException, not NoneType (HTTP 400) # # Workaround # # yum install -y http://copr-be.cloud.fedoraproject.org/results/jruzicka/rdo-icehouse-epel-6/epel-6-x86_64/python-greenlet-0.4.2-1.el6/python-greenlet-0.4.2-1.el6.x86_64.rpm # pip install 'eventlet>=0.13.0' # service openstack-keystone restart # # Expected a 409 status code. # # keystone tenant-create --name foo Conflict occurred attempting to store project. (IntegrityError) (1062, "Duplicate entry 'default-foo' for key 'domain_id'") 'INSERT INTO project (id, name, domain_id, description, enabled, extra) VALUES (%s, %s, %s, %s, %s, %s)' ('f381b10377304900907cd48c0d2a51e9', 'foo', 'default', None, 1, '{}') (HTTP 409) It seems too verbose information for an end user, but the 409 is the good status code, and this operation must not cause error trace in the log files. Both python-eventlet and python-greenlet needs to be updated. python-eventlet >=0.12 includes a fix related to eventlet exception handling. eventlet and greenlet will be updated in epel6 but pushed as an immediate RDO update while the epel update goes through Bodhi. Note the latest python-olso-messaging has a Requires python-eventlet >= 0.13.0 and so will pull in this dependency for any packages depending on that (including keystone). eventlet and greenlet where updated in RDO Icehouse repo. |