You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by vb...@apache.org on 2014/09/16 15:38:19 UTC
git commit: AMBARI-7331. HDFS check fails with mkdir: /tmp: File
exists(vbrodetskyi)
Repository: ambari
Updated Branches:
refs/heads/trunk bd04a28e1 -> f8aa99b34
AMBARI-7331. HDFS check fails with mkdir: /tmp: File exists(vbrodetskyi)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f8aa99b3
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f8aa99b3
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f8aa99b3
Branch: refs/heads/trunk
Commit: f8aa99b34ae66fd3f06705b6b92edffcd28dfc9c
Parents: bd04a28
Author: Vitaly Brodetskyi <vb...@hortonworks.com>
Authored: Tue Sep 16 16:38:06 2014 +0300
Committer: Vitaly Brodetskyi <vb...@hortonworks.com>
Committed: Tue Sep 16 16:38:06 2014 +0300
----------------------------------------------------------------------
.../HDP/1.3.2/services/HDFS/package/scripts/service_check.py | 2 +-
.../HDP/2.0.6/services/HDFS/package/scripts/service_check.py | 2 +-
.../src/test/python/stacks/1.3.2/HDFS/test_service_check.py | 2 +-
.../src/test/python/stacks/2.0.6/HDFS/test_service_check.py | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/f8aa99b3/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HDFS/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HDFS/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HDFS/package/scripts/service_check.py
index 58da7ec..e04d68c 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HDFS/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HDFS/package/scripts/service_check.py
@@ -32,7 +32,7 @@ class HdfsServiceCheck(Script):
safemode_command = "dfsadmin -safemode get | grep OFF"
create_dir_cmd = format("fs -mkdir {dir} ; hadoop fs -chmod 777 {dir}")
- test_dir_exists = format("hadoop fs -test -e {dir}")
+ test_dir_exists = format("su - {smoke_user} -c 'hadoop fs -test -e {dir}'")
cleanup_cmd = format("fs -rm {tmp_file}")
#cleanup put below to handle retries; if retrying there wil be a stale file
#that needs cleanup; exit code is fn of second command
http://git-wip-us.apache.org/repos/asf/ambari/blob/f8aa99b3/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/service_check.py
index 18f58bd..ef9a361 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/service_check.py
@@ -33,7 +33,7 @@ class HdfsServiceCheck(Script):
create_dir_cmd = format("fs -mkdir {dir}")
chmod_command = format("fs -chmod 777 {dir}")
- test_dir_exists = format("hadoop --config {hadoop_conf_dir} fs -test -e {dir}")
+ test_dir_exists = format("su - {smoke_user} -c 'hadoop --config {hadoop_conf_dir} fs -test -e {dir}'")
cleanup_cmd = format("fs -rm {tmp_file}")
#cleanup put below to handle retries; if retrying there wil be a stale file
#that needs cleanup; exit code is fn of second command
http://git-wip-us.apache.org/repos/asf/ambari/blob/f8aa99b3/ambari-server/src/test/python/stacks/1.3.2/HDFS/test_service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/1.3.2/HDFS/test_service_check.py b/ambari-server/src/test/python/stacks/1.3.2/HDFS/test_service_check.py
index beed46a..629406f 100644
--- a/ambari-server/src/test/python/stacks/1.3.2/HDFS/test_service_check.py
+++ b/ambari-server/src/test/python/stacks/1.3.2/HDFS/test_service_check.py
@@ -57,7 +57,7 @@ class TestServiceCheck(RMFTestCase):
conf_dir = '/etc/hadoop/conf',
bin_dir = '/usr/bin',
logoutput = True,
- not_if = 'hadoop --config /etc/hadoop/conf fs -test -e /tmp',
+ not_if = 'su - ambari-qa -c \'hadoop --config /etc/hadoop/conf fs -test -e /tmp\'',
try_sleep = 3,
tries = 5,
user = 'ambari-qa',
http://git-wip-us.apache.org/repos/asf/ambari/blob/f8aa99b3/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_service_check.py b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_service_check.py
index 57abab3..01f96c7 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_service_check.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_service_check.py
@@ -56,7 +56,7 @@ class TestServiceCheck(RMFTestCase):
self.assertResourceCalled('ExecuteHadoop', 'fs -mkdir /tmp',
conf_dir = '/etc/hadoop/conf',
logoutput = True,
- not_if = 'hadoop --config /etc/hadoop/conf fs -test -e /tmp',
+ not_if = 'su - ambari-qa -c \'hadoop --config /etc/hadoop/conf fs -test -e /tmp\'',
try_sleep = 3,
tries = 5,
bin_dir = '/usr/bin',