You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2020/08/25 15:16:24 UTC

[GitHub] [hadoop] sguggilam opened a new pull request #2245: HADOOP-17159 Ability for forceful relogin in UserGroupInformation class

sguggilam opened a new pull request #2245:
URL: https://github.com/apache/hadoop/pull/2245


   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


[GitHub] [hadoop] liuml07 merged pull request #2245: HADOOP-17159. Make UGI support forceful relogin from keytab ignoring the last login time (branch-2.10)

Posted by GitBox <gi...@apache.org>.
liuml07 merged pull request #2245:
URL: https://github.com/apache/hadoop/pull/2245


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


[GitHub] [hadoop] sguggilam commented on a change in pull request #2245: HADOOP-17159 Ability for forceful relogin in UserGroupInformation class

Posted by GitBox <gi...@apache.org>.
sguggilam commented on a change in pull request #2245:
URL: https://github.com/apache/hadoop/pull/2245#discussion_r478643533



##########
File path: hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/UserGroupInformation.java
##########
@@ -1215,23 +1215,43 @@ private void fixKerberosTicketOrder() {
    * Re-Login a user in from a keytab file. Loads a user identity from a keytab
    * file and logs them in. They become the currently logged-in user. This
    * method assumes that {@link #loginUserFromKeytab(String, String)} had
-   * happened already.
-   * The Subject field of this UserGroupInformation object is updated to have
-   * the new credentials.
+   * happened already. The Subject field of this UserGroupInformation object is
+   * updated to have the new credentials.
+   *
    * @throws IOException
    * @throws KerberosAuthException on a failure
    */
   @InterfaceAudience.Public
   @InterfaceStability.Evolving
   public synchronized void reloginFromKeytab() throws IOException {
+    reloginFromKeytab(false);
+  }
+
+  /**
+   * Force re-Login a user in from a keytab file. Loads a user identity from a
+   * keytab file and logs them in. They become the currently logged-in user.
+   * This method assumes that {@link #loginUserFromKeytab(String, String)} had
+   * happened already. The Subject field of this UserGroupInformation object is
+   * updated to have the new credentials.
+   *
+   * @param ignoreTimeElapsed Force re-login irrespective of the time of last
+   *                          login
+   * @throws IOException
+   * @throws KerberosAuthException on a failure
+   */
+  @InterfaceAudience.Public
+  @InterfaceStability.Evolving
+  public synchronized void reloginFromKeytab(boolean ignoreTimeElapsed)

Review comment:
       @liuml07 Yes it makes sense to keep the code consistent for the callers to avoid such issues with a upgrade




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


[GitHub] [hadoop] hadoop-yetus commented on pull request #2245: HADOOP-17159 Ability for forceful relogin in UserGroupInformation class

Posted by GitBox <gi...@apache.org>.
hadoop-yetus commented on pull request #2245:
URL: https://github.com/apache/hadoop/pull/2245#issuecomment-682215919


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |  11m 25s |  Docker mode activated.  |
   ||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  No case conflicting files found.  |
   | +1 :green_heart: |  @author  |   0m  0s |  The patch does not contain any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  The patch appears to include 1 new or modified test files.  |
   ||| _ branch-2.10 Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  16m 14s |  branch-2.10 passed  |
   | +1 :green_heart: |  compile  |  12m 56s |  branch-2.10 passed  |
   | +1 :green_heart: |  checkstyle  |   0m 45s |  branch-2.10 passed  |
   | +1 :green_heart: |  mvnsite  |   1m 30s |  branch-2.10 passed  |
   | +1 :green_heart: |  javadoc  |   1m 18s |  branch-2.10 passed  |
   | +0 :ok: |  spotbugs  |   2m 30s |  Used deprecated FindBugs config; considering switching to SpotBugs.  |
   | +1 :green_heart: |  findbugs  |   2m 26s |  branch-2.10 passed  |
   ||| _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   0m 54s |  the patch passed  |
   | +1 :green_heart: |  compile  |  12m 14s |  the patch passed  |
   | +1 :green_heart: |  javac  |  12m 14s |  the patch passed  |
   | +1 :green_heart: |  checkstyle  |   0m 46s |  the patch passed  |
   | +1 :green_heart: |  mvnsite  |   1m 25s |  the patch passed  |
   | +1 :green_heart: |  whitespace  |   0m  0s |  The patch has no whitespace issues.  |
   | +1 :green_heart: |  javadoc  |   1m 13s |  the patch passed  |
   | +1 :green_heart: |  findbugs  |   2m 34s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |   9m 34s |  hadoop-common in the patch passed.  |
   | +1 :green_heart: |  asflicense  |   0m 53s |  The patch does not generate ASF License warnings.  |
   |  |   |  79m 52s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.40 ServerAPI=1.40 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-2245/3/artifact/out/Dockerfile |
   | GITHUB PR | https://github.com/apache/hadoop/pull/2245 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle |
   | uname | Linux ee37392e8ce7 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/bin/hadoop.sh |
   | git revision | branch-2.10 / a9f82a1 |
   | Default Java | Oracle Corporation-1.7.0_95-b00 |
   |  Test Results | https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-2245/3/testReport/ |
   | Max. process+thread count | 1330 (vs. ulimit of 5500) |
   | modules | C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common |
   | Console output | https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-2245/3/console |
   | versions | git=2.7.4 maven=3.3.9 findbugs=3.0.1 |
   | Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


[GitHub] [hadoop] liuml07 commented on a change in pull request #2245: HADOOP-17159 Ability for forceful relogin in UserGroupInformation class

Posted by GitBox <gi...@apache.org>.
liuml07 commented on a change in pull request #2245:
URL: https://github.com/apache/hadoop/pull/2245#discussion_r478602120



##########
File path: hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/UserGroupInformation.java
##########
@@ -1215,23 +1215,43 @@ private void fixKerberosTicketOrder() {
    * Re-Login a user in from a keytab file. Loads a user identity from a keytab
    * file and logs them in. They become the currently logged-in user. This
    * method assumes that {@link #loginUserFromKeytab(String, String)} had
-   * happened already.
-   * The Subject field of this UserGroupInformation object is updated to have
-   * the new credentials.
+   * happened already. The Subject field of this UserGroupInformation object is
+   * updated to have the new credentials.
+   *
    * @throws IOException
    * @throws KerberosAuthException on a failure
    */
   @InterfaceAudience.Public
   @InterfaceStability.Evolving
   public synchronized void reloginFromKeytab() throws IOException {
+    reloginFromKeytab(false);
+  }
+
+  /**
+   * Force re-Login a user in from a keytab file. Loads a user identity from a
+   * keytab file and logs them in. They become the currently logged-in user.
+   * This method assumes that {@link #loginUserFromKeytab(String, String)} had
+   * happened already. The Subject field of this UserGroupInformation object is
+   * updated to have the new credentials.
+   *
+   * @param ignoreTimeElapsed Force re-login irrespective of the time of last
+   *                          login
+   * @throws IOException
+   * @throws KerberosAuthException on a failure
+   */
+  @InterfaceAudience.Public
+  @InterfaceStability.Evolving
+  public synchronized void reloginFromKeytab(boolean ignoreTimeElapsed)

Review comment:
       I'm thinking of the same problem of the same method signature when potential Hadoop 2 code calling `reloginFromKeytab(false)` upgrades to Hadoop 3. Because of the same method name and a bool parameter, users most likely will not notice the parameter value is for different meanings: in Hadoop 2 here, the bool parameter is for `ignoreTimeElapsed` where in Hadoop 3 it is actually for `checkTGT`.
   
   So is it better to:
   1. Make this new API `public synchronized void reloginFromKeytab(boolean ignoreTimeElapsed)` private
   2. AND we also add the new API as in Hadoop 3: `public void forceReloginFromKeytab()`.
   
   That way, the application code which forces login will have the same code between Hadoop 2 and 3. And the other new API `reloginFromKeytab(boolean)` is private in UGI both in Hadoop 2 and 3.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


[GitHub] [hadoop] hadoop-yetus commented on pull request #2245: HADOOP-17159 Ability for forceful relogin in UserGroupInformation class

Posted by GitBox <gi...@apache.org>.
hadoop-yetus commented on pull request #2245:
URL: https://github.com/apache/hadoop/pull/2245#issuecomment-680320150


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |  12m 20s |  Docker mode activated.  |
   ||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  No case conflicting files found.  |
   | +1 :green_heart: |  @author  |   0m  0s |  The patch does not contain any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  The patch appears to include 1 new or modified test files.  |
   ||| _ branch-2.10 Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  17m  5s |  branch-2.10 passed  |
   | +1 :green_heart: |  compile  |  13m 28s |  branch-2.10 passed  |
   | +1 :green_heart: |  checkstyle  |   0m 42s |  branch-2.10 passed  |
   | +1 :green_heart: |  mvnsite  |   1m 31s |  branch-2.10 passed  |
   | +1 :green_heart: |  javadoc  |   1m 16s |  branch-2.10 passed  |
   | +0 :ok: |  spotbugs  |   2m 32s |  Used deprecated FindBugs config; considering switching to SpotBugs.  |
   | +1 :green_heart: |  findbugs  |   2m 28s |  branch-2.10 passed  |
   ||| _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   0m 53s |  the patch passed  |
   | +1 :green_heart: |  compile  |  12m 44s |  the patch passed  |
   | +1 :green_heart: |  javac  |  12m 44s |  the patch passed  |
   | +1 :green_heart: |  checkstyle  |   0m 39s |  the patch passed  |
   | +1 :green_heart: |  mvnsite  |   1m 28s |  the patch passed  |
   | +1 :green_heart: |  whitespace  |   0m  0s |  The patch has no whitespace issues.  |
   | +1 :green_heart: |  javadoc  |   1m  8s |  the patch passed  |
   | +1 :green_heart: |  findbugs  |   2m 39s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |  10m 10s |  hadoop-common in the patch passed.  |
   | +1 :green_heart: |  asflicense  |   0m 50s |  The patch does not generate ASF License warnings.  |
   |  |   |  82m 53s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.40 ServerAPI=1.40 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-2245/2/artifact/out/Dockerfile |
   | GITHUB PR | https://github.com/apache/hadoop/pull/2245 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle |
   | uname | Linux ce8014146a73 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/bin/hadoop.sh |
   | git revision | branch-2.10 / a9f82a1 |
   | Default Java | Oracle Corporation-1.7.0_95-b00 |
   |  Test Results | https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-2245/2/testReport/ |
   | Max. process+thread count | 1329 (vs. ulimit of 5500) |
   | modules | C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common |
   | Console output | https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-2245/2/console |
   | versions | git=2.7.4 maven=3.3.9 findbugs=3.0.1 |
   | Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


[GitHub] [hadoop] hadoop-yetus commented on pull request #2245: HADOOP-17159 Ability for forceful relogin in UserGroupInformation class

Posted by GitBox <gi...@apache.org>.
hadoop-yetus commented on pull request #2245:
URL: https://github.com/apache/hadoop/pull/2245#issuecomment-680199189


   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |  15m 50s |  Docker mode activated.  |
   ||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  No case conflicting files found.  |
   | +1 :green_heart: |  @author  |   0m  0s |  The patch does not contain any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  The patch appears to include 1 new or modified test files.  |
   ||| _ branch-2.10 Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  16m 41s |  branch-2.10 passed  |
   | +1 :green_heart: |  compile  |  13m 36s |  branch-2.10 passed  |
   | +1 :green_heart: |  checkstyle  |   0m 41s |  branch-2.10 passed  |
   | +1 :green_heart: |  mvnsite  |   1m 26s |  branch-2.10 passed  |
   | +1 :green_heart: |  javadoc  |   1m 13s |  branch-2.10 passed  |
   | +0 :ok: |  spotbugs  |   2m 34s |  Used deprecated FindBugs config; considering switching to SpotBugs.  |
   | +1 :green_heart: |  findbugs  |   2m 31s |  branch-2.10 passed  |
   ||| _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   0m 56s |  the patch passed  |
   | +1 :green_heart: |  compile  |  12m 58s |  the patch passed  |
   | +1 :green_heart: |  javac  |  12m 58s |  the patch passed  |
   | +1 :green_heart: |  checkstyle  |   0m 39s |  the patch passed  |
   | +1 :green_heart: |  mvnsite  |   1m 23s |  the patch passed  |
   | -1 :x: |  whitespace  |   0m  0s |  The patch has 2 line(s) that end in whitespace. Use git apply --whitespace=fix <<patch_file>>. Refer https://git-scm.com/docs/git-apply  |
   | +1 :green_heart: |  javadoc  |   1m 10s |  the patch passed  |
   | +1 :green_heart: |  findbugs  |   2m 42s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |  11m 11s |  hadoop-common in the patch passed.  |
   | +1 :green_heart: |  asflicense  |   0m 47s |  The patch does not generate ASF License warnings.  |
   |  |   |  87m 29s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.40 ServerAPI=1.40 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-2245/1/artifact/out/Dockerfile |
   | GITHUB PR | https://github.com/apache/hadoop/pull/2245 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle |
   | uname | Linux 4d4fa694429e 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/bin/hadoop.sh |
   | git revision | branch-2.10 / a9f82a1 |
   | Default Java | Oracle Corporation-1.7.0_95-b00 |
   | whitespace | https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-2245/1/artifact/out/whitespace-eol.txt |
   |  Test Results | https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-2245/1/testReport/ |
   | Max. process+thread count | 1305 (vs. ulimit of 5500) |
   | modules | C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common |
   | Console output | https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-2245/1/console |
   | versions | git=2.7.4 maven=3.3.9 findbugs=3.0.1 |
   | Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


[GitHub] [hadoop] sguggilam commented on pull request #2245: HADOOP-17159 Ability for forceful relogin in UserGroupInformation class

Posted by GitBox <gi...@apache.org>.
sguggilam commented on pull request #2245:
URL: https://github.com/apache/hadoop/pull/2245#issuecomment-680320509


   @liuml07 Please review the change for branch-2.10


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


[GitHub] [hadoop] liuml07 commented on pull request #2245: HADOOP-17159 Ability for forceful relogin in UserGroupInformation class

Posted by GitBox <gi...@apache.org>.
liuml07 commented on pull request #2245:
URL: https://github.com/apache/hadoop/pull/2245#issuecomment-681629576


   @sguggilam Could you update this PR for `branch-2`? Thank you!
   
   p.s. I have updated this PR's description to include relevant information, and linked this PR to the JIRA.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org