From 151c03d5ecc966dda2bbb382134c73af3bd579bf Mon Sep 17 00:00:00 2001 From: Thiago Brito Date: Thu, 10 Mar 2022 14:59:22 -0300 Subject: [PATCH] Fix infinite recursion deadlock on netns cleanup When, for some reason, the neutron netns agent is misconfigured and is producing errors, this infinite recursion is generating a deadlock on cpu usage since it repeats with no interval. This fix adds some shorter sleeps to work around it. Signed-off-by: Thiago Brito Change-Id: Icf840ea965d0652d6118a1b840168df95ba95fac --- neutron/Chart.yaml | 2 +- neutron/templates/bin/_neutron-netns-cleanup-cron.py.tpl | 2 ++ releasenotes/notes/neutron.yaml | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/neutron/Chart.yaml b/neutron/Chart.yaml index 33c6a740c0..52214bef4d 100644 --- a/neutron/Chart.yaml +++ b/neutron/Chart.yaml @@ -14,7 +14,7 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Neutron name: neutron -version: 0.2.11 +version: 0.2.12 home: https://docs.openstack.org/neutron/latest/ icon: https://www.openstack.org/themes/openstack/images/project-mascots/Neutron/OpenStack_Project_Neutron_vertical.png sources: diff --git a/neutron/templates/bin/_neutron-netns-cleanup-cron.py.tpl b/neutron/templates/bin/_neutron-netns-cleanup-cron.py.tpl index 5eb5b13773..a56e87d7c0 100644 --- a/neutron/templates/bin/_neutron-netns-cleanup-cron.py.tpl +++ b/neutron/templates/bin/_neutron-netns-cleanup-cron.py.tpl @@ -17,8 +17,10 @@ if __name__ == "__main__": sys.stderr.write( "Cleaning network namespaces caught an exception %s" % str(ex)) + time.sleep(30) except: sys.stderr.write( "Cleaning network namespaces caught an exception") + time.sleep(30) finally: cfg.CONF.clear() diff --git a/releasenotes/notes/neutron.yaml b/releasenotes/notes/neutron.yaml index 9c9acfd95e..a6a8d3346e 100644 --- a/releasenotes/notes/neutron.yaml +++ b/releasenotes/notes/neutron.yaml @@ -25,4 +25,5 @@ neutron: - 0.2.9 Add option to disable helm.sh/hook annotations - 0.2.10 Update htk requirements repo - 0.2.11 Improve health probe logging + - 0.2.12 Fix infinite recursion deadlock on netns cleanup cron ...