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

Listing encryption zones still fails when deleted EZ is not a direct child of snapshottable directory

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.0.0-alpha4
    • 2.9.0, 3.0.0-beta1, 2.8.3
    • encryption, hdfs
    • None
    • Reviewed

    Description

      The fix proposed on HDFS-11197 didn't cover the scenario where the EZ deleted but still under a snapshot is not a direct child of the snapshottable directory.

      Here the code snippet proposed on HDFS-11197 that would avoid the error reported by hdfs crypto -listZones when a deleted EZ is still under a given snapshot:

            INode lastINode = null;
            if (inode.getParent() != null || inode.isRoot()) {
              INodesInPath iip = dir.getINodesInPath(pathName, DirOp.READ_LINK);
              lastINode = iip.getLastINode();
            }
            if (lastINode == null || lastINode.getId() != ezi.getINodeId()) {
              continue;
            }
      

      It will ignore EZs when it's a direct child of a snapshot, because its parent inode will be null, and it isn't the root inode. However, if the EZ is not directly under snapshottable directory, its parent will not be null, and it will pass this check, so it will fail further due absolute path required validation error.

      I would like to work on a fix that would also cover this scenario.

      Attachments

        1. HDFS-12336-branch-2.001.patch
          10 kB
          Wellington Chevreuil
        2. HDFS-12336.004.patch
          10 kB
          Wellington Chevreuil
        3. HDFS-12336.003.patch
          10 kB
          Wellington Chevreuil
        4. HDFS-12336.002.patch
          10 kB
          Wellington Chevreuil
        5. HDFS-12336.001.patch
          6 kB
          Wellington Chevreuil

        Issue Links

          Activity

            People

              wchevreuil Wellington Chevreuil
              wchevreuil Wellington Chevreuil
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: