Description of problem:
Every 30 minutes the egress network policies are being updated/re-written (even when there is no change to any policy). As part of the process for the update to a policy in a project a drop rule is applied to the OpenFlow tables for the project with maximum priority and then the rules are rewritten. This means that for the duration of this rewrite no egress traffic is permitted from any pods in the project and no dns lookups are permitted either. We are seeing occasions where this re-write of rules can take the order of 5/6 seconds which potentially will impact our apps
The customer confirmed that redhat/ovs-multinant-pugin is configured on masters and nodes and followed the notes present on our documentation for this specific configuration:
Control the EgressNetworkPolicies for being updated and/or not causing application downtime, since it seems traffic stops when the policies are updated.
OCP is using vSphere Cloud Provider.
I've been looking at this file:
I don't see if there's any variable that would be useful to help with this or if there is something we can do to configure update timing or blocking it on the policy.json we can use to create the EgressNetworkPolicy object.
Also don't know if this might be related with this issue:
"Domain name updates are polled based on the TTL (time to live) value of the domain of the local non-authoritative server, or 30 minutes if the TTL is unable to be fetched. The pod should also resolve the domain from the same local non-authoritative server when necessary, otherwise the IP addresses for the domain perceived by the egress network policy controller and the pod will be different, and the egress network policy may not be enforced as expected. In the above example, suppose www.foo.com resolved to 10.11.12.13 and has a DNS TTL of one minute, but was later changed to 220.127.116.11. OpenShift Container Platform will then take up to one minute to adapt to these changes."
verified in atomic-openshift-3.10.0-0.50.0.git.0.db6dfd6.el7, the ovs flow updated as below:
W0523 03:11:49.675710 32437 ovscontroller.go:473] Correcting CIDRSelector '0.0.0.0/32' to '0.0.0.0/0' in EgressNetworkPolicy lha:policy-test
I0523 03:11:49.675798 32437 ovs.go:155] Executing: ovs-ofctl -O OpenFlow13 bundle br0 - <<
flow delete table=101, reg0=5808747
flow add table=101, reg0=5808747, priority=2, ip, nw_dst=18.104.22.168, actions=output:2
flow add table=101, reg0=5808747, priority=2, ip, nw_dst=22.214.171.124, actions=output:2
flow add table=101, reg0=5808747, priority=2, ip, nw_dst=126.96.36.199, actions=output:2
flow add table=101, reg0=5808747, priority=2, ip, nw_dst=188.8.131.52, actions=output:2
flow add table=101, reg0=5808747, priority=2, ip, nw_dst=184.108.40.206, actions=output:2
flow add table=101, reg0=5808747, priority=2, ip, nw_dst=220.127.116.11, actions=output:2
flow add table=101, reg0=5808747, priority=1, ip, actions=drop
OS: Red Hat Enterprise Linux Server release 7.5 (Maipo)
kernel: Linux ip-172-18-8-142.ec2.internal 3.10.0-862.el7.x86_64 #1 SMP Wed Mar 21 18:14:51 EDT 2018 x86_64 x86_64 x86_64 GNU/Linux
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, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.