You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Dave Beckett (JIRA)" <ji...@apache.org> on 2015/06/16 17:01:00 UTC

[jira] [Created] (AMBARI-11951) Ambari DataNode should not create missing dfs.data.dir paths on root disk

Dave Beckett created AMBARI-11951:
-------------------------------------

             Summary: Ambari DataNode should not create missing dfs.data.dir paths on root disk
                 Key: AMBARI-11951
                 URL: https://issues.apache.org/jira/browse/AMBARI-11951
             Project: Ambari
          Issue Type: Bug
          Components: ambari-agent
    Affects Versions: 2.0.1
            Reporter: Dave Beckett


Situation: we have nodes with a variable number of attached disks, e.g. node1 may have 29 and node2 may have 40.

These were mounted at /disk1-disk29 and /disk1 to /disk40 respectively and the corresponding auto-generated ambari HDFS configuration listed all 40 mountpoints for all nodes.  That's fine and good, HDFS will ignore dirs that are not present.

Over time when ambari-agent was restarted, it started creating the missing directories /disk30-/disk40 on the nodes with no such disks and started filling up the root disk.

After much investigation, it seems this was caused by the fix to AMBARI-7506 which was added in 1.7.0 in handle_dfs_data_dir().  When the HDFS is started by ambari-agent, it reads the dfs mount history file, finds the dirs are missing and creates them.

The only workaround we have is to pretend that the dirs /disk29-/disk40 were previously mounted by overwriting the dfs mount history file regularly.

I'm not sure of the best fix but I'm guessing it could be to preserve the last mounted or unmounted state rather than destroy the dfs mount history every restart.  That way a dir that never existed or a dir that was unmounted, is never restored automatically.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)