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

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

Merged
merged 1 commit into from
Sep 24, 2023

Conversation

Apache9
Copy link
Contributor

@Apache9 Apache9 commented Sep 24, 2023

No description provided.

@Apache9 Apache9 requested a review from NihalJain September 24, 2023 10:14
@Apache9 Apache9 self-assigned this Sep 24, 2023
@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 34s Docker mode activated.
-0 ⚠️ yetus 0m 4s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ branch-2 Compile Tests _
+1 💚 mvninstall 2m 27s branch-2 passed
+1 💚 compile 0m 15s branch-2 passed
+1 💚 shadedjars 4m 31s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 16s branch-2 passed
_ Patch Compile Tests _
+1 💚 mvninstall 2m 11s the patch passed
+1 💚 compile 0m 16s the patch passed
+1 💚 javac 0m 16s the patch passed
+1 💚 shadedjars 4m 30s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 14s the patch passed
_ Other Tests _
+1 💚 unit 1m 36s hbase-examples in the patch passed.
17m 54s
Subsystem Report/Notes
Docker ClientAPI=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 Tests javac javadoc unit shadedjars compile
uname Linux 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 tool maven
Personality dev-support/hbase-personality.sh
git revision branch-2 / 8f17aa0
Default Java Temurin-1.8.0_352-b08
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5433/1/testReport/
Max. process+thread count 1411 (vs. ulimit of 30000)
modules C: hbase-examples U: hbase-examples
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5433/1/console
versions git=2.34.1 maven=3.8.6
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 43s Docker mode activated.
-0 ⚠️ yetus 0m 5s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ branch-2 Compile Tests _
+1 💚 mvninstall 2m 54s branch-2 passed
+1 💚 compile 0m 17s branch-2 passed
+1 💚 shadedjars 5m 14s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 15s branch-2 passed
_ Patch Compile Tests _
+1 💚 mvninstall 2m 30s the patch passed
+1 💚 compile 0m 14s the patch passed
+1 💚 javac 0m 14s the patch passed
+1 💚 shadedjars 5m 12s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 12s the patch passed
_ Other Tests _
+1 💚 unit 1m 27s hbase-examples in the patch passed.
20m 2s
Subsystem Report/Notes
Docker ClientAPI=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 Tests javac javadoc unit shadedjars compile
uname Linux 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 tool maven
Personality dev-support/hbase-personality.sh
git revision branch-2 / 8f17aa0
Default Java Eclipse Adoptium-11.0.17+8
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5433/1/testReport/
Max. process+thread count 1741 (vs. ulimit of 30000)
modules C: hbase-examples U: hbase-examples
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5433/1/console
versions git=2.34.1 maven=3.8.6
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 16s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ branch-2 Compile Tests _
+1 💚 mvninstall 3m 56s branch-2 passed
+1 💚 compile 0m 28s branch-2 passed
+1 💚 checkstyle 0m 13s branch-2 passed
+1 💚 spotless 0m 56s branch has no errors when running spotless:check.
+1 💚 spotbugs 0m 29s branch-2 passed
_ Patch Compile Tests _
+1 💚 mvninstall 2m 32s the patch passed
+1 💚 compile 0m 21s the patch passed
+1 💚 javac 0m 21s the patch passed
+1 💚 checkstyle 0m 10s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 hadoopcheck 13m 5s Patch does not cause any errors with Hadoop 2.10.2 or 3.2.4 3.3.6.
+1 💚 spotless 0m 41s patch has no errors when running spotless:check.
+1 💚 spotbugs 0m 34s the patch passed
_ Other Tests _
+1 💚 asflicense 0m 11s The patch does not generate ASF License warnings.
25m 43s
Subsystem Report/Notes
Docker ClientAPI=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 Tests dupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile
uname Linux 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 tool maven
Personality dev-support/hbase-personality.sh
git revision branch-2 / 8f17aa0
Default Java Eclipse Adoptium-11.0.17+8
Max. process+thread count 80 (vs. ulimit of 30000)
modules C: hbase-examples U: hbase-examples
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5433/1/console
versions git=2.34.1 maven=3.8.6 spotbugs=4.7.3
Powered by Apache 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
Copy link
Contributor

@NihalJain NihalJain Sep 24, 2023

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
Contributor Author

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
Contributor Author

Choose a reason for hiding this comment

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

Filed HBASE-28110.

@NihalJain
Copy link
Contributor

Overall looks good, +1

@Apache9 Apache9 merged commit 8d91cd2 into apache:branch-2 Sep 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 free to 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