Skip retry of Network Policy event

When attempting to Handle a Network Policy and one Namespace
which is affected by it is in the process of getting handled
by Kuryr, the Network Policy event would be often retried.
This commit removes the retry to make sure the Network Policy
gets updated only once the Namespace handling has finsihed.

Change-Id: I73c9488dca21f73070ca84352e3ba3780ea7298f
This commit is contained in:
Maysa Macedo 2023-04-28 12:58:51 +02:00
parent 2141dba99c
commit 4030f2706a

View File

@ -501,8 +501,9 @@ def get_namespace_subnet_cidr(namespace):
try: try:
subnet_cidr = net_crd['status']['subnetCIDR'] subnet_cidr = net_crd['status']['subnetCIDR']
except KeyError: except KeyError:
LOG.exception('Namespace not yet ready') LOG.debug('Namespace not yet ready %s',
raise k_exc.ResourceNotReady(namespace) namespace['metadata']['name'])
return None
return subnet_cidr return subnet_cidr