Fix quota readiness check

For the policy and vif handlers we didn't treat the case for when
neutron resources don't have a limit defined, consequently it was
marked as not ready. This patchs fixes the issue by assuring the
component is marked as ready when it has no limit.

Closes-bug: #1805814

Change-Id: I0a8a7665b01ca6f66c13aa71df0e74adca811d9b
This commit is contained in:
Maysa Macedo 2018-11-29 10:50:07 +00:00
parent 80aeec3dcc
commit 38f541604f
3 changed files with 3 additions and 1 deletions

View File

@ -68,3 +68,4 @@ class NetworkPolicyHandler(k8s_base.ResourceEventHandler):
sg_func = neutron.list_security_groups
if utils.has_limit(sg_quota):
return utils.is_available('security_groups', sg_quota, sg_func)
return True

View File

@ -152,6 +152,7 @@ class VIFHandler(k8s_base.ResourceEventHandler):
port_func = neutron.list_ports
if utils.has_limit(port_quota):
return utils.is_available('ports', port_quota, port_func)
return True
@staticmethod
def _is_host_network(pod):

View File

@ -66,7 +66,7 @@ class HealthServer(object):
for component in self._registry:
if not component.is_ready(quota):
LOG.debug('Controller components are not ready.')
LOG.debug('Controller component not ready: %s.' % component)
return False
return True