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

STORM-3540 fix Pacemaker connection issues #3169

Merged
merged 1 commit into from Dec 2, 2019

Conversation

agresch
Copy link
Contributor

@agresch agresch commented Nov 15, 2019

"Exception occurred in Pacemaker" message was not logging cause properly until I changed the message for some reason.

Problem:

  1. ThriftNettyClientCodec.initChannel() is called, which we map to PacemakerClient.channelReady().
  2. We get a pacemaker message to write
  3. We see the channel as ready and write/flush the message
  4. The flush causes a NotYetConnected exception
  5. This triggers a reconnect
  6. The reconnect causes us to go to step 1) and we get stuck in a loop failing to talk to Pacemaker

The solution I think is more appropriate:

PacemakerClientHandler.channelActive() should be the one calling PacemakerClient.channelReady().

@@ -72,7 +72,7 @@ protected void initChannel(Channel ch) throws Exception {
throw new RuntimeException(e);
}
} else {
client.channelReady(ch);
// no work for AuthMethod.NONE
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider removing the else block entirely

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My personal preference is to leave it so we know AuthMethod.NONE was not skipped by accident.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, makes sense.

@srdo
Copy link
Contributor

srdo commented Nov 21, 2019

+1, good catch

Copy link
Contributor

@kishorvpatil kishorvpatil left a comment

Choose a reason for hiding this comment

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

👍

@govind-menon govind-menon merged commit 0f9f3fb into apache:master Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants