----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/57060/#review166885 -----------------------------------------------------------
ambari-agent/src/main/python/ambari_agent/HostCleanup.py (line 687) <https://reviews.apache.org/r/57060/#comment238965> The script should fail instead of continuing on by skipping the majority of the function and still report "Clean-up completed". hostcheck result custom action file is required as it's corresponding to the check host operation submitted by the Ambari web UI during Host registration step. Current behavior is a hard fail, but I think it's still the correct behavior nontheless. - Di Li On Feb. 25, 2017, 3 a.m., Amruta Borkar wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/57060/ > ----------------------------------------------------------- > > (Updated Feb. 25, 2017, 3 a.m.) > > > Review request for Ambari, Di Li and Jonathan Hurley. > > > Bugs: AMBARI-20192 > https://issues.apache.org/jira/browse/AMBARI-20192 > > > Repository: ambari > > > Description > ------- > > HostCleanup script throws following exception and exits when > hostcheck_custom_actions.result not present > [root@tsar1 ~]# /usr/lib/python2.6/site-packages/ambari_agent/HostCleanup.py > You have elected to remove all users as well. If it is not intended then use > option --skip "users". Do you want to continue [y/n] (y)y > Host Check results not found. There is no > /var/lib/ambari-agent/data/hostcheck_custom_actions.result. Do you want to > run host checks [y/n] (y)n > Traceback (most recent call last): > File "/usr/lib/python2.6/site-packages/ambari_agent/HostCleanup.py", line > 705, in <module> > main() > File "/usr/lib/python2.6/site-packages/ambari_agent/HostCleanup.py", line > 689, in main > with open(hostcheckfileca, "rb") as f2: > IOError: [Errno 2] No such file or directory: > '/var/lib/ambari-agent/data/hostcheck_custom_actions.result' > > > Diffs > ----- > > ambari-agent/src/main/python/ambari_agent/HostCleanup.py 7ee3b1c > > Diff: https://reviews.apache.org/r/57060/diff/ > > > Testing > ------- > > Manually tested. Cleanup completed successfully when no > hostcheck_custom_actions.result file was present > > > Thanks, > > Amruta Borkar > >
