list os-service causing reconnects to memcached all the time

Bug #1995028 reported by norman shen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Won't Fix
Undecided
Unassigned

Bug Description

Description
===========

we are running a victoria openstack cluster (python3). and I observe that everytime when an openstack compute service list executed, nova-api will create a new connection to memcache. Actually there are several reasons to cause this behavior

1. when running natively with eventlet's wsgi server, everytime a new coroutine is created to host web request and this causes keystonemiddle auth_token which uses python-memcached to reconnect to memcahced all the time
2. os-services will trigger nova.availability_zones.set_availability_zones and it will update cache every time, since cellv2 is enabled, this method is running in an co-routine as well
3. python-memcached's Client is inheriting from threading.local which will be monkey_patched to use eventlet's implementation and thus for every co-routine context it will create a new connection

Steps to reproduce
==================

1. Patch def _get_socket and print connection
2. execute openstack compute service list

Expected result
===============

Maintain stable connections to memcached

Actual result
=============

Reconnects

Environment
===========

1. devstack victoria openstack

Tags: api
melanie witt (melwitt)
tags: added: api
Revision history for this message
melanie witt (melwitt) wrote (last edit ):

Hi, running nova-api or nova-metadata-api using the eventlet server was deprecated in the Rocky release [1] and is no longer supported.

API services can and should be run using WSGI servers such as uwsgi or mod_wsgi:

https://docs.openstack.org/nova/latest/user/wsgi.html

If you encounter issues running under one of these servers, please feel free to re-open this bug or open a new bug and we will take a look.

[1] https://docs.openstack.org/releasenotes/nova/rocky.html#deprecation-notes

Changed in nova:
status: New → Won't Fix
Revision history for this message
norman shen (jshen28) wrote (last edit ):

Hmm, then I think openstack-helm should stop using eventlet wsgi server. Besides, this os-service stuff is not related to eventlet wsgi server at all. It could be reproduced through devstack which uses uwsgi as wsgi server.

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.