Bug 1955192
| Summary: | ExternalIP feature do not work on ovn-kuberenetes | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Manish Pandey <mapandey> |
| Component: | Networking | Assignee: | Andrew Stoycos <astoycos> |
| Networking sub component: | ovn-kubernetes | QA Contact: | Weibin Liang <weliang> |
| Status: | CLOSED ERRATA | Docs Contact: | |
| Severity: | high | ||
| Priority: | high | CC: | aamarks, aconstan, aojeagar, astoycos, bbennett, mhepburn, palonsor, rkant, trozet, zzhao |
| Version: | 4.6.z | Flags: | weliang:
needinfo-
|
| Target Milestone: | --- | ||
| Target Release: | 4.9.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | No Doc Update | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-10-18 17:30:14 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: | 1959798, 1988487 | ||
| Bug Blocks: | |||
|
Comment 2
Antonio Ojea
2021-04-30 14:43:39 UTC
Ok, I justed talked with Tim Rozet and it seems OVN-Kube has a different implementation. It does send the traffic to the Service despite the ExternalIP is not present, but the ExternalIP is implemented using OVN Load Balancers not iptables rules. For the record, I did a mistake in my comment, Openshift does have and admission controller that only allows ExternalIPs allowed by the admin, mitigating the CVE mentioned before. Thanks Dan Winship for the clarification. patch sent https://github.com/ovn-org/ovn-kubernetes/pull/2232/commits/31935e41862fb0cbceb1d1ad4f4dfe1de19cac8d This bz should also be fixed by https://github.com/ovn-org/ovn-kubernetes/pull/2244, So I am marking as a dupe. @anusaxen I would still like this case verified once it merges though which is why I'm leaving the bug open. @mapandey Try to verify this bug in v4.9, just want to double check with you on above configuration steps
1. Before using new externalIP 2.2.2.2 for svc, did you update externalIP policy from system admin?
# oc patch network.config.openshift.io cluster --type=merge -p '{"spec":{"externalIP":{"policy": {"allowedCIDRs": null }}}}'
# oc patch network.config.openshift.io cluster --type=merge -p '{"spec":{"externalIP":{"policy":{"allowedCIDRs":["22.2.2.2/32"]}}}}'
Due to bug https://bugzilla.redhat.com/show_bug.cgi?id=1793099, the above change will take about 220 seconds to take effect.
2. When using new externalIP 2.2.2.2, did you update it from a normal user or system admin?
Tested and verified in 4.9.0-0.nightly-2021-08-07-175228: update svc externalIP from 10.73.116.64 to 2.2.2.2, OVN-KUBE-EXTERNALIP get update too and curl on pass in using new svc externalIP
[root@dell-per740-36 ~]# oc rsh externalip-pod-57f9dd7cfb-967pw
~ $ curl 10.73.116.64:27018
Customer-Blue Test ExternalIP
[root@dell-per740-36 ~]# oc get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
externalip-svc ClusterIP 172.30.33.188 10.73.116.64 27018/TCP 29m
[root@dell-per740-36 ~]# oc edit svc externalip-svc
service/externalip-svc edited
[root@dell-per740-36 ~]# oc get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
externalip-svc ClusterIP 172.30.33.188 2.2.2.2 27018/TCP 30m
[root@dell-per740-36 ~]# oc debug node/dell-per740-14.rhts.eng.pek2.redhat.com
Starting pod/dell-per740-14rhtsengpek2redhatcom-debug ...
To use host binaries, run `chroot /host`
Pod IP: 10.73.116.62
If you don't see a command prompt, try pressing enter.
sh-4.4# chroot /host
sh-4.4# iptables -n -v -t nat -L OVN-KUBE-EXTERNALIP
Chain OVN-KUBE-EXTERNALIP (2 references)
pkts bytes target prot opt in out source destination
0 0 DNAT tcp -- * * 0.0.0.0/0 10.73.116.64 tcp dpt:27018 to:172.30.33.188:27018
sh-4.4# iptables -n -v -t nat -L OVN-KUBE-EXTERNALIP
Chain OVN-KUBE-EXTERNALIP (2 references)
pkts bytes target prot opt in out source destination
0 0 DNAT tcp -- * * 0.0.0.0/0 2.2.2.2 tcp dpt:27018 to:172.30.33.188:27018
[root@dell-per740-36 ~]# oc rsh externalip-pod-57f9dd7cfb-4hl58
~ $ curl 2.2.2.2:27018
Customer-Blue Test ExternalIP
[root@dell-per740-36 ~]# ip route add 2.2.2.2/32 via 10.73.116.62 dev em1
[root@dell-per740-36 ~]# curl 2.2.2.2:27018
Customer-Blue Test ExternalIP
[root@dell-per740-36 ~]# curl 10.73.116.64:27018
curl: (7) Failed connect to 10.73.116.64:27018; Connection refused
[root@dell-per740-36 ~]#
[root@dell-per740-36 ~]#
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 (Moderate: OpenShift Container Platform 4.9.0 bug fix and security update), 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/RHSA-2021:3759 |