Kevin W Monroe created BIGTOP-2741:
--------------------------------------

             Summary: smoke tests do not honor proxies
                 Key: BIGTOP-2741
                 URL: https://issues.apache.org/jira/browse/BIGTOP-2741
             Project: Bigtop
          Issue Type: Improvement
          Components: tests
    Affects Versions: 1.2.0
         Environment: Limited egress environment with the following env proxies 
set:

$ env | grep -i proxy
NO_PROXY=127.0.0.1,::1,localhost
no_proxy=127.0.0.1,::1,localhost
HTTP_PROXY=http://squid.internal:3128
http_proxy=http://squid.internal:3128
HTTPS_PROXY=http://squid.internal:3128
https_proxy=http://squid.internal:3128
            Reporter: Kevin W Monroe
            Priority: Minor


On systems with limited network egress, bigtop smoke tests will timeout trying 
to fetch bits from plugins.gradle.org:

{quote}
$ <bigtop-base>/gradlew -Psmoke.tests --info bigtop-tests:smoke-tests:pig:test 
--debug
...
22:35:07.617 [INFO] [org.gradle.configuration.project.BuildScriptProcessor] 
Evaluating root project 'bigtop' using build file 
'/home/ubuntu/bigtop.release/bigtop-1.2.0/build.gradle'.
...
22:35:07.748 [DEBUG] 
[org.gradle.internal.resource.transport.http.HttpResourceAccessor] Constructing 
external resource: 
https://plugins.gradle.org/api/gradle/2.12/plugin/use/de.undercouch.download/2.0.0
22:35:07.751 [DEBUG] 
[org.gradle.internal.resource.transport.http.HttpClientHelper] Performing HTTP 
GET: 
https://plugins.gradle.org/api/gradle/2.12/plugin/use/de.undercouch.download/2.0.0
22:35:08.189 [DEBUG] [org.apache.http.client.protocol.RequestAddCookies] 
CookieSpec selected: default
22:35:08.198 [DEBUG] [org.apache.http.client.protocol.RequestAuthCache] Auth 
cache not set in the context
22:35:08.200 [DEBUG] 
[org.apache.http.impl.conn.PoolingHttpClientConnectionManager] Connection 
request: [route: {s}->https://plugins.gradle.org:443][total kept alive: 0; 
route allocated: 0 of 2; total allocated: 0 of 20]
22:35:08.216 [DEBUG] 
[org.apache.http.impl.conn.PoolingHttpClientConnectionManager] Connection 
leased: [id: 0][route: {s}->https://plugins.gradle.org:443][total kept alive: 
0; route allocated: 1 of 2; total allocated: 1 of 20]
22:35:08.219 [DEBUG] [org.apache.http.impl.execchain.MainClientExec] Opening 
connection {s}->https://plugins.gradle.org:443
22:35:08.225 [DEBUG] 
[org.apache.http.impl.conn.DefaultHttpClientConnectionOperator] Connecting to 
plugins.gradle.org/104.16.174.166:443
22:35:08.225 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] 
Connecting socket to plugins.gradle.org/104.16.174.166:443 with timeout 0
22:37:15.516 [DEBUG] 
[org.apache.http.impl.conn.DefaultHttpClientConnectionOperator] Connect to 
plugins.gradle.org/104.16.174.166:443 timed out. Connection will be retried 
using another IP address
22:37:15.517 [DEBUG] 
[org.apache.http.impl.conn.DefaultHttpClientConnectionOperator] Connecting to 
plugins.gradle.org/104.16.171.166:443
22:37:15.518 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] 
Connecting socket to plugins.gradle.org/104.16.171.166:443 with timeout 0
...
22:45:44.445 [DEBUG] 
[org.apache.http.impl.conn.DefaultManagedHttpClientConnection] http-outgoing-0: 
Shutdown connection
22:45:44.445 [DEBUG] [org.apache.http.impl.execchain.MainClientExec] Connection 
discarded
22:45:44.446 [DEBUG] 
[org.apache.http.impl.conn.DefaultManagedHttpClientConnection] http-outgoing-0: 
Close connection
22:45:44.446 [DEBUG] 
[org.apache.http.impl.conn.PoolingHttpClientConnectionManager] Connection 
released: [id: 0][route: {s}->https://plugins.gradle.org:443][total kept alive: 
0; route allocated: 0 of 2; total allocated: 0 of 20]
22:45:44.448 [DEBUG] [org.gradle.configuration.project.BuildScriptProcessor] 
Timing: Running the build script took 10 mins 36.83 secs
22:45:44.455 [ERROR] [org.gradle.BuildExceptionReporter]
22:45:44.455 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed 
with an exception.
22:45:44.456 [ERROR] [org.gradle.BuildExceptionReporter]
22:45:44.456 [ERROR] [org.gradle.BuildExceptionReporter] * Where:
22:45:44.456 [ERROR] [org.gradle.BuildExceptionReporter] Build file 
'/home/ubuntu/bigtop.release/bigtop-1.2.0/build.gradle' line: 26
22:45:44.457 [ERROR] [org.gradle.BuildExceptionReporter]
22:45:44.457 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
22:45:44.457 [ERROR] [org.gradle.BuildExceptionReporter] Error resolving plugin 
[id: 'de.undercouch.download', version: '2.0.0']
22:45:44.458 [ERROR] [org.gradle.BuildExceptionReporter] > Could not GET 
'https://plugins.gradle.org/api/gradle/2.12/plugin/use/de.undercouch.download/2.0.0'.
22:45:44.458 [ERROR] [org.gradle.BuildExceptionReporter]    > Network is 
unreachable (connect failed)
...
{quote}

This happens because gradle does not honor system proxy vars (e.g.: 
{{http_proxy}}, {{HTTPS_PROXY}}, etc).

It would be nice if gradle would give us this for free, but it seems this issue 
did not get support from 
[upstream|https://discuss.gradle.org/t/zero-configuration-proxy-support/240].

Juju charms [handle 
this|https://github.com/juju-solutions/layer-apache-bigtop-base/commit/a61ba515422d87cb74a7e8b8236756c5b74b8f3f#diff-bce9df31303388bfd6dd6aeeb4fb78b5],
 but this is too far downstream to help non-Juju Bigtop users.

One idea for a fix would be if Bigtop would include a simple 
{{gradle.properties}} file that included properties [listed 
here|https://docs.gradle.org/current/userguide/build_environment.html#sec:accessing_the_web_via_a_proxy].
  The values for those props vars that puppet apply could fill-in during 
deployment on the target machine.

If we don't decide to handle this automatically, we should at least update the 
[docs|https://github.com/apache/bigtop/tree/master/bigtop-tests/smoke-tests] to 
tell users how to smoke test if they're behind a proxy.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to