Bug 1506978 - ASB should support Behind Proxy environment
Summary: ASB should support Behind Proxy environment
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Service Broker
Version: 3.7.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: 3.9.0
Assignee: Erik Nelson
QA Contact: Zhang Cheng
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-27 10:23 UTC by Zhang Cheng
Modified: 2021-12-10 15:21 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Ansible Service Broker previously did not support deployments behind a proxied network environment. Consequence: The Ansible Service Broker was not compatible with a proxied environment. Fix: The Ansible Service Broker propogates configured proxy vars to required assets to ensure all items respect proxy environment settings. Result: The Ansible Service Broker is deployable in a proxied network environment.
Clone Of:
Environment:
Last Closed: 2018-08-28 13:33:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Comment 2 Erik Nelson 2017-12-13 19:05:37 UTC
We've been unable to reproduce these issues and have been able to provision and bind behind a proxy using `oc cluster up` based environments as well as openshift-ansible environments using the following variables: `openshift_http_proxy and openshift_https_proxy`.

Can you please retest, and if you continue to see issues, please confirm HTTP_PROXY, HTTPS_PROXY, and NO_PROXY are appropriately set in /etc/sysconfig/docker on the cluster nodes?

Comment 6 Zhang Cheng 2018-01-09 08:41:49 UTC
@Erik
I hit some trouble in environment installation from Jenkins today. I will re-setup a env for you debug later. Thanks.

Comment 8 Erik Nelson 2018-01-10 16:30:30 UTC
Think I may have gotten to the bottom of this now that I was able to access the repro env.

The registry is configured with https://registry.access.redhat.com as the root. During the bootstrap phase, a number of requests are made against this server to load the APB list. As part of that, the crane server is redirecting /v2/ requests to a registry behind "access.redhat.com", *not* "registry.access.redhat.com". I confirmed this was the case manually walking through the requests that the broker needs to make using curl while inside the broker's container.

I suspect the proxy server is configured to whitelist only "registry.access.redhat.com". Is that true? Can you please make sure that "access.redhat.com" is whitelisted as well, and retest?

Comment 9 Erik Nelson 2018-01-10 16:31:32 UTC
This is the address in question that the container must have access to: https://access.redhat.com/webassets/docker/content/dist/rhel/server/7/7Server/x86_64/ose/3/containers/registry/openshift3/mariadb-apb/manifests/v3.7

Comment 10 Erik Nelson 2018-01-10 16:32:41 UTC
(And all other paths for each of the various APBs)

Comment 12 Erik Nelson 2018-01-11 15:29:45 UTC
I can't even ping access.redhat.com from the master host, and I'm not familiar with how these environments are set up. Is there something about the networking configuration that would prevent communications with this host?

Comment 19 Zhang Cheng 2018-01-17 08:57:36 UTC
Thanks for Gan's explanation. I'm changing status to "assign" base on the current test result.

Comment 23 Zhang Cheng 2018-01-20 15:08:18 UTC
Will verify this bug in 1.1.6. The latest is 1.1.5 from downstream registry.

Comment 26 Zhang Cheng 2018-01-27 14:28:51 UTC
@Erik,

That is OKay. PR #683 was merged in 1.1.8, I will double check while downstream image ready for test.

Please update and add comments if you find any more need to change. Furthermore, I can support you prepare a behind proxy env for you develop or pre-check if you need. BTW, I cannot keep a env long time, the env in Comment 24 maybe lost by Jan. 29 or 30.

Comment 27 Erik Nelson 2018-01-30 14:46:09 UTC
@Zhang I believe 1.1.8 should be available with the lowercase proxy var fix. Please make sure you have configured the broker with HTTP_PROXY,HTTPS_PROXY, and NO_PROXY, and see if you can confirm the APB pod that it spawns also have those environment variables set on them.

Additionally, the "openshift.keep_namespace" and "openshift.keep_namespace_on_error" settings in the broker-config configmap should be set to true; these will help keep the resources around for debugging purposes.

If you encounter trouble, please keep the environment up, I will try to investigate as soon as I can so you don't have to keep it around for too long.

Comment 28 Zhang Cheng 2018-01-31 05:38:25 UTC
@Erik 
Will verify till downstream image ready. The latest is 1.1.7 at present.

Comment 29 Zhang Cheng 2018-02-05 08:49:11 UTC
Changing status to "MODIFIED" since still waiting downstream image for test.

Comment 30 Zhang Cheng 2018-02-06 05:52:34 UTC
Changing status to ON_QA since downstream image ready for test.

Comment 34 Zhang Cheng 2018-02-07 03:15:45 UTC
Follow comment31, changing status to "Verified"

HTTP_PROXY,HTTPS_PROXY, and NO_PROXY are set on the broker's container can be applyed those same settings in uppercase and lowercase to the APBs succeed. APBs provision/binding succeed in my testing.

Comment 39 Erik Nelson 2019-12-05 13:54:43 UTC
REsolved


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