crc-org / crc

CRC is a tool to help you run containers. It manages a local OpenShift 4.x cluster, Microshift or a Podman VM optimized for testing and development purposes
https://crc.dev
Apache License 2.0
1.26k stars 242 forks source link

Check that when proxy is set, all http/https requests are going through the proxy #889

Open cfergeau opened 4 years ago

cfergeau commented 4 years ago

Start tcpdump host 192.168.130.11 on the host as root

Setup proxy for crc (I did it through env vars)

Run crc start

I'd expect the proxy to be the only destination for http/https requests. At the moment tcpdump is showing direct requests to aws, akamai (without going through the proxy). When I deploy a nodejs app following odo tutorial https://docs.openshift.com/container-platform/4.2/cli_reference/openshift_developer_cli/creating-a-single-component-application-with-odo.html I've also seen direct requests to cloudfare.

There are at least 3 possible explanations:

It would be useful to figure out what's happening :)

cfergeau commented 4 years ago

https://github.com/code-ready/crc/issues/898 is one possible source for these extra requests. Some operators rely on the cluster-version-operator to propagate the proxy settings, which is disabled in the crc case.

cfergeau commented 4 years ago

I did more investigations around this using tcpconnect from bcc-tools

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

cfergeau commented 4 years ago

The last known issue has been fixed but is not backported to 4.4 yet. One thing to note is that one must set both http-proxy and https-proxy, otherwise the cluster-version-operator, and some git helpers won't make use of the proxy in some cases.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

praveenkumar commented 4 years ago

@cfergeau since we are now moved with 4.5 which already have fix for those operators, can we close this now or we should add have the integration test for the same?

cfergeau commented 4 years ago

I'd do 2 things