Bug 1742249

Summary: Unable to establish outbound connection after configuring egress IP for namespace and configuring NetworkPolicy
Product: OpenShift Container Platform Reporter: rvanderp
Component: NetworkingAssignee: Casey Callendrello <cdc>
Status: CLOSED DUPLICATE QA Contact: zhaozhanqi <zzhao>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.11.0CC: aos-bugs, apaladug
Target Milestone: ---   
Target Release: 3.11.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-26 11:26:21 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:

Description rvanderp 2019-08-16 18:14:42 UTC
Description of problem:
Unable to establish outbound connection after configuring egress IP for namespace and configuring a NetworkPolicy for that same namespace.

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

How reproducible:


Steps to Reproduce:
1. Configure hostsubnet egressIP on egress node(this is not the same node where the pod in question is being run)

# oc patch hostsubnet the-node-name -p '{"egressIPs": ["10.x.x.141"]}'

2. Configure netnamespace for the namespace in question with an egressIP

# oc patch netnamespace test-name-space -p '{"egressIPs": ["10.x.x.141"]}'

3. Apply network policy to block incoming traffic to namespace

~~~
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: deny-other-namespaces
  namespace: test-name-space
spec:
  podSelector: null
  ingress:
    - from:
        - podSelector: {}
~~~

4. rsh to the pod and attempt to `curl` external server


Actual results:
`curl` is unable to connect to external server

Expected results:
`curl` is should be able to connect to external server

Additional info:

Comment 1 Casey Callendrello 2019-08-26 11:26:21 UTC
We've fixed this in 1741477 - once the PR is merged, it will be included in the next z-stream release.

*** This bug has been marked as a duplicate of bug 1741477 ***