-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable public access to services on production cluster #16
Comments
The effort/estimate required does not show that this requires going through multiple people to get the access needed. Important to keep in mind this could take a long time for a turnaround. |
Install the metallb [1] operator on nerc-ocp-prod. Our immediate use case for this operator is providing a public ip address to the public-facing ingress service. Part of: nerc-project/operations#16 [1]: https://metallb.universe.tf/
Some resources that have been useful; leaving these here as notes to myself for now: |
Everything is set up and the configuration looks correct, but externally originated requests are getting dropped. I'm currently trying to figure out what's going on. As part of that, I've posted a message to an internal mailing list that I'm reproducing here because it summarizes where I am: I've set up metallb on an OCP 4.11 cluster using OpenShiftSDN. The There are a set of nodes (identified by the label
Where
In order to support connections to the public address, we are using
And the following routes in table 200:
This all works: if I start a service directly on any of these nodes We have MetalLB installed on the cluster with the following
We're using L2Advertisement mode with the following address pool:
With this configuration in place, LoadBalancer type Services acquire
The public address is owned by node "wrk-13", and running tcpdump on
Enabling nft tracing shows us that the packet ultimately hits the
And apparently that's where it stops. The address in that final DNAT If on any of the worker nodes, we locally run |
I have also tried reaching out on the coreos slack |
I've tried tracing this through OVS with the following command:
That produces:
That all seems fine: the packet gets directed to the tunnel interface, destined for 10.30.6.28, which is the node actually hosting the target pod. |
I have opened case https://access.redhat.com/support/cases/#/case/03349209 on this issue as well. |
Requested help from the network engineering group as well. |
The consensus is beginning to look like this behavior is a bug and that it should be resolved in the OVNKubernetes SDN driver, which is what we should be using in any case. The current cluster build (running OpenSHiftSDN and 4.11 instead of OVNKubernetes and 4.10) is a mistake, so that was part of our plan anyway. |
I've initiated a migration from OpenShiftSDN to OVNKubernetes SDN drivers on the cluster. |
Post-OVNKubernetes migration behaviorWe've completed the migration to ovnkubernetes and it does not appear to have had any impact on the problem. With these rules in place in the
If we make a request from a remote host to
Running
We see as output:
If we run |
I've updated the case with the information from the previous comment and left a note that @naved001 will be handling the case while I'm out. |
If you need network diagnostics tools like I created this image because there is an issue with the |
OverviewWe are deploying an OpenShift bare metal cluster for the New England Research Cloud (NERC). The cluster ( We would like to be able to explicitly expose some services on a public address range. Broadly, our plan was:
Network configurationThe primary network interface on the worker nodes is a bond interface, consisting of physical interfaces
In addition to the primary interface, the worker nodes have multiple VLAN interfaces:
RoutingThe main routing table on these nodes look like this:
The default route is via the 10.30.6.0/23 network. This will obviously cause issues for ingress traffic on the public network -- it would result in an asymmetric return path for these requests, which depending on network policy could result in the return traffic being blocked. We can see that if we create a listener and then attempt to connect to it from an external client:
We see the requests coming in on
In a typical situation, we would arrange for a symmetric return path by introducing some simple policy routing rules:
This would cause traffic originating from a 199.94.61.0/24 address on the host to route via the appropriate network gateway. We can verify that this policy works in practice for services hosted directly on the worker nodes; if we repeat the earlier experiment, we see in our
The request comes in on Problems with OpenShift hosted servicesWe deployed MetalLB on the cluster in L2Advertisement mode with the following address pool configuration:
We deployed simple web server and configured a
This resulted in:
We found that we were unable to access the service at the Investigation and diagnosticsWe knew that requests were reaching the appropriate worker node; running
Running
Netfilter tracingWe enabled tracing of netfilter rules by injecting the following nftables configuration:
With these rules in place, running
That final rule was correctly modifying the destination of the incoming request to the address of the
Simplifying the problemOur original theory had been that this problem was specific to addresses managed by MetalLB, but we were able to demonstrate the same behavior using the service's NodePort address when attempting to access it over the public network. That is, given:
We were able to access the service at This eliminated MetalLB as the source of the problem. Packet, where are you?Andrew Stoycos introduced us to the Packet, Where are you? tool, which uses eBPF to apply several hundred kprobe traces to the kernel, allowing us to trace packets through the kernel network stack. Running
We saw the following sequence in the function trace:
This sequence means that
If we make a request to the loadbalancer address while running the above program, we see:
That confirms that the request is being rejected due to the kernel's
AnalysisIt turns out that by default, the OpenShift nodes are configured with the The problem comes down to the interaction between the NAT rules in the host firewall and point at which the kernel is making routing decisions. While the incoming request is entirely valid, it hits a
Into:
That means the reply is going to look like:
In order for that to work, we need to perform some form of source NAT on the way out. Unfortunately, this doesn't happen until the
Because the reply has a source address of SolutionThe workaround in this case is to configure This does result in an asymmetric routing configuration; we now see:
That is, the request comes in on |
We need to be able to expose services on the production cluster on a public address. This will probably require configuring a new ingress controller and attaching the worker nodes to a public VLAN.
The text was updated successfully, but these errors were encountered: