diff --git a/sahara/plugins/vanilla/hadoop2/run_scripts.py b/sahara/plugins/vanilla/hadoop2/run_scripts.py index f2194264..04a1e128 100644 --- a/sahara/plugins/vanilla/hadoop2/run_scripts.py +++ b/sahara/plugins/vanilla/hadoop2/run_scripts.py @@ -171,4 +171,4 @@ def _check_datanodes_count(remote, count): 'awk \'{print $3}\'') LOG.debug("Datanode count='%s'" % stdout.rstrip()) - return exit_code == 0 and int(stdout) == count + return exit_code == 0 and stdout and int(stdout) == count diff --git a/sahara/plugins/vanilla/v1_2_1/run_scripts.py b/sahara/plugins/vanilla/v1_2_1/run_scripts.py index 269c5a7a..70981235 100644 --- a/sahara/plugins/vanilla/v1_2_1/run_scripts.py +++ b/sahara/plugins/vanilla/v1_2_1/run_scripts.py @@ -78,7 +78,7 @@ def check_datanodes_count(remote, count): 'awk \'{print \\$3}\'" hadoop') LOG.debug("Datanode count='%s'" % stdout.rstrip()) - return exit_code == 0 and int(stdout) == count + return exit_code == 0 and stdout and int(stdout) == count def mysql_start(remote, mysql_instance):