incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vik...@apache.org
Subject svn commit: r1347249 - in /incubator/ambari/branches/ambari-186: CHANGES.txt hmc/puppet/modules/hdp-nagios/manifests/server.pp
Date Thu, 07 Jun 2012 01:10:07 GMT
Author: vikram
Date: Thu Jun  7 01:10:06 2012
New Revision: 1347249

URL: http://svn.apache.org/viewvc?rev=1347249&view=rev
Log:
AMBARI-443 Nagios start fails on reinstall (Contributed by Ramya)

Modified:
    incubator/ambari/branches/ambari-186/CHANGES.txt
    incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-nagios/manifests/server.pp

Modified: incubator/ambari/branches/ambari-186/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/CHANGES.txt?rev=1347249&r1=1347248&r2=1347249&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/CHANGES.txt (original)
+++ incubator/ambari/branches/ambari-186/CHANGES.txt Thu Jun  7 01:10:06 2012
@@ -6,6 +6,8 @@ characters wide.
 
 Release 0.1.x - unreleased
 
+  AMBARI-443. Nagios start fails on reinstall (Ramya via Vikram)
+
   AMBARI-442 Duplicate definition: Class[Hdp-hbase::Regionserver::Enable-ganglia] (Ramya
via Vikram)
 
   AMBARI-441. Add ganglia monitor to all the hosts including collector. (Mahadev via Vikram)

Modified: incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-nagios/manifests/server.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-nagios/manifests/server.pp?rev=1347249&r1=1347248&r2=1347249&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-nagios/manifests/server.pp
(original)
+++ incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-nagios/manifests/server.pp
Thu Jun  7 01:10:06 2012
@@ -13,6 +13,12 @@ class hdp-nagios::server(
       service_state => uninstalled
     }
 
+    if ($wipeoff_data == true) {
+      hdp::exec { "rm -f /var/nagios/rw/nagios.cmd" :
+        command => "rm -f /var/nagios/rw/nagios.cmd",
+        unless => "test ! -e  /var/nagios/rw/nagios.cmd"
+      }
+    }
     hdp::directory { $nagios_config_dir:
       service_state => $service_state,
       force => true
@@ -27,8 +33,11 @@ class hdp-nagios::server(
       service_state => $service_state,
       force => true
     }
-   Class['hdp-nagios::server::packages'] -> Hdp::Directory[$nagios_config_dir] -> Hdp::Directory[$plugins_dir]
-> Hdp::Directory[$nagios_obj_dir]
-
+    if ($wipeoff_data == true) {
+     Class['hdp-nagios::server::packages'] -> Exec['rm -f /var/nagios/rw/nagios.cmd']
-> Hdp::Directory[$nagios_config_dir] -> Hdp::Directory[$plugins_dir] -> Hdp::Directory[$nagios_obj_dir]
+    } else {
+     Class['hdp-nagios::server::packages'] -> Hdp::Directory[$nagios_config_dir] ->
Hdp::Directory[$plugins_dir] -> Hdp::Directory[$nagios_obj_dir]
+    }
   } elsif ($service_state in ['running','stopped','installed_and_configured']) {
     class { 'hdp-nagios::server::packages' : }
 
@@ -47,6 +56,7 @@ class hdp-nagios::server(
       force => true
     }
 
+
     class { 'hdp-nagios::server::config': 
       notify => Class['hdp-nagios::server::services']
     }



Mime
View raw message