Skip to content

HBASE-28377 Fallback to simple is broken for blocking rpc client - #5690

Merged
Apache9 merged 2 commits into
apache:masterfrom
Apache9:HBASE-28377
Feb 19, 2024
Merged

HBASE-28377 Fallback to simple is broken for blocking rpc client#5690
Apache9 merged 2 commits into
apache:masterfrom
Apache9:HBASE-28377

Conversation

@Apache9

Copy link
Copy Markdown
Contributor

No description provided.

@Apache9Apache9 self-assigned this Feb 18, 2024
@Apache9

Copy link
Copy Markdown
ContributorAuthor

The fix itself is very simple, just set saslRpcClient to null when we want to fallback to simple auth at client side.

The most important changes are the newly added tests in AbstractTestSecureIPC. Also changed to throw FallbackDisallowedException instead of IOException in HBaseSaslRpcClient, to align with netty rpc client.

@Apache9

Copy link
Copy Markdown
ContributorAuthor

@bbeaudreault We need to fix this before landing HBASE-28321.

@bbeaudreault

Copy link
Copy Markdown
Contributor

I'm not an expert on sasl. It makes some sense that if we fallback to simple, we don't need a saslRpcClient. But can you explain a little more what the issue was and why this change fixes it?

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 39sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
_ master Compile Tests _
+0 🆗mvndep0m 11sMaven dependency ordering for branch
+1 💚mvninstall2m 55smaster passed
+1 💚compile3m 4smaster passed
+1 💚checkstyle0m 54smaster passed
+1 💚spotless0m 43sbranch has no errors when running spotless:check.
+1 💚spotbugs2m 17smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 12sMaven dependency ordering for patch
+1 💚mvninstall2m 43sthe patch passed
+1 💚compile3m 1sthe patch passed
+1 💚javac3m 1sthe patch passed
+1 💚checkstyle0m 16shbase-client: The patch generated 0 new + 2 unchanged - 1 fixed = 2 total (was 3)
+1 💚checkstyle0m 36sThe patch passed checkstyle in hbase-server
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚hadoopcheck4m 46sPatch does not cause any errors with Hadoop 3.3.6.
+1 💚spotless0m 44spatch has no errors when running spotless:check.
+1 💚spotbugs2m 32sthe patch passed
_ Other Tests _
+1 💚asflicense0m 20sThe patch does not generate ASF License warnings.
32m 19s
SubsystemReport/Notes
DockerClientAPI=1.44 ServerAPI=1.44 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5690/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#5690
Optional Testsdupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile
unameLinux f01c2d64ca0f 5.4.0-169-generic #187-Ubuntu SMP Thu Nov 23 14:52:28 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 96a447f
Default JavaEclipse Adoptium-11.0.17+8
Max. process+thread count80 (vs. ulimit of 30000)
modulesC: hbase-client hbase-server U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5690/1/console
versionsgit=2.34.1 maven=3.8.6 spotbugs=4.7.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 12sDocker mode activated.
-0 ⚠️yetus0m 2sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗mvndep0m 11sMaven dependency ordering for branch
+1 💚mvninstall2m 58smaster passed
+1 💚compile1m 9smaster passed
+1 💚shadedjars5m 13sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 43smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 14sMaven dependency ordering for patch
+1 💚mvninstall2m 48sthe patch passed
+1 💚compile1m 8sthe patch passed
+1 💚javac1m 8sthe patch passed
+1 💚shadedjars5m 6spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 42sthe patch passed
_ Other Tests _
+1 💚unit1m 42shbase-client in the patch passed.
-1 ❌unit224m 30shbase-server in the patch failed.
251m 26s
SubsystemReport/Notes
DockerClientAPI=1.44 ServerAPI=1.44 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5690/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#5690
Optional Testsjavac javadoc unit shadedjars compile
unameLinux b50cb63ec347 5.4.0-166-generic #183-Ubuntu SMP Mon Oct 2 11:28:33 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 96a447f
Default JavaEclipse Adoptium-11.0.17+8
unithttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5690/1/artifact/yetus-jdk11-hadoop3-check/output/patch-unit-hbase-server.txt
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5690/1/testReport/
Max. process+thread count4928 (vs. ulimit of 30000)
modulesC: hbase-client hbase-server U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5690/1/console
versionsgit=2.34.1 maven=3.8.6
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 36sDocker mode activated.
-0 ⚠️yetus0m 4sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗mvndep0m 12sMaven dependency ordering for branch
+1 💚mvninstall2m 40smaster passed
+1 💚compile1m 1smaster passed
+1 💚shadedjars5m 6sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 41smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 14sMaven dependency ordering for patch
+1 💚mvninstall2m 29sthe patch passed
+1 💚compile1m 0sthe patch passed
+1 💚javac1m 0sthe patch passed
+1 💚shadedjars5m 4spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 40sthe patch passed
_ Other Tests _
+1 💚unit1m 18shbase-client in the patch passed.
-1 ❌unit238m 6shbase-server in the patch failed.
263m 48s
SubsystemReport/Notes
DockerClientAPI=1.44 ServerAPI=1.44 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5690/1/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR#5690
Optional Testsjavac javadoc unit shadedjars compile
unameLinux da91e08a466e 5.4.0-166-generic #183-Ubuntu SMP Mon Oct 2 11:28:33 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 96a447f
Default JavaTemurin-1.8.0_352-b08
unithttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5690/1/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-hbase-server.txt
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5690/1/testReport/
Max. process+thread count4999 (vs. ulimit of 30000)
modulesC: hbase-client hbase-server U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5690/1/console
versionsgit=2.34.1 maven=3.8.6
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache9

Copy link
Copy Markdown
ContributorAuthor

I'm not an expert on sasl. It makes some sense that if we fallback to simple, we don't need a saslRpcClient. But can you explain a little more what the issue was and why this change fixes it?

It is because here

When writing out connection header, we will test whether saslRpcClient is null to determine whether to do encryption, so if we want to fallback to simple, we need to set it saslRpcClient to null, otherwise we will get an exception like this:

java.lang.IllegalStateException: SASL authentication not completed
at com.sun.security.sasl.util.AbstractSaslImpl.getNegotiatedProperty(AbstractSaslImpl.java:157)
at org.apache.hadoop.hbase.security.HBaseSaslRpcClient.getSaslQOP(HBaseSaslRpcClient.java:174)
at org.apache.hadoop.hbase.ipc.BlockingRpcConnection.writeConnectionHeader(BlockingRpcConnection.java:551)
at org.apache.hadoop.hbase.ipc.BlockingRpcConnection.setupIOstreams(BlockingRpcConnection.java:507)
at org.apache.hadoop.hbase.ipc.BlockingRpcConnection.writeRequest(BlockingRpcConnection.java:623)
at org.apache.hadoop.hbase.ipc.BlockingRpcConnection.access$2(BlockingRpcConnection.java:608)
at org.apache.hadoop.hbase.ipc.BlockingRpcConnection$4.run(BlockingRpcConnection.java:757)
at org.apache.hadoop.hbase.ipc.HBaseRpcControllerImpl.notifyOnCancel(HBaseRpcControllerImpl.java:276)
at org.apache.hadoop.hbase.ipc.BlockingRpcConnection.sendRequest(BlockingRpcConnection.java:730)
at org.apache.hadoop.hbase.ipc.AbstractRpcClient.callMethod(AbstractRpcClient.java:448)
at org.apache.hadoop.hbase.ipc.AbstractRpcClient.callBlockingMethod(AbstractRpcClient.java:335)
at org.apache.hadoop.hbase.ipc.AbstractRpcClient.access$0(AbstractRpcClient.java:331)
at org.apache.hadoop.hbase.ipc.AbstractRpcClient$BlockingRpcChannelImplementation.callBlockingMethod(AbstractRpcClient.java:599)
at org.apache.hadoop.hbase.shaded.ipc.protobuf.generated.TestRpcServiceProtos$TestProtobufRpcProto$BlockingStub.echo(TestRpcServiceProtos.java:490)
at org.apache.hadoop.hbase.security.AbstractTestSecureIPC$TestThread.run(AbstractTestSecureIPC.java:448)

@Apache9

Copy link
Copy Markdown
ContributorAuthor

Let me fix the failed UT, seems we could also have other types of exceptions when server close the connection.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 34sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
_ master Compile Tests _
+0 🆗mvndep0m 11sMaven dependency ordering for branch
+1 💚mvninstall2m 54smaster passed
+1 💚compile3m 2smaster passed
+1 💚checkstyle0m 55smaster passed
+1 💚spotless0m 44sbranch has no errors when running spotless:check.
+1 💚spotbugs2m 14smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 11sMaven dependency ordering for patch
+1 💚mvninstall2m 44sthe patch passed
+1 💚compile3m 5sthe patch passed
+1 💚javac3m 5sthe patch passed
+1 💚checkstyle0m 16shbase-client: The patch generated 0 new + 2 unchanged - 1 fixed = 2 total (was 3)
+1 💚checkstyle0m 35sThe patch passed checkstyle in hbase-server
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚hadoopcheck4m 48sPatch does not cause any errors with Hadoop 3.3.6.
+1 💚spotless0m 43spatch has no errors when running spotless:check.
+1 💚spotbugs3m 5sthe patch passed
_ Other Tests _
+1 💚asflicense0m 21sThe patch does not generate ASF License warnings.
32m 39s
SubsystemReport/Notes
DockerClientAPI=1.44 ServerAPI=1.44 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5690/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#5690
Optional Testsdupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile
unameLinux 955a15cbe32e 5.4.0-169-generic #187-Ubuntu SMP Thu Nov 23 14:52:28 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / b5175ba
Default JavaEclipse Adoptium-11.0.17+8
Max. process+thread count82 (vs. ulimit of 30000)
modulesC: hbase-client hbase-server U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5690/2/console
versionsgit=2.34.1 maven=3.8.6 spotbugs=4.7.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 13sDocker mode activated.
-0 ⚠️yetus0m 2sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗mvndep0m 13sMaven dependency ordering for branch
+1 💚mvninstall2m 43smaster passed
+1 💚compile1m 7smaster passed
+1 💚shadedjars5m 8sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 42smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 14sMaven dependency ordering for patch
+1 💚mvninstall2m 43sthe patch passed
+1 💚compile1m 9sthe patch passed
+1 💚javac1m 9sthe patch passed
+1 💚shadedjars5m 4spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 43sthe patch passed
_ Other Tests _
+1 💚unit1m 43shbase-client in the patch passed.
+1 💚unit222m 54shbase-server in the patch passed.
249m 11s
SubsystemReport/Notes
DockerClientAPI=1.44 ServerAPI=1.44 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5690/2/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#5690
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 3fcae02d4d1e 5.4.0-166-generic #183-Ubuntu SMP Mon Oct 2 11:28:33 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / b5175ba
Default JavaEclipse Adoptium-11.0.17+8
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5690/2/testReport/
Max. process+thread count5409 (vs. ulimit of 30000)
modulesC: hbase-client hbase-server U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5690/2/console
versionsgit=2.34.1 maven=3.8.6
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 44sDocker mode activated.
-0 ⚠️yetus0m 2sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗mvndep0m 11sMaven dependency ordering for branch
+1 💚mvninstall2m 35smaster passed
+1 💚compile1m 1smaster passed
+1 💚shadedjars5m 1sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 41smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 14sMaven dependency ordering for patch
+1 💚mvninstall2m 27sthe patch passed
+1 💚compile1m 2sthe patch passed
+1 💚javac1m 2sthe patch passed
+1 💚shadedjars4m 59spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 40sthe patch passed
_ Other Tests _
+1 💚unit1m 22shbase-client in the patch passed.
-1 ❌unit241m 15shbase-server in the patch failed.
267m 32s
SubsystemReport/Notes
DockerClientAPI=1.44 ServerAPI=1.44 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5690/2/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR#5690
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 7dbd9b371192 5.4.0-169-generic #187-Ubuntu SMP Thu Nov 23 14:52:28 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / b5175ba
Default JavaTemurin-1.8.0_352-b08
unithttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5690/2/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-hbase-server.txt
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5690/2/testReport/
Max. process+thread count5243 (vs. ulimit of 30000)
modulesC: hbase-client hbase-server U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5690/2/console
versionsgit=2.34.1 maven=3.8.6
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@bbeaudreaultbbeaudreault left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the explanation. Lgtm

@Apache9
Apache9 merged commit 7bc07a6 into apache:masterFeb 19, 2024
Apache9 added a commit that referenced this pull request Feb 19, 2024
Signed-off-by: Bryan Beaudreault <bbeaudreault@apache.org>
(cherry picked from commit 7bc07a6)
Apache9 added a commit that referenced this pull request Feb 19, 2024
Signed-off-by: Bryan Beaudreault <bbeaudreault@apache.org>
(cherry picked from commit 7bc07a6)
Apache9 added a commit that referenced this pull request Feb 19, 2024
Signed-off-by: Bryan Beaudreault <bbeaudreault@apache.org>
(cherry picked from commit 7bc07a6)
Apache9 added a commit that referenced this pull request Feb 19, 2024
Signed-off-by: Bryan Beaudreault <bbeaudreault@apache.org>
(cherry picked from commit 7bc07a6)
Apache9 added a commit that referenced this pull request Feb 20, 2024
Signed-off-by: Bryan Beaudreault <bbeaudreault@apache.org>
(cherry picked from commit 7bc07a6)
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@Apache9@bbeaudreault@Apache-HBase