Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-13292

Crypto command should give proper exception when trying to set key on existing EZ directory

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.8.3
    • 3.2.0
    • hdfs, kms
    • None

    Description

      Scenario:

      1. Create a Dir
      2. Create EZ for the above dir with Key1
      3. Again you can try to create ZONE for same directory with Diff Key i.e Key2
      hadoopclient> hadoop key list
      Listing keys for KeyProvider: org.apache.hadoop.crypto.key.kms.LoadBalancingKMSClientProvider@152aa092
      key2
      key1
      hadoopclient> hdfs dfs -mkdir /kms
      hadoopclient> hdfs dfs -put bigdata_env /kms/file1
      hadoopclient> hdfs crypto -createZone -keyName key1 -path /kms
      RemoteException: Attempt to create an encryption zone for a non-empty directory.
      hadoopclient> hdfs dfs -rmr /kms/file1
      rmr: DEPRECATED: Please use '-rm -r' instead.
      Deleted /kms/file1
      hadoopclient> hdfs crypto -createZone -keyName key1 -path /kms
      Added encryption zone /kms
      hadoopclient> hdfs crypto -createZone -keyName key2 -path /kms
      RemoteException: Attempt to create an encryption zone for a non-empty directory.
      hadoopclient>
       

      Actual Output:
      ===========
      Exception should be Like Dir already having the ZONE will not allow to create new ZONE on this Dir

      Expected Output:
      =============
      RemoteException:Attempt to create an encryption zone for non-empty directory

      Attachments

        1. HDFS-13292.001.patch
          3 kB
          Ranith Sardar
        2. HDFS-13292.002.patch
          3 kB
          Ranith Sardar
        3. Screenshot from 2018-04-06 11-48-56.png
          53 kB
          Ranith Sardar

        Activity

          People

            RANith Ranith Sardar
            Harsha1206 Harshakiran Reddy
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: