You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sm...@apache.org on 2013/05/21 03:14:51 UTC

svn commit: r1484633 - in /incubator/ambari/trunk: CHANGES.txt ambari-agent/src/main/puppet/modules/hdp-ganglia/manifests/monitor.pp ambari-agent/src/main/puppet/modules/hdp-ganglia/manifests/server.pp

Author: smohanty
Date: Tue May 21 01:14:51 2013
New Revision: 1484633

URL: http://svn.apache.org/r1484633
Log:
AMBARI-2057. Gmond left in init after install, part-II. (smohanty)

Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-ganglia/manifests/monitor.pp
    incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-ganglia/manifests/server.pp

Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1484633&r1=1484632&r2=1484633&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Tue May 21 01:14:51 2013
@@ -2064,6 +2064,8 @@ AMBARI-1.2.0 branch:
 
  BUG FIXES
 
+ AMBARI-2057. Gmond left in init after install, part-II. (smohanty)
+
  AMBARI-1613.  ConfigurationResourceProvider doesn't properly handle OR
                predicate. (jspeidel) 
 

Modified: incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-ganglia/manifests/monitor.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-ganglia/manifests/monitor.pp?rev=1484633&r1=1484632&r2=1484633&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-ganglia/manifests/monitor.pp (original)
+++ incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-ganglia/manifests/monitor.pp Tue May 21 01:14:51 2013
@@ -117,6 +117,7 @@ class hdp-ganglia::monitor::gmond(
   )
 {
   if ($ensure == 'running') {
+    class { 'hdp-ganglia::server::delete_default_gmond_process': }
     $command = "service hdp-gmond start >> /tmp/gmond.log  2>&1 ; /bin/ps auwx | /bin/grep [g]mond  >> /tmp/gmond.log  2>&1"
    } elsif  ($ensure == 'stopped') {
     $command = "service hdp-gmond stop >> /tmp/gmond.log  2>&1 ; /bin/ps auwx | /bin/grep [g]mond  >> /tmp/gmond.log  2>&1"
@@ -151,3 +152,11 @@ class hdp-ganglia::monitor::ownership() 
     group => $hdp::params::user_group
   }
 }
+
+class hdp-ganglia::server::delete_default_gmond_process() {
+  hdp::exec { "delete_default_gmond_process" :
+    command => "chkconfig gmond off",
+    path => '/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin',
+    require => Class['hdp-ganglia::monitor::gmond']
+  }
+}
\ No newline at end of file

Modified: incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-ganglia/manifests/server.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-ganglia/manifests/server.pp?rev=1484633&r1=1484632&r2=1484633&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-ganglia/manifests/server.pp (original)
+++ incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-ganglia/manifests/server.pp Tue May 21 01:14:51 2013
@@ -76,7 +76,6 @@ class hdp-ganglia::server(
   if ($service_state == 'installed_and_configured') {
     $webserver_state = 'restart'
   } elsif ($service_state == 'running') {
-    class { 'hdp-ganglia::server::delete_default_gmond_process': }
     $webserver_state = 'running'
   } else {
     # We are never stopping httpd
@@ -209,6 +208,7 @@ class hdp-ganglia::server::gmetad(
 )
 {
   if ($ensure == 'running') {
+    class { 'hdp-ganglia::server::delete_default_gmetad_process': }
     $command = "service hdp-gmetad start >> /tmp/gmetad.log  2>&1 ; /bin/ps auwx | /bin/grep [g]metad  >> /tmp/gmetad.log  2>&1"
    } elsif  ($ensure == 'stopped') {
     $command = "service hdp-gmetad stop >> /tmp/gmetad.log  2>&1 ; /bin/ps auwx | /bin/grep [g]metad  >> /tmp/gmetad.log  2>&1"
@@ -221,10 +221,10 @@ class hdp-ganglia::server::gmetad(
   }
 }
 
-class hdp-ganglia::server::delete_default_gmond_process() {
-  hdp::exec { "delete_default_gmond_process" :
-    command => "chkconfig --del gmond",
+class hdp-ganglia::server::delete_default_gmetad_process() {
+  hdp::exec { "delete_default_gmetad_process" :
+    command => "chkconfig gmetad off",
     path => '/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin',
-    require => Class['hdp-ganglia::server::packages']
+    require => Class['hdp-ganglia::server::gmetad']
   }
 }