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

[fix][cli] Fix logging noise while admin tool exit #19884

Merged
merged 2 commits into from Jun 6, 2023

Conversation

rdhabalia
Copy link
Contributor

@rdhabalia rdhabalia commented Mar 22, 2023

Motivation

Pulsar admin tool unnecessary logs noise while existing the process which gives bad user experience and should be removed.

./bin/pulsar-admin topics list test1/test2               
null

Reason: java.util.concurrent.CompletionException: org.apache.pulsar.client.admin.internal.http.AsyncHttpConnector$RetryException: Could not complete the operation. Number of retries has been exhausted. Failed reason: Connection refused: localhost/127.0.0.1:8080
2023-03-21T17:53:57,334-0700 [main] WARN  org.apache.pulsar.common.util.ShutdownUtil - Triggering immediate shutdown of current process with status 1
java.lang.Exception: Stacktrace for immediate shutdown
	at org.apache.pulsar.common.util.ShutdownUtil.triggerImmediateForcefulShutdown(ShutdownUtil.java:55) ~[pulsar-common-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
	at org.apache.pulsar.common.util.ShutdownUtil.triggerImmediateForcefulShutdown(ShutdownUtil.java:50) ~[pulsar-common-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
	at org.apache.pulsar.admin.cli.PulsarAdminTool.exit(PulsarAdminTool.java:315) ~[pulsar-client-tools.jar:3.0.0-SNAPSHOT]
	at org.apache.pulsar.admin.cli.PulsarAdminTool.execute(PulsarAdminTool.java:305) ~[pulsar-client-tools.jar:3.0.0-SNAPSHOT]
	at org.apache.pulsar.admin.cli.PulsarAdminTool.main(PulsarAdminTool.java:280) ~[pulsar-client-tools.jar:3.0.0-SNAPSHOT]

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

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

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

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

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository:

@rdhabalia rdhabalia added area/cli doc-not-needed Your PR changes do not impact docs ready-to-test labels Mar 22, 2023
@rdhabalia rdhabalia added this to the 3.0.0 milestone Mar 22, 2023
@rdhabalia rdhabalia self-assigned this Mar 22, 2023
@poorbarcode
Copy link
Contributor

Since we will start the RC version of 3.0.0 on 2023-04-11, I will change the label/milestone of PR who have not been merged.

  • The PR of type feature is deferred to 3.1.0
  • The PR of type fix is deferred to 3.0.1

So drag this PR to 3.0.1

@nicoloboschi
Copy link
Contributor

/pulsarbot rerun-failure-checks

@github-actions
Copy link

github-actions bot commented Jun 5, 2023

The pr had no activity for 30 days, mark with Stale label.

@github-actions github-actions bot added the Stale label Jun 5, 2023
@tisonkun
Copy link
Member

tisonkun commented Jun 5, 2023

I like this change. Let me see if I can help nudge this patch.

@github-actions github-actions bot removed the Stale label Jun 6, 2023
Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

I was about to send a similar patch

Thanks

@tisonkun
Copy link
Member

tisonkun commented Jun 6, 2023

Merging..

Thanks for taking care of this!

@tisonkun tisonkun merged commit ad352a9 into apache:master Jun 6, 2023
43 checks passed
RobertIndie pushed a commit that referenced this pull request Jun 7, 2023
Co-authored-by: tison <wander4096@gmail.com>
(cherry picked from commit ad352a9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants