Bug 1856859

Summary: NO_PROXY variable not picking up cidr range.
Product: OpenShift Container Platform Reporter: manisha <mdhanve>
Component: openshift-apiserverAssignee: Standa Laznicka <slaznick>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Xingxing Xia <xxia>
Severity: high Docs Contact:
Priority: high    
Version: 4.4CC: akhaire, aos-bugs, mfojtik, nijoshi, rabdulra, slaznick
Target Milestone: ---Flags: mdhanve: needinfo-
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-08-25 10:01:54 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 manisha 2020-07-14 15:15:40 UTC
Description of problem: 

Facing issues while authenticating to the cluster and could observe below error and oc binary not working as well.

---
F0714 07:22:20.965587  720050 helpers.go:114] Error from server (InternalError): Internal error occurred: unexpected response: 400
---

While investigating the issue it was identified that there is an issue with proxy in the cluster. When checked env variables configured for proxy in the crictl config file those seemed ok. however, the curl request was going through 
  proxy instead of noproxy configured for internal communication in the cluster.

The NO_PROXY variable is not picking up CIDR range however when individual IP is given it successfully takes up the IP address.


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


How reproducible: Always.

Comment 1 Stefan Schimanski 2020-07-14 16:54:23 UTC
Please attach must-gather info.

Comment 9 Standa Laznicka 2020-07-27 13:31:06 UTC
The logs in comment 3 show no login attempt.
The logs in comment 4 require me to request access on google docs.
The logs in comment 5 appear to be cut.
https:// scheme proxy from comment 6 is unsupported (see docs).

I am not sure what comment 6 is supposed to show/prove.

Comment 10 Standa Laznicka 2020-07-28 07:30:14 UTC
Ok, I got access to logs from comment 4, which seem to be logs of a kube API server. They don't necessary show any malign behavior, although it appears that the openshift-apiserver connections time out every now and then.

I noticed comment 5 contains two other log files I cannot access. I hope one of them is a must-gather and that me and Stefan get access to it soon.

Comment 13 Standa Laznicka 2020-08-03 13:39:09 UTC
*** Bug 1856860 has been marked as a duplicate of this bug. ***

Comment 14 Standa Laznicka 2020-08-03 14:36:24 UTC
@Rajeeb: I am not exactly sure when authn is failing for you, but based on the logs of the oauth server from your must-gather, if the failure is observed during their Argo CD login, it's most probably because they've got it misconfigured, the OAuth client's name (they use SA as an oauth-client, it seems) comes with %3A where colons should be which causes it to fail.

@manisha: would you be able to get me at least oauth-server logs? Of all the oauth-server pods I mean, they should be named "oauth-openshift" if you're looking for them with crictl, and there should be two of them appearing on different nodes.

Comment 15 manisha 2020-08-03 17:17:24 UTC
@standa: 'oauth-openshift' container logs have been attached already on comment #3.

Comment 16 Standa Laznicka 2020-08-04 07:41:02 UTC
manisha, please read comment 14 _CAREFULLY_. The logs you provided come from 1 of the oauth-server instances. Usually, there are two such instances. And the logs should also show the reason why the server returned 400, like in the case of the logs Rajeeb sent. If there is no error logged, that would mean no failed log-in attempt was logged, in which case I would not be able to help.

Comment 18 Standa Laznicka 2020-08-10 08:03:27 UTC
Rajeeb, what's not working, then? If it's just cURL, you should report that to their component, not here.

Comment 22 Standa Laznicka 2020-08-25 10:01:54 UTC
No prove of a bug from the original description was provided, closing.

There were attempts to show that cURL was not picking CIDR addresses in NO_PROXY envvar as a second issue reported here, but cURL is not a part of OpenShift.

Comment 23 Xingxing Xia 2020-09-04 05:10:15 UTC
TL;DR; Once ever discussed with installation QE about CIDR in curl's NO_PROXY implementation, seems it is working as expected for curl: see curl doc in bug 1825219#c8