Bug 1810571

Summary: Kuryr is restarted if NP got removed during its processing
Product: OpenShift Container Platform Reporter: Michał Dulko <mdulko>
Component: NetworkingAssignee: Michał Dulko <mdulko>
Networking sub component: kuryr QA Contact: Jon Uriarte <juriarte>
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: unspecified CC: bbennett, juriarte, ltomasbo
Version: 4.4   
Target Milestone: ---   
Target Release: 4.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 1810595 (view as bug list) Environment:
Last Closed: 2020-08-04 18:04:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1819129    
Bug Blocks: 1810595    

Description Michał Dulko 2020-03-05 14:18:18 UTC
Description of problem:
I've seen following traceback on NP tests run:

 Traceback (most recent call last):
   File "/usr/local/lib/python3.6/site-packages/kuryr_kubernetes/handlers/logging.py", line 37, in __call__
     self._handler(event)
   File "/usr/local/lib/python3.6/site-packages/kuryr_kubernetes/handlers/retry.py", line 79, in __call__
     self._handler(event)
   File "/usr/local/lib/python3.6/site-packages/kuryr_kubernetes/handlers/k8s_base.py", line 77, in __call__
     self.on_deleted(obj)
   File "/usr/local/lib/python3.6/site-packages/kuryr_kubernetes/controller/handlers/vif.py", line 164, in on_deleted
     crd_pod_selectors = self._drv_sg.delete_sg_rules(pod)
   File "/usr/local/lib/python3.6/site-packages/kuryr_kubernetes/controller/drivers/network_policy_security_groups.py", line 512, in delete_sg_rules
     crd_selector)
   File "/usr/local/lib/python3.6/site-packages/kuryr_kubernetes/controller/drivers/utils.py", line 247, in patch_kuryrnetworkpolicy_crd
     'networkpolicy_spec': np_spec})
   File "/usr/local/lib/python3.6/site-packages/kuryr_kubernetes/k8s_client.py", line 137, in patch_crd
     raise exc.K8sClientException(response.text)
 kuryr_kubernetes.exceptions.K8sClientException: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"kuryrnetpolicies.openstack.org \"np-allow-ingress\" not found","reason":"NotFound","details":{"name":"np-allow-ingress","group":"openstack.org","kind":"kuryrnetpolicies"},"code":404}

Version-Release number of selected component (if applicable):


How reproducible:
Probably a bit random. To verify it's worth to run the OpenShift network policy tests and look for similar tracebacks in logs.

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 3 Jon Uriarte 2020-04-03 08:09:42 UTC
Verified in 4.5.0-0.nightly-2020-04-02-004321 on top of OSP 16 RHOS_TRUNK-16.0-RHEL-8-20200324.n.0 compose.

Didn't find the traceback described in the BZ after running Network Policy tests.

Comment 5 errata-xmlrpc 2020-08-04 18:04:12 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (OpenShift Container Platform 4.5 image release advisory), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:2409