memcached socket not released upon lbaas API request
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Security Advisory |
Won't Fix
|
Undecided
|
Unassigned | ||
keystonemiddleware |
New
|
Undecided
|
Unassigned | ||
oslo.cache |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
We have recently installer an OpenStack cluster in Train release and we have noticed an unexpected behavior when Neutron contacts memcached upon some specific API requests. In fact, in our environment lbaas is not configured in Neutron (I don't know if this still possible in the current Neutron version), but we have deployed a monitoring service based on Prometheus openstack-exporter which, by default, checks the accessibility of the lbaas neutron part of the API.
Each time the check have the neutron server generates a 404, as this part of the API is not available. An example can be found at http://
The actual issue happens at the socket management level. Each time the check is performed, the socket between the Neutron server and memcached is not released as expected. This leads to a continuous increment of the established sockets between Neutron an Memcached until all the available sockets are exhausted and the cluster authentication locks.
Removing the checking on the lbaas service from Prometheus openstack-exporter allows to avoid the issue but we think that an issue like this (if confirmed) have quite important security concerns as it can lead quite easily to a DoS (wanted or not).
For the record, We have tried to explicitly configure the memcached socket monitoring options in Neutron but it looks like that they are not applied under the current conditions :
memcache_
memcache_
Here under is the environment setup:
Deployer : OpenStack Ansible 20.1.2
Neutron version: neutron 15.1.1.dev2
Neutron config file http://
Memcached config file http://
Prometheus OpenStack Exporter : https:/
Prometheus OpenStack Exporter config : http://
Prometheus command WITH lbaas checking : =/usr/local/
--os-
--web.
--web.
--prefix=
--endpoint-
Prometheus command WITHOUT lbaas checking:
/usr/local/
--os-
--web.
--web.
--prefix=
--endpoint-
--disable-
--disable-
--disable-
--disable-
I hope the provided information is enough to reproduce the issue.
Cheers
Sergio
Hi,
Thanks for reporting this bug. I was just checking Neutron code and I'm a bit confused as we are not using memcached in Neutron code anywhere.
Is this memcahed used by keystonemiddleware? And if it is, isn't that keystonemiddleware bug instead of neutron?