From 4030f2706a34c2c5ff4bd3997ec6b1ea40bbccfc Mon Sep 17 00:00:00 2001 From: Maysa Macedo Date: Fri, 28 Apr 2023 12:58:51 +0200 Subject: [PATCH] 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 --- kuryr_kubernetes/controller/drivers/utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kuryr_kubernetes/controller/drivers/utils.py b/kuryr_kubernetes/controller/drivers/utils.py index 76aabf751..f2d335e5c 100644 --- a/kuryr_kubernetes/controller/drivers/utils.py +++ b/kuryr_kubernetes/controller/drivers/utils.py @@ -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