Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Improve][admin|client] AsyncHttpConnector doesn't use the system properties configured #15307

Merged
merged 1 commit into from
Apr 30, 2022

Conversation

AlvaroStream
Copy link
Contributor

@AlvaroStream AlvaroStream commented Apr 25, 2022

The AsyncHttpConnector will use the configuration inside System properties http.proxyHost and http.proxyPort

It is recommended to use pulsar like this for example:

PULSAR_EXTRA_OPTS="-Dhttps.proxyHost= -Dhttps.proxyPort=<proxy_port> -Dhttp.proxyHost= -Dhttp.proxyPort=<proxy_port>" bin/pulsar-admin tenants list

Before this change the execution need to add the org.asynchttpclient.useProxyProperties that it is a little bit complex to find.

PULSAR_EXTRA_OPTS="-Dhttps.proxyHost= -Dhttps.proxyPort=<proxy_port> -Dhttp.proxyHost= -Dhttp.proxyPort=<proxy_port> -Dorg.asynchttpclient.useProxyProperties=true" bin/pulsar-admin tenants list

Motivation

When trying to use a web proxy with the pulsar-admin, the configuration was not taking into account unless the variable: org.asynchttpclient.useProxyProperties=true

With this modification this will be done by default in all the cases where the asynchttpclient is used.

Modifications

Activate in the AsyncHTTPClient to take into account by default the ProxyProperties for the proxy.

Verifying this change

  • [X ] Make sure that the change passes the CI checks.

This change is a trivial rework / code cleanup without any test coverage.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (no)
  • The public API: (no)
  • The schema: (no)
  • The default values of configurations: (no)
  • The wire protocol: (no)
  • The rest endpoints: (no)
  • The admin cli options: (no)
  • Anything that affects deployment: (no)

Documentation

Check the box below or label this PR directly.

Need to update docs?

  • [X ] no-need-doc

The
(Please explain why)

…m properties.

The AsyncHttpConnector will use the configuration inside this properties http.proxyHost and http.proxyPort

It is recommended to use pulsar like this for example:
PULSAR_EXTRA_OPTS="-Dhttps.proxyHost=<proxy> -Dhttps.proxyPort=<proxy_port> -Dhttp.proxyHost=<proxy> -Dhttp.proxyPort=<proxy_port>" bin/pulsar-admin tenants list
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Apr 25, 2022
@AlvaroStream AlvaroStream removed their assignment Apr 25, 2022
@merlimat merlimat added this to the 2.11.0 milestone Apr 25, 2022
@Technoboy- Technoboy- merged commit ebf2487 into apache:master Apr 30, 2022
codelipenghui pushed a commit that referenced this pull request May 20, 2022
nicoloboschi pushed a commit to datastax/pulsar that referenced this pull request May 23, 2022
…perties configured (apache#15307)

(cherry picked from commit ebf2487)
(cherry picked from commit cb4e216)
mattisonchao pushed a commit that referenced this pull request May 25, 2022
@mattisonchao mattisonchao added the cherry-picked/branch-2.9 Archived: 2.9 is end of life label May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants