Reviewed: https://review.opendev.org/c/openstack/nova/+/945028 Committed: https://opendev.org/openstack/nova/commit/8dcbbe43e71b1528777fd5a905ad340e916d94ac Submitter: "Zuul (22348)" Branch: master
commit 8dcbbe43e71b1528777fd5a905ad340e916d94ac Author: Sean Mooney <[email protected]> Date: Tue Mar 18 17:42:07 2025 +0000 wrap wsgi_app.init_application with latch_error_on_raise This change adds a latch_error_on_raise decorator which is applied to the init_applciation function in our common wsgi_app module. This decorator will catch all non retryable exceptions and cause future invocations of the function to always return that same exception forever. a reset function is also added to the decorated function which should be called in our bases test class to prevent cross test interactons. Closes-Bug: #2103811 Related-Bug: #1882094 Change-Id: I44b1f7e2acc36a5b557d6d8788f6099f52bbdfb8 ** Changed in: nova Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/2103811 Title: nova (metadata)api does not exit on fatal errors under mod_wsgi Status in OpenStack Compute (nova): Fix Released Bug description: In previous releases we addressed https://bugs.launchpad.net/nova/+bug/1882094 (a bug with how mod_wsgi reloads wsgi applications into the same python interpreter on error) by wrapping the initialization of global data in a run_once decorator. The run_once decorator solves the reentrancy problem for the initialization of the config objects or other global state that can only be setup once in a given python interpreter. This allows the nova wsgi application to be reloaded and retried when transient errors, such as the db being unavailable when the api starts, to heal overtime. The run_once decorator also had an unplanned side-effect. If the nova-api raised an error for an non-transient issue such as invalid config that would be raised only once and nova would serve subsequent requests with a partly initialized config. This will lead to undefined behavior and is obviously a bug. When run under other wsgi servers config errors cause the hosting python interpreter to exit, this is not the behavior of mod_wsgi. To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/2103811/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

