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

Audit logging of unsuccessful namesystem calls should not be done while holding fslock.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 2.7.0
    • None
    • None
    • None

    Description

      Currently we are audit logging the unsuccessful namesystem calls while holding fslock.
      Following is just one example.

      FSNamesystem.java
      HdfsFileStatus getFileInfo(final String src, boolean resolveLink)
          throws IOException {
          final String operationName = "getfileinfo";
          checkOperation(OperationCategory.READ);
          HdfsFileStatus stat = null;
          readLock();
          try {
            checkOperation(OperationCategory.READ);
            stat = FSDirStatAndListingOp.getFileInfo(dir, src, resolveLink);
          } catch (AccessControlException e) {
            logAuditEvent(false, operationName, src); //<---- audit logging while holding fs read lock.
            throw e;
          } finally {
            readUnlock(operationName);
          }
          logAuditEvent(true, operationName, src);
          return stat;
        }
      

      We should avoid doing this.

      Attachments

        Activity

          People

            shahrs87 Rushabh Shah
            shahrs87 Rushabh Shah
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: