Bug 1937194
Summary: | Routes not accessible from projects with egress IP configured on cloud providers | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Frederic Giloux <fgiloux> |
Component: | Networking | Assignee: | Patryk Diak <pdiak> |
Networking sub component: | openshift-sdn | QA Contact: | huirwang |
Status: | CLOSED DUPLICATE | Docs Contact: | |
Severity: | medium | ||
Priority: | medium | CC: | aelgendy, anbhat, bbennett, danw, dcbw, gilins, huirwang, jtanenba, pdiak, pmagotra, rbeyel, rravaiol, tmicheli |
Version: | 4.6 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
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: | 2022-07-20 08:57:22 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
Frederic Giloux
2021-03-10 06:11:14 UTC
I could verify that changing SNAT all -- 10.128.0.0/14 0.0.0.0/0 mark match 0x6e52f2 to:10.0.116.8 to SNAT all -- 10.128.0.0/14 !10.128.0.0/14 mark match 0x6e52f2 to:10.0.116.8 allows the pod in the project where an egress IP has been assigned (test-src) to communicate with a route. I ran the following command on the node where the pod of test-src project was running: sudo iptables -t nat -R OPENSHIFT-MASQUERADE 1 -s 10.128.0.0/14 ! -d 10.128.0.0/14 -m mark --mark 0x1e1d286 -j SNAT --to-source 10.0.0.43 After running the command I was able to curl the destination route from the pod in test-src. After reverting the change I was not able to curl the destination route from the pod in test-src. sudo iptables -t nat -R OPENSHIFT-MASQUERADE 1 -s 10.128.0.0/14 -m mark --mark 0x1e1d286 -j SNAT --to-source 10.0.0.43 I will look at creating a pull request. It seems that there are only 2 lines in the source code to be changed: https://github.com/openshift/sdn/blob/release-4.6/pkg/network/node/iptables.go#L230 _, err := n.ipt.EnsureRule(iptables.Prepend, iptables.TableNAT, iptables.Chain("OPENSHIFT-MASQUERADE"), "-s", cidr, "-m", "mark", "--mark", mark, "-j", "SNAT", "--to-source", egressIP) => _, err := n.ipt.EnsureRule(iptables.Prepend, iptables.TableNAT, iptables.Chain("OPENSHIFT-MASQUERADE"), "-s", cidr, "!", "-d", cidr, "-m", "mark", "--mark", mark, "-j", "SNAT", "--to-source", egressIP) https://github.com/openshift/sdn/blob/release-4.6/pkg/network/node/iptables.go#L257 err := n.ipt.DeleteRule(iptables.TableNAT, iptables.Chain("OPENSHIFT-MASQUERADE"), "-s", cidr, "-m", "mark", "--mark", mark, "-j", "SNAT", "--to-source", egressIP) => err := n.ipt.DeleteRule(iptables.TableNAT, iptables.Chain("OPENSHIFT-MASQUERADE"), "-s", cidr, "!", "-d", cidr, "-m", "mark", "--mark", mark, "-j", "SNAT", "--to-source", egressIP) Created pull request: https://github.com/openshift/sdn/pull/280 *** This bug has been marked as a duplicate of bug 2092166 *** |