You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Thomas Tauber-Marshall (Code Review)" <ge...@cloudera.org> on 2019/09/06 03:06:34 UTC

[Impala-ASF-CR] IMPALA-8917: Remove hostname from webui links if Knox isn't being used

Thomas Tauber-Marshall has uploaded this change for review. ( http://gerrit.cloudera.org:8080/14184


Change subject: IMPALA-8917: Remove hostname from webui links if Knox isn't being used
......................................................................

IMPALA-8917: Remove hostname from webui links if Knox isn't being used

IMPALA-8897 added the hostname to all links on the debug webui in
order to facilitate proxying connections through Apache Knox. This
makes the webui difficult to use in situations where the hostname is
not DNS-resolvable.

This patch fixes this by only including the hostname with links if
Knox proxying is actually being used, which we determine by looking
for the 'host' parameter in the request, which is used by Knox to
determine what impalad host to connect to.

It removes the hidden form fields that were added to support Knox
integration when not being accessed through Knox.

It also adds a class comment on Webserver explaining the requirements
for keeping the webui compatible with Knox.

Testing:
- Added a test that checks that links on the webui are made absolute
  when the 'host' parameter is in the request.

Change-Id: I0ca88115ef4a0fe2d68f1e9ee5fcc4bb415a2d85
---
M be/src/util/webserver.cc
M be/src/util/webserver.h
M tests/webserver/test_web_pages.py
M www/form-hidden-inputs.tmpl
4 files changed, 48 insertions(+), 19 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/84/14184/1
-- 
To view, visit http://gerrit.cloudera.org:8080/14184
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0ca88115ef4a0fe2d68f1e9ee5fcc4bb415a2d85
Gerrit-Change-Number: 14184
Gerrit-PatchSet: 1
Gerrit-Owner: Thomas Tauber-Marshall <tm...@cloudera.com>

[Impala-ASF-CR] IMPALA-8917: Remove hostname from webui links if Knox isn't being used

Posted by "Thomas Tauber-Marshall (Code Review)" <ge...@cloudera.org>.
Thomas Tauber-Marshall has abandoned this change. ( http://gerrit.cloudera.org:8080/14184 )

Change subject: IMPALA-8917: Remove hostname from webui links if Knox isn't being used
......................................................................


Abandoned

Turns out this approach doesn't work because Knox strips the 'host' parameter before sending the request to Impala. Working on figuring out an alternative option
-- 
To view, visit http://gerrit.cloudera.org:8080/14184
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: abandon
Gerrit-Change-Id: I0ca88115ef4a0fe2d68f1e9ee5fcc4bb415a2d85
Gerrit-Change-Number: 14184
Gerrit-PatchSet: 2
Gerrit-Owner: Thomas Tauber-Marshall <tm...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Thomas Tauber-Marshall <tm...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>

[Impala-ASF-CR] IMPALA-8917: Remove hostname from webui links if Knox isn't being used

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/14184 )

Change subject: IMPALA-8917: Remove hostname from webui links if Knox isn't being used
......................................................................


Patch Set 2:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/4488/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


-- 
To view, visit http://gerrit.cloudera.org:8080/14184
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0ca88115ef4a0fe2d68f1e9ee5fcc4bb415a2d85
Gerrit-Change-Number: 14184
Gerrit-PatchSet: 2
Gerrit-Owner: Thomas Tauber-Marshall <tm...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Thomas Tauber-Marshall <tm...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Fri, 06 Sep 2019 19:23:21 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-8917: Remove hostname from webui links if Knox isn't being used

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/14184 )

Change subject: IMPALA-8917: Remove hostname from webui links if Knox isn't being used
......................................................................


Patch Set 1:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/4482/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


-- 
To view, visit http://gerrit.cloudera.org:8080/14184
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0ca88115ef4a0fe2d68f1e9ee5fcc4bb415a2d85
Gerrit-Change-Number: 14184
Gerrit-PatchSet: 1
Gerrit-Owner: Thomas Tauber-Marshall <tm...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Fri, 06 Sep 2019 03:47:20 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-8917: Remove hostname from webui links if Knox isn't being used

Posted by "Thomas Tauber-Marshall (Code Review)" <ge...@cloudera.org>.
Thomas Tauber-Marshall has posted comments on this change. ( http://gerrit.cloudera.org:8080/14184 )

Change subject: IMPALA-8917: Remove hostname from webui links if Knox isn't being used
......................................................................


Patch Set 2:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/14184/1/tests/webserver/test_web_pages.py
File tests/webserver/test_web_pages.py:

http://gerrit.cloudera.org:8080/#/c/14184/1/tests/webserver/test_web_pages.py@163
PS1, Line 163: 
> flake8: E501 line too long (95 > 90 characters)
Done



-- 
To view, visit http://gerrit.cloudera.org:8080/14184
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0ca88115ef4a0fe2d68f1e9ee5fcc4bb415a2d85
Gerrit-Change-Number: 14184
Gerrit-PatchSet: 2
Gerrit-Owner: Thomas Tauber-Marshall <tm...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Thomas Tauber-Marshall <tm...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Fri, 06 Sep 2019 18:42:51 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-8917: Remove hostname from webui links if Knox isn't being used

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/14184 )

Change subject: IMPALA-8917: Remove hostname from webui links if Knox isn't being used
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/14184/1/tests/webserver/test_web_pages.py
File tests/webserver/test_web_pages.py:

http://gerrit.cloudera.org:8080/#/c/14184/1/tests/webserver/test_web_pages.py@163
PS1, Line 163: r
flake8: E501 line too long (95 > 90 characters)



-- 
To view, visit http://gerrit.cloudera.org:8080/14184
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0ca88115ef4a0fe2d68f1e9ee5fcc4bb415a2d85
Gerrit-Change-Number: 14184
Gerrit-PatchSet: 1
Gerrit-Owner: Thomas Tauber-Marshall <tm...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Fri, 06 Sep 2019 03:10:47 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-8917: Remove hostname from webui links if Knox isn't being used

Posted by "Thomas Tauber-Marshall (Code Review)" <ge...@cloudera.org>.
Hello Tim Armstrong, Impala Public Jenkins, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/14184

to look at the new patch set (#2).

Change subject: IMPALA-8917: Remove hostname from webui links if Knox isn't being used
......................................................................

IMPALA-8917: Remove hostname from webui links if Knox isn't being used

IMPALA-8897 added the hostname to all links on the debug webui in
order to facilitate proxying connections through Apache Knox. This
makes the webui difficult to use in situations where the hostname is
not DNS-resolvable.

This patch fixes this by only including the hostname with links if
Knox proxying is actually being used, which we determine by looking
for the 'host' parameter in the request, which is used by Knox to
determine what impalad host to connect to.

It removes the hidden form fields that were added to support Knox
integration when not being accessed through Knox.

It also adds a class comment on Webserver explaining the requirements
for keeping the webui compatible with Knox.

Testing:
- Added a test that checks that links on the webui are made absolute
  when the 'host' parameter is in the request.

Change-Id: I0ca88115ef4a0fe2d68f1e9ee5fcc4bb415a2d85
---
M be/src/util/webserver.cc
M be/src/util/webserver.h
M tests/webserver/test_web_pages.py
M www/form-hidden-inputs.tmpl
4 files changed, 56 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/84/14184/2
-- 
To view, visit http://gerrit.cloudera.org:8080/14184
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I0ca88115ef4a0fe2d68f1e9ee5fcc4bb415a2d85
Gerrit-Change-Number: 14184
Gerrit-PatchSet: 2
Gerrit-Owner: Thomas Tauber-Marshall <tm...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>