Updated Branches:
  refs/heads/trunk 7a8c397df -> f26e64c9e

AMBARI-3112: Security wizard: disabling security does not return to initial 
condition after enabling security fails. (jaimin)


Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/f26e64c9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/f26e64c9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/f26e64c9

Branch: refs/heads/trunk
Commit: f26e64c9ed494a107ce3ce15bb82ce26d52a0d3f
Parents: 7a8c397
Author: Jaimin Jetly <[email protected]>
Authored: Thu Sep 5 10:47:12 2013 -0700
Committer: Jaimin Jetly <[email protected]>
Committed: Thu Sep 5 11:20:51 2013 -0700

----------------------------------------------------------------------
 .../main/puppet/modules/hdp-hadoop/manifests/service.pp | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f26e64c9/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/service.pp
----------------------------------------------------------------------
diff --git 
a/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/service.pp 
b/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/service.pp
index 0af21a9..98def76 100644
--- a/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/service.pp
+++ b/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/service.pp
@@ -88,7 +88,14 @@ define hdp-hadoop::service(
       force => true
     }
   }
-  if ($daemon_cmd != undef) {  
+  if ($daemon_cmd != undef) {
+    if ($name == 'datanode' and $ensure == 'running') {
+      exec { 'delete_pid_before_datanode_start':
+        command  => "rm -f ${pid_file}",
+        unless       => $service_is_up,
+        path => $hdp::params::exec_path
+      }
+    }
     hdp::exec { $daemon_cmd:
       command      => $daemon_cmd,
       unless       => $service_is_up,
@@ -107,6 +114,9 @@ define hdp-hadoop::service(
      if ($create_log_dir == true) {
       Anchor["hdp-hadoop::service::${name}::begin"] -> 
Hdp::Directory_recursive_create[$log_dir] -> Hdp::Exec[$daemon_cmd] 
     }
+    if ($name == 'datanode' and $ensure == 'running') {
+      Anchor["hdp-hadoop::service::${name}::begin"] -> 
Exec['delete_pid_before_datanode_start'] -> Hdp::Exec[$daemon_cmd]
+    }
   }
   if ($ensure == 'running') {
     #TODO: look at Puppet resource retry and retry_sleep

Reply via email to