----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/53602/#review155434 -----------------------------------------------------------
Fix it, then Ship it! ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py (line 394) <https://reviews.apache.org/r/53602/#comment225371> Clarify this a bit: The NameNode will not be formatted because the directory {name_dir} is missing and cannot be checked for content. {out} ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py (lines 397 - 406) <https://reviews.apache.org/r/53602/#comment225370> Let's just change this to return True and not rely on the break - it reads a bit cleaner. ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py (line 403) <https://reviews.apache.org/r/53602/#comment225369> This log statement is weird - it's not really an error - it's a non-empty directory. Let's just make this a bit cleaner: Logger.info("The NameNode will not be formatted since {name_dir} exists and contains content") - Jonathan Hurley On Nov. 9, 2016, 7:08 a.m., Andrew Onischuk wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/53602/ > ----------------------------------------------------------- > > (Updated Nov. 9, 2016, 7:08 a.m.) > > > Review request for Ambari, Dmitro Lisnichenko, Jonathan Hurley, Sumit > Mohanty, and Sid Wagle. > > > Bugs: AMBARI-18832 > https://issues.apache.org/jira/browse/AMBARI-18832 > > > Repository: ambari > > > Description > ------- > > A single missing directory named `namenode-formatted` can result in Ambari > reformatting the NameNode and causing total data loss in a cluster. > > > Diffs > ----- > > > ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py > b7735f4 > ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py 4cfa2b2 > > Diff: https://reviews.apache.org/r/53602/diff/ > > > Testing > ------- > > mvn clean test > > > Thanks, > > Andrew Onischuk > >
