Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-10143

DataNode fails to start because of lowercase conversion of data dir path in data_dir_mount_file.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.7.0
    • 2.1.0
    • ambari-agent
    • None
    • Ubuntu 12.04 x64

    Description

      The code that handles creating the data dir and reading data_dir_mount_file explicitly converts the data dir paths to lower case.

      This behavior is undesired because when the value of dfs.datanode.data.dir contains one or more uppercase characters, it won't be able to match any item in the data_dir_mount_file since Linux file paths are case sensitive.

      The issue may be reproduced by creating a single node cluster and setting the value of the "DataNode directories" in "CLUSTER INSTALL WIZARD > Customize Services > HDFS > DataNode" to: /UPPER_CASE_DIR/data

      Continue to the next step and the "DataNode start" task will fail with the following exception (from /var/log/hadoop/hdfs/hadoop-hdfs-datanode-*.log):

      datanode.DataNode (DataNode.java:checkStorageLocations(2284)) - Invalid dfs.datanode.data.dir /UPPER_CASE_DIR/data :
      java.io.FileNotFoundException: File file:/UPPER_CASE_DIR/data does not exist
      

      The checkStorageLocations function won't be able to find the directory because the directory name was created with all lower case characters (from /var/lib/ambari-agent/data/output-9.txt):

      Forcefully creating directory: /upper_case_dir/data
      

      The data_dir_mount_file and hdfs-site.xml also shows the case mismatch of the data dir path:

      $ grep -rni UPPER_CASE_DIR /etc/hadoop/
      /etc/hadoop/conf.empty/hdfs-site.xml:46:      <value>/UPPER_CASE_DIR/data</value>
      /etc/hadoop/conf.empty/dfs_data_dir_mount.hist:7:/upper_case_dir/data,/
      /etc/hadoop/conf/hdfs-site.xml:46:      <value>/UPPER_CASE_DIR/data</value>
      /etc/hadoop/conf/dfs_data_dir_mount.hist:7:/upper_case_dir/data,/
      

      Attachments

        1. AMBARI-10143.patch
          2 kB
          Paulo Tioseco

        Issue Links

          Activity

            People

              afernandez Alejandro Fernandez
              pau Paulo Tioseco
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: