瀏覽代碼

AMBARI-2143. HBASE fails to start on master. (smohanty)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/trunk@1483456 13f79535-47bb-0310-9956-ffa450edef68
Sumit Mohanty 12 年之前
父節點
當前提交
2caa1afec1

+ 2 - 0
CHANGES.txt

@@ -856,6 +856,8 @@ Trunk (unreleased changes):
 
  BUG FIXES
 
+ AMBARI-2143. HBASE fails to start on master. (smohanty
+
  AMBARI-2141. When hbase user is changed hbase does not start properly
  after upgrade. (smohanty)
 

+ 4 - 4
ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/hdfs/directory.pp

@@ -28,7 +28,7 @@ define hdp-hadoop::hdfs::directory(
   $recursive_chmod = false
 ) 
 {
-  $unless_cmd = "hadoop fs -ls ${name} >/dev/null 2>&1"
+  $dir_exists = "hadoop fs -ls ${name} >/dev/null 2>&1"
   $tries = 30
   $try_sleep = 10
  
@@ -42,7 +42,7 @@ define hdp-hadoop::hdfs::directory(
     }
     hdp-hadoop::exec-hadoop { $mkdir_cmd:
       command   => $mkdir_cmd,
-      unless    => $unless_cmd,
+      unless    => $dir_exists,
       try_sleep => $try_sleep,
       tries     => $tries
     }
@@ -65,7 +65,7 @@ define hdp-hadoop::hdfs::directory(
       }
       hdp-hadoop::exec-hadoop {$chown_cmd :
         command   => $chown_cmd,
-        unless    => $unless_cmd,
+        onlyif    => $dir_exists,
         try_sleep => $try_sleep,
         tries     => $tries
       }
@@ -81,7 +81,7 @@ define hdp-hadoop::hdfs::directory(
       }
       hdp-hadoop::exec-hadoop {$chmod_cmd :
         command   => $chmod_cmd,
-        unless    => $unless_cmd,
+        onlyif    => $dir_exists,
         try_sleep => $try_sleep,
         tries     => $tries
       }

+ 4 - 2
ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/init.pp

@@ -340,7 +340,8 @@ define hdp-hadoop::exec-hadoop(
   $timeout = 900,
   $try_sleep = undef,
   $user = undef,
-  $logoutput = undef
+  $logoutput = undef,
+  $onlyif = undef
 )
 {
   include hdp-hadoop::params
@@ -382,6 +383,7 @@ define hdp-hadoop::exec-hadoop(
     tries       => $tries,
     timeout     => $timeout,
     try_sleep   => $try_sleep,
-    logoutput   => $logoutput
+    logoutput   => $logoutput,
+    onlyif      => $onlyif
   }
 }