Bug 1670996

Summary: nova api (in wsgi) returns RecursionError: maximum recursion depth exceeded while calling a Python object
Product: Red Hat OpenStack Reporter: Emilien Macchi <emacchi>
Component: openstack-novaAssignee: Matthew Booth <mbooth>
Status: CLOSED ERRATA QA Contact: Archit Modi <amodi>
Severity: high Docs Contact:
Priority: high    
Version: 15.0 (Stein)CC: amodi, dasmith, emacchi, jhakimra, jjoyce, kchamart, lyarwood, mbooth, michele, sbauza, sgordon, vromanso
Target Milestone: rcKeywords: Triaged
Target Release: 15.0 (Stein)   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: openstack-nova-19.0.0-0.20190326092503.a40f0c5.el8ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-09-21 11:20:21 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:

Description Emilien Macchi 2019-01-30 13:41:03 UTC
Description of problem
======================*

Originally reported here: https://bugs.launchpad.net/nova/+bug/1808951

The issue is around using of eventlet.monkey_patch even if running under wsgi[1]. Eventlet Best practices suggest to not run(skip) monkey_patch when running behind wsgi[3] but with nova it's not the case.

Expected result
===============
Nova api should response successfully.

Actual result
=============
Nova api returns Recursion Error.

[1] https://github.com/openstack/nova/blob/a674241d0f026b546b38ec77ab472e916805c679/nova/api/openstack/wsgi_app.py#L32
[3] https://review.openstack.org/#/c/154642/2/specs/eventlet-best-practices.rst@54


Other useful links
==================

https://github.com/eventlet/eventlet/issues/371

Comment 3 Matthew Booth 2019-02-08 17:45:28 UTC
The eventlet folks seems to be treating this as an eventlet bug against python 3.7:

https://github.com/eventlet/eventlet/pull/531

Comment 4 Matthew Booth 2019-02-20 13:19:30 UTC
Please can you try to reproduce this against a fully update Fedora? I haven't been able to reproduce this using the only test which was demonstrating it, and the eventlet bug suggests that it was being fixed in eventlet.

Note that Nova uses eventlet explicitly in a number of places which can be called from services running both under and not under eventlet, so we must (until that changes, at least) always monkey patch. For example, disabling monkey patching would most likely break multi-cell instance listing.

Comment 5 Matthew Booth 2019-03-26 09:34:12 UTC
The fix for this has merged upstream, and a backport to stein proposed.

Comment 9 Matthew Booth 2019-03-28 10:52:23 UTC
*** Bug 1686817 has been marked as a duplicate of this bug. ***

Comment 13 Matthew Booth 2019-08-01 13:13:20 UTC
This was triggered upstream by:

GET /v2.1/servers/detail?all_tenants=True&deleted=True

So I guess to reproduce we should execute a multi-tenant instance list returning at least 1 instance, and verify that it doesn't return an error.

Comment 18 errata-xmlrpc 2019-09-21 11:20:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2019:2811

Comment 19 Red Hat Bugzilla 2023-09-14 04:45:58 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days