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
1 changed files with 3 additions and 2 deletions

View File

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