set heartbeat_in_pthread default to True if eventlet.wsgi is imported

Bug #2077107 reported by Edward Hope-Morley
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu Cloud Archive
New
Undecided
Unassigned
Antelope
New
Undecided
Unassigned
Caracal
New
Undecided
Unassigned
Dalmation
New
Undecided
Unassigned
Yoga
New
Undecided
Unassigned
oslo.messaging
In Progress
Undecided
Unassigned
python-oslo.messaging (Ubuntu)
New
Undecided
Unassigned
Jammy
New
Undecided
Unassigned
Noble
New
Undecided
Unassigned
Oracular
New
Undecided
Unassigned

Bug Description

The fix for https://bugs.launchpad.net/oslo.messaging/+bug/1934937 made heartbeat_in_pthread configurable again with a default of False so that by default wsgi services will not use pthreads. This will inevitably result in a behaviour change but also fixes non-wsgi services that were broken by the default of True. When considering the backport we were confronted by a new challenge in that users who run a mix of wsgi and non-wsgi services on the same host that share the same config file cannot configure them differently and therefore there is no way to satisfy both cases with the correct config for heartbeat_in_pthread. Having done a bit of digging into Openstack code and checking some running services e.g. comparing nova-api (which runs under apache) and nova-scheduler, it seems that services running as wsgi import eventlet.wsgi whereas non-wsgi do not so the proposal here is to have oslo.messaging set default of heartbeat_in_pthread dynamically based on whether or not this module is imported.

summary: - set heartbeat_in_pthread default to True if eventlt.wsgi is imported
+ set heartbeat_in_pthread default to True if eventlet.wsgi is imported
Revision history for this message
Edward Hope-Morley (hopem) wrote :

Further context: commit add5ab4ec (released in Wallaby) changed the default of heartbeat_in_pthread from False to True and required users not running in wsgi to set it to False. The default value was then changed back to False in commit e44f286 (released in Openstack Zed) because it was found to be breaing non-wsgi services like nova-compute. This then reverted the behaviour for wsgi services to by default use a pthread for heartbeats.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.messaging (master)
Changed in oslo.messaging:
status: New → In Progress
Revision history for this message
Arnaud Morin (arnaud-morin) wrote :

Hello,

We are running heartbeat_in_pthread=True on our local OpenStack (stein, antelope, whatever) for both wsgi AND nova-compute (but also neutron wsgi and neutron agents).

To make sure that this works as expected, you will need the latest changes that were introduced regarding this:

https://review.opendev.org/c/openstack/oslo.messaging/+/894731
https://review.opendev.org/c/openstack/oslo.messaging/+/875615
https://review.opendev.org/c/openstack/oslo.messaging/+/876318

Do you have all of this?

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on oslo.messaging (master)

Change abandoned by "Edward Hope-Morley <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/oslo.messaging/+/927624

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.