Bug 1241045 - oc exec does not work over a proxy
Summary: oc exec does not work over a proxy
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 3.0.0
Hardware: All
OS: All
high
medium
Target Milestone: ---
: ---
Assignee: Andy Goldstein
QA Contact: Yanping Zhang
URL:
Whiteboard:
Depends On:
Blocks: 1275213
TreeView+ depends on / blocked
 
Reported: 2015-07-08 10:46 UTC by Josep 'Pep' Turro Mauri
Modified: 2019-08-15 04:50 UTC (History)
15 users (show)

Fixed In Version: openshift-3.0.2.0-0.git.16.4d626fe.el7ose
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1275213 (view as bug list)
Environment:
Last Closed: 2015-10-01 17:14:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Windows Test Client (17.33 MB, application/zip)
2015-08-31 19:56 UTC, Scott Dodson
no flags Details
MacOSX test client (18.19 MB, application/zip)
2015-08-31 19:57 UTC, Scott Dodson
no flags Details
linux test client (15.78 MB, application/x-gzip)
2015-08-31 19:58 UTC, Scott Dodson
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Origin (Github) 3370 0 None None None Never
Red Hat Knowledge Base (Solution) 1523013 0 None None None Never
Red Hat Product Errata RHBA-2015:1854 0 normal SHIPPED_LIVE Red Hat OpenShift Enterprise bug fix update 2015-10-01 21:13:57 UTC

Description Josep 'Pep' Turro Mauri 2015-07-08 10:46:56 UTC
Description of problem:
When executing osc exec, the proxy configured with HTTP_PROXY is ignored. Other commands such as osc logs -f ... are respecting HTTP_PROXY and are working fine.

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

Reported with osc version 0.5.2.2 running on windows 7 to an OSE 3.0 beta 4 installation.

Reproduced with oc v3.0.0.0-25-g235b0e7 on Linux to an OSE 3.0 GA.

How reproducible:
Always

Steps to Reproduce:
1. Have an oc client system without direct connectivity to OSE except via an HTTP proxy:
   export HTTP_PROXY=<proxy_url>
2. Attempt an "oc exec" command

Actual results:
The command "osc exec -p xyz-6-aabv1  -- ls" fails with:

 report: error: Error sending request: Get https://master:8443/api/v1beta3/namespaces/test/pods/xyz-6-aabv1/exec?command=ls&container=xyz&stderr=true&stdout=true: dial tcp X.X.X.X:8443: ConnectEx tcp: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

 reproducer: error: Error sending request: Get https://master:8443/api/v1/namespaces/test/pods/xyz-6-aabv1/exec?command=ls&container=xyz&stderr=true&stdout=true: dial tcp X.X.X.X:8443: connection refused

Expected results:
"oc exec" would work over a proxy.

Also, it should work when the proxy requires authentication.

Additional info:
Configuring http_proxy (lowercase) makes no difference.

Comment 1 Ben Parees 2015-07-20 19:16:07 UTC
also tracked in https://github.com/openshift/origin/issues/3370

Comment 2 Andy Goldstein 2015-07-22 14:26:39 UTC
Upstream WIP PR https://github.com/GoogleCloudPlatform/kubernetes/pull/11694

Comment 8 Eric Rich 2015-08-31 18:00:36 UTC
BZ 1242961 and BZ 1253675 seem to be related to this!

Comment 9 Andy Goldstein 2015-08-31 18:05:27 UTC
@Eric 1242961 is not related to this bug.

1253675 maybe is, although I think that is more about how to configure the servers (docker, master, nodes).

Comment 10 Scott Dodson 2015-08-31 19:56:21 UTC
Created attachment 1068741 [details]
Windows Test Client

Test client for windows

Comment 11 Scott Dodson 2015-08-31 19:57:18 UTC
Created attachment 1068742 [details]
MacOSX test client

Comment 12 Scott Dodson 2015-08-31 19:58:15 UTC
Created attachment 1068743 [details]
linux test client

Comment 25 Johnny Liu 2015-09-29 07:13:05 UTC
Verified this bug with openshift-3.0.2.0-0.git.16.4d626fe.el7ose.x86_64, and PASS.


$ export http_proxy=10.14.6.144:3128
$ oc logs simple-openshift-sinatra-sti-1-w06dh
You might consider adding 'puma' into your Gemfile.
[2015-09-29 02:34:29] INFO  WEBrick 1.3.1
[2015-09-29 02:34:29] INFO  ruby 2.0.0 (2015-04-13) [x86_64-linux]
[2015-09-29 02:34:29] INFO  WEBrick::HTTPServer#start: pid=1 port=8080
$ oc exec simple-openshift-sinatra-sti-1-w06dh -- ls
Gemfile
Gemfile.lock
app.rb
bundle
config.ru

Comment 27 errata-xmlrpc 2015-10-01 17:14:08 UTC
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, 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/RHBA-2015:1854


Note You need to log in before you can comment on or make changes to this bug.