Explain why API services are filtered out of GET /os-services

This came up in the original review for the change that added
the filtering:

  Icadd380ea1ff75f0cca433b68441ac5dad0ead53

But was never followed up, and it comes up from time to time
as a question about the API behavior. This change puts a comment
in the filtering code to explain it.

Change-Id: Ibb0bb0888e96c17147beb47d0a44f8c65ed0b56c
Related-Bug: #1543625
This commit is contained in:
Matt Riedemann 2017-06-21 11:47:01 -04:00
parent 96e07267fe
commit cf7d9bfd71
1 changed files with 3 additions and 0 deletions

View File

@ -39,6 +39,9 @@ class ServiceController(wsgi.Controller):
"disable-log-reason": self._disable_log_reason}
def _get_services(self, req):
# The API services are filtered out since they are not RPC services
# and therefore their state is not reported through the service group
# API, so they would always be reported as 'down' (see bug 1543625).
api_services = ('nova-osapi_compute', 'nova-ec2', 'nova-metadata')
context = req.environ['nova.context']