Skip to content

HBASE-28106 TestShadeSaslAuthenticationProvider fails for branch-2.x - #5433

Merged
Apache9 merged 1 commit into
apache:branch-2from
Apache9:HBASE-28106
Sep 24, 2023
Merged

HBASE-28106 TestShadeSaslAuthenticationProvider fails for branch-2.x#5433
Apache9 merged 1 commit into
apache:branch-2from
Apache9:HBASE-28106

Conversation

@Apache9

Copy link
Copy Markdown
Contributor

No description provided.

@Apache9Apache9 self-assigned this Sep 24, 2023
@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 34sDocker mode activated.
-0 ⚠️yetus0m 4sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ branch-2 Compile Tests _
+1 💚mvninstall2m 27sbranch-2 passed
+1 💚compile0m 15sbranch-2 passed
+1 💚shadedjars4m 31sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 16sbranch-2 passed
_ Patch Compile Tests _
+1 💚mvninstall2m 11sthe patch passed
+1 💚compile0m 16sthe patch passed
+1 💚javac0m 16sthe patch passed
+1 💚shadedjars4m 30spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 14sthe patch passed
_ Other Tests _
+1 💚unit1m 36shbase-examples in the patch passed.
17m 54s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5433/1/artifact/yetus-jdk8-hadoop2-check/output/Dockerfile
GITHUB PR#5433
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 590943b47193 5.4.0-163-generic #180-Ubuntu SMP Tue Sep 5 13:21:23 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionbranch-2 / 8f17aa0
Default JavaTemurin-1.8.0_352-b08
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5433/1/testReport/
Max. process+thread count1411 (vs. ulimit of 30000)
modulesC: hbase-examples U: hbase-examples
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5433/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 43sDocker mode activated.
-0 ⚠️yetus0m 5sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ branch-2 Compile Tests _
+1 💚mvninstall2m 54sbranch-2 passed
+1 💚compile0m 17sbranch-2 passed
+1 💚shadedjars5m 14sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 15sbranch-2 passed
_ Patch Compile Tests _
+1 💚mvninstall2m 30sthe patch passed
+1 💚compile0m 14sthe patch passed
+1 💚javac0m 14sthe patch passed
+1 💚shadedjars5m 12spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 12sthe patch passed
_ Other Tests _
+1 💚unit1m 27shbase-examples in the patch passed.
20m 2s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5433/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#5433
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 361845f23c23 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionbranch-2 / 8f17aa0
Default JavaEclipse Adoptium-11.0.17+8
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5433/1/testReport/
Max. process+thread count1741 (vs. ulimit of 30000)
modulesC: hbase-examples U: hbase-examples
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5433/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 16sDocker 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.
_ branch-2 Compile Tests _
+1 💚mvninstall3m 56sbranch-2 passed
+1 💚compile0m 28sbranch-2 passed
+1 💚checkstyle0m 13sbranch-2 passed
+1 💚spotless0m 56sbranch has no errors when running spotless:check.
+1 💚spotbugs0m 29sbranch-2 passed
_ Patch Compile Tests _
+1 💚mvninstall2m 32sthe patch passed
+1 💚compile0m 21sthe patch passed
+1 💚javac0m 21sthe patch passed
+1 💚checkstyle0m 10sthe patch passed
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚hadoopcheck13m 5sPatch does not cause any errors with Hadoop 2.10.2 or 3.2.4 3.3.6.
+1 💚spotless0m 41spatch has no errors when running spotless:check.
+1 💚spotbugs0m 34sthe patch passed
_ Other Tests _
+1 💚asflicense0m 11sThe patch does not generate ASF License warnings.
25m 43s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5433/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#5433
Optional Testsdupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile
unameLinux 1d733b830c01 5.4.0-153-generic #170-Ubuntu SMP Fri Jun 16 13:43:31 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionbranch-2 / 8f17aa0
Default JavaEclipse Adoptium-11.0.17+8
Max. process+thread count80 (vs. ulimit of 30000)
modulesC: hbase-examples U: hbase-examples
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5433/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.

t.get(new Get(Bytes.toBytes("r1")));
fail("Should not successfully authenticate with HBase");
return null;
// Server will close the connection directly once auth failed, so at client side, we do not

@NihalJainNihalJainSep 24, 2023

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.

nit: we could add another test for HBase Master API here similar to how it is done in master branch. Could be done as another JIRA also or you could add in current itself.

The following code works:

 @Test public void testNegativeAuthentication() throws Exception {
// Validate that we can read that record back out as the user with our custom auth'n
final Configuration clientConf = new Configuration(CONF);
clientConf.setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 3);
try (Connection conn = ConnectionFactory.createConnection(clientConf)) {
UserGroupInformation user1 =
UserGroupInformation.createUserForTesting("user1", new String[0]);
user1.addToken(
ShadeClientTokenUtil.obtainToken(conn, "user1", "not a real password".toCharArray()));
LOG.info("Executing request to HBase Master which should fail");
user1.doAs(new PrivilegedExceptionAction<Void>() {
@Override public Void run() throws Exception {
try (Connection conn = ConnectionFactory.createConnection(clientConf);) {
conn.getAdmin().listTableDescriptors();
fail("Should not successfully authenticate with HBase");
} catch (Exception e) {
LOG.info("Caught exception in negative Master connectivity test", e);
assertEquals("Found unexpected exception", RetriesExhaustedException.class,
e.getClass());
}
return null;
}
});
LOG.info("Executing request to HBase RegionServer which should fail");
user1.doAs(new PrivilegedExceptionAction<Void>() {
@Override public Void run() throws Exception {
try (Connection conn = ConnectionFactory.createConnection(clientConf);
Table t = conn.getTable(tableName)) {
t.get(new Get(Bytes.toBytes("r1")));
fail("Should not successfully authenticate with HBase");
} catch (Exception e) {
LOG.info("Caught exception in negative RegionServer connectivity test", e);
assertEquals("Found unexpected exception", RetriesExhaustedException.class,
e.getClass());
}
return null;
}
});
}
}

Also FYI validateRootCause method of master fails as here we get 'Connection reset by peer' as message in the RetriesExhaustedException. Maybe this is expected for branch-2.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

I think this could be another issue, to unify the implementation of this test across different branches.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

@NihalJain

Copy link
Copy Markdown
Contributor

Overall looks good, +1

@Apache9
Apache9 merged commit 8d91cd2 into apache:branch-2Sep 24, 2023
Apache9 added a commit that referenced this pull request Sep 24, 2023
…5433)
Signed-off-by: Nihal Jain <nihaljain@apache.org>
(cherry picked from commit 8d91cd2)
Apache9 added a commit that referenced this pull request Sep 24, 2023
…5433)
Signed-off-by: Nihal Jain <nihaljain@apache.org>
(cherry picked from commit 8d91cd2)
vinayakphegde pushed a commit to vinayakphegde/hbase that referenced this pull request Apr 4, 2024
…pache#5433)
Signed-off-by: Nihal Jain <nihaljain@apache.org>
(cherry picked from commit 8d91cd2)
(cherry picked from commit e8aa715)
Change-Id: I6b808870868fd5c681d0007d5976a3ea729d8e69
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@Apache-HBase@NihalJain