You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ja...@apache.org on 2013/06/22 02:28:11 UTC
svn commit: r1495645 -
/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-oozie/manifests/service.pp
Author: jaimin
Date: Sat Jun 22 00:28:11 2013
New Revision: 1495645
URL: http://svn.apache.org/r1495645
Log:
AMBARI-2467. Issuing stop task on a component which is already stopped shouldn't fail the task. (jaimin)
Modified:
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-oozie/manifests/service.pp
Modified: incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-oozie/manifests/service.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-oozie/manifests/service.pp?rev=1495645&r1=1495644&r2=1495645&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-oozie/manifests/service.pp (original)
+++ incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-oozie/manifests/service.pp Sat Jun 22 00:28:11 2013
@@ -108,7 +108,7 @@ class hdp-oozie::service(
$no_op_test = "ls ${pid_file} >/dev/null 2>&1 && ps `cat ${pid_file}` >/dev/null 2>&1"
} elsif ($ensure == 'stopped') {
$stop_cmd = "su - ${user} -c 'cd ${oozie_tmp} && /usr/lib/oozie/bin/oozie-stop.sh'"
- $no_op_test = undef
+ $no_op_test = "ls ${pid_file} >/dev/null 2>&1 && ps `cat ${pid_file}` >/dev/null 2>&1"
} else {
$daemon_cmd = undef
}
@@ -143,7 +143,7 @@ class hdp-oozie::service(
} elsif ($ensure == 'stopped') {
hdp::exec { "exec $stop_cmd":
command => $stop_cmd,
- unless => $no_op_test,
+ $onlyif => $no_op_test,
initial_wait => $initial_wait
}
}