Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-13847

KMSWebApp should close KeyProviderCryptoExtension

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0, 3.0.0-alpha2
    • Component/s: kms
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      KeyProviderCryptoExtension should be closed in KMSWebApp.contextDestroyed so that all KeyProviders are also closed. See related HADOOP-13838.

      1. HADOOP-13847.001.patch
        2 kB
        John Zhuge
      2. HADOOP-13847.002.patch
        2 kB
        John Zhuge

        Activity

        Hide
        jzhuge John Zhuge added a comment -

        Patch 001:

        • KMSWebApp closes KeyProviderCryptoExtension
        • KeyProviderCryptoExtension#close should avoid infinite loop because keyProvider can be itself

        TestKMSWithZK exercises the real close().

        Show
        jzhuge John Zhuge added a comment - Patch 001: KMSWebApp closes KeyProviderCryptoExtension KeyProviderCryptoExtension#close should avoid infinite loop because keyProvider can be itself TestKMSWithZK exercises the real close().
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 15s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        -1 test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
        0 mvndep 0m 7s Maven dependency ordering for branch
        +1 mvninstall 6m 48s trunk passed
        +1 compile 10m 24s trunk passed
        +1 checkstyle 0m 37s trunk passed
        +1 mvnsite 1m 40s trunk passed
        +1 mvneclipse 0m 36s trunk passed
        +1 findbugs 2m 2s trunk passed
        +1 javadoc 1m 6s trunk passed
        0 mvndep 0m 7s Maven dependency ordering for patch
        +1 mvninstall 1m 0s the patch passed
        +1 compile 9m 52s the patch passed
        +1 javac 9m 52s the patch passed
        +1 checkstyle 0m 32s hadoop-common-project: The patch generated 0 new + 14 unchanged - 1 fixed = 14 total (was 15)
        +1 mvnsite 1m 24s the patch passed
        +1 mvneclipse 0m 37s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 2m 28s the patch passed
        +1 javadoc 1m 10s the patch passed
        +1 unit 8m 28s hadoop-common in the patch passed.
        +1 unit 2m 17s hadoop-kms in the patch passed.
        +1 asflicense 0m 34s The patch does not generate ASF License warnings.
        56m 37s



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:a9ad5d6
        JIRA Issue HADOOP-13847
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12841575/HADOOP-13847.001.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux 0e9417479ca9 3.13.0-93-generic #140-Ubuntu SMP Mon Jul 18 21:21:05 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / 51211a7
        Default Java 1.8.0_111
        findbugs v3.0.0
        Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/11188/testReport/
        modules C: hadoop-common-project/hadoop-common hadoop-common-project/hadoop-kms U: hadoop-common-project
        Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/11188/console
        Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 15s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. -1 test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. 0 mvndep 0m 7s Maven dependency ordering for branch +1 mvninstall 6m 48s trunk passed +1 compile 10m 24s trunk passed +1 checkstyle 0m 37s trunk passed +1 mvnsite 1m 40s trunk passed +1 mvneclipse 0m 36s trunk passed +1 findbugs 2m 2s trunk passed +1 javadoc 1m 6s trunk passed 0 mvndep 0m 7s Maven dependency ordering for patch +1 mvninstall 1m 0s the patch passed +1 compile 9m 52s the patch passed +1 javac 9m 52s the patch passed +1 checkstyle 0m 32s hadoop-common-project: The patch generated 0 new + 14 unchanged - 1 fixed = 14 total (was 15) +1 mvnsite 1m 24s the patch passed +1 mvneclipse 0m 37s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 2m 28s the patch passed +1 javadoc 1m 10s the patch passed +1 unit 8m 28s hadoop-common in the patch passed. +1 unit 2m 17s hadoop-kms in the patch passed. +1 asflicense 0m 34s The patch does not generate ASF License warnings. 56m 37s Subsystem Report/Notes Docker Image:yetus/hadoop:a9ad5d6 JIRA Issue HADOOP-13847 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12841575/HADOOP-13847.001.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 0e9417479ca9 3.13.0-93-generic #140-Ubuntu SMP Mon Jul 18 21:21:05 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 51211a7 Default Java 1.8.0_111 findbugs v3.0.0 Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/11188/testReport/ modules C: hadoop-common-project/hadoop-common hadoop-common-project/hadoop-kms U: hadoop-common-project Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/11188/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        yzhangal Yongjun Zhang added a comment -

        Thanks Anthony for reporting the issue and John for the patch.

        The patch looks good to me, except that I'd suggest we change

        LOG.error("Error closing KeyProviderCryptoExtension: " + ioe);

        to

        LOG.error("Error closing KeyProviderCryptoExtension", ioe);

        Thanks.

        Show
        yzhangal Yongjun Zhang added a comment - Thanks Anthony for reporting the issue and John for the patch. The patch looks good to me, except that I'd suggest we change LOG.error("Error closing KeyProviderCryptoExtension: " + ioe); to LOG.error("Error closing KeyProviderCryptoExtension", ioe); Thanks.
        Hide
        jzhuge John Zhuge added a comment -

        Patch 002

        • Show exception stack trace

        Thanks Yongjun Zhang for catching it.

        Show
        jzhuge John Zhuge added a comment - Patch 002 Show exception stack trace Thanks Yongjun Zhang for catching it.
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 16s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        -1 test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
        0 mvndep 0m 24s Maven dependency ordering for branch
        +1 mvninstall 7m 13s trunk passed
        +1 compile 9m 46s trunk passed
        +1 checkstyle 0m 32s trunk passed
        +1 mvnsite 1m 27s trunk passed
        +1 mvneclipse 0m 36s trunk passed
        +1 findbugs 1m 52s trunk passed
        +1 javadoc 1m 6s trunk passed
        0 mvndep 0m 7s Maven dependency ordering for patch
        +1 mvninstall 0m 53s the patch passed
        +1 compile 9m 14s the patch passed
        +1 javac 9m 14s the patch passed
        +1 checkstyle 0m 32s hadoop-common-project: The patch generated 0 new + 14 unchanged - 1 fixed = 14 total (was 15)
        +1 mvnsite 1m 24s the patch passed
        +1 mvneclipse 0m 37s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 2m 6s the patch passed
        +1 javadoc 1m 6s the patch passed
        +1 unit 7m 33s hadoop-common in the patch passed.
        +1 unit 2m 20s hadoop-kms in the patch passed.
        +1 asflicense 0m 33s The patch does not generate ASF License warnings.
        54m 10s



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:a9ad5d6
        JIRA Issue HADOOP-13847
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12841611/HADOOP-13847.002.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux d4c7a8455fff 3.13.0-95-generic #142-Ubuntu SMP Fri Aug 12 17:00:09 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / f885160
        Default Java 1.8.0_111
        findbugs v3.0.0
        Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/11192/testReport/
        modules C: hadoop-common-project/hadoop-common hadoop-common-project/hadoop-kms U: hadoop-common-project
        Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/11192/console
        Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 16s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. -1 test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. 0 mvndep 0m 24s Maven dependency ordering for branch +1 mvninstall 7m 13s trunk passed +1 compile 9m 46s trunk passed +1 checkstyle 0m 32s trunk passed +1 mvnsite 1m 27s trunk passed +1 mvneclipse 0m 36s trunk passed +1 findbugs 1m 52s trunk passed +1 javadoc 1m 6s trunk passed 0 mvndep 0m 7s Maven dependency ordering for patch +1 mvninstall 0m 53s the patch passed +1 compile 9m 14s the patch passed +1 javac 9m 14s the patch passed +1 checkstyle 0m 32s hadoop-common-project: The patch generated 0 new + 14 unchanged - 1 fixed = 14 total (was 15) +1 mvnsite 1m 24s the patch passed +1 mvneclipse 0m 37s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 2m 6s the patch passed +1 javadoc 1m 6s the patch passed +1 unit 7m 33s hadoop-common in the patch passed. +1 unit 2m 20s hadoop-kms in the patch passed. +1 asflicense 0m 33s The patch does not generate ASF License warnings. 54m 10s Subsystem Report/Notes Docker Image:yetus/hadoop:a9ad5d6 JIRA Issue HADOOP-13847 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12841611/HADOOP-13847.002.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux d4c7a8455fff 3.13.0-95-generic #142-Ubuntu SMP Fri Aug 12 17:00:09 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / f885160 Default Java 1.8.0_111 findbugs v3.0.0 Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/11192/testReport/ modules C: hadoop-common-project/hadoop-common hadoop-common-project/hadoop-kms U: hadoop-common-project Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/11192/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        yzhangal Yongjun Zhang added a comment -

        Thanks for the new rev John, +1 on rev2.

        Show
        yzhangal Yongjun Zhang added a comment - Thanks for the new rev John, +1 on rev2.
        Hide
        xiaochen Xiao Chen added a comment -

        +1, committing this.

        Show
        xiaochen Xiao Chen added a comment - +1, committing this.
        Hide
        xiaochen Xiao Chen added a comment -

        Committed to trunk, branch-2 and branch-2.8.
        Thanks Anthony Young-Garner for reporting this issue, John Zhuge for the fix and Yongjun Zhang for the review!

        Show
        xiaochen Xiao Chen added a comment - Committed to trunk, branch-2 and branch-2.8. Thanks Anthony Young-Garner for reporting this issue, John Zhuge for the fix and Yongjun Zhang for the review!
        Hide
        jzhuge John Zhuge added a comment -
        Show
        jzhuge John Zhuge added a comment - Thanks Xiao Chen , Yongjun Zhang , and Anthony Young-Garner .

          People

          • Assignee:
            jzhuge John Zhuge
            Reporter:
            anthony.young-garner@cloudera.com Anthony Young-Garner
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development