You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sw...@apache.org on 2013/03/20 01:52:40 UTC

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

Author: swagle
Date: Wed Mar 20 00:52:40 2013
New Revision: 1458598

URL: http://svn.apache.org/r1458598
Log:
AMBARI-1439. rrd file location should be read from global config. New patch for reopened bug. (swagle)

Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-ganglia/manifests/params.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=1458598&r1=1458597&r2=1458598&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Wed Mar 20 00:52:40 2013
@@ -502,6 +502,9 @@ Trunk (unreleased changes):
 
  BUG FIXES
 
+ AMBARI-1439. rrd file location should be read from global config. 
+ New patch for reopened bug. (swagle)
+
  AMBARI-1667. Starting all services fails on secure cluster (excluding 
  HBase and ZooKeeper). (swagle)
 

Modified: incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-ganglia/manifests/params.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-ganglia/manifests/params.pp?rev=1458598&r1=1458597&r2=1458598&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-ganglia/manifests/params.pp (original)
+++ incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-ganglia/manifests/params.pp Wed Mar 20 00:52:40 2013
@@ -29,5 +29,6 @@ class hdp-ganglia::params() inherits hdp
   $gmond_user = $hdp::params::gmond_user
 
   $webserver_group = hdp_default("hadoop/gangliaEnv/webserver_group","apache")
+  $rrdcached_default_base_dir = "/var/lib/ganglia/rrds"
   $rrdcached_base_dir = hdp_default("rrdcached_base_dir", "/var/lib/ganglia/rrds")
 }

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=1458598&r1=1458597&r2=1458598&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 Wed Mar 20 00:52:40 2013
@@ -137,19 +137,32 @@ class hdp-ganglia::server::files(
   file{$rrd_py_file_path :
     ensure => $ensure,
     source => "puppet:///modules/hdp-ganglia/rrd.py",
-    mode   => '0755',
-    require => Hdp::Directory_recursive_create[$rrd_py_path]
+    mode   => '0755'
   }
 
+  anchor{ 'hdp-ganglia::server::files::begin' : } -> Hdp::Directory_recursive_create[$rrd_py_path] -> File[$rrd_py_file_path] -> anchor{ 'hdp-ganglia::server::files::end' : }
+
   $rrd_files_dir = $hdp-ganglia::params::rrdcached_base_dir
   $rrd_file_owner = $hdp-ganglia::params::gmetad_user
-  hdp::directory_recursive_create{ $rrd_files_dir :
-    ensure => "directory",
-    owner => $rrd_file_owner,
-    group => $rrd_file_owner,
-    mode => 755
-  }
+  $rrdcached_default_file_dir = $hdp-ganglia::params::rrdcached_default_base_dir
+
+  ## If directory is different fr omdefault make sure it exists
+  if ($rrdcached_default_file_dir != $rrd_files_dir) {
+    hdp::directory_recursive_create{ $rrd_files_dir :
+      ensure => "directory",
+      owner => $rrd_file_owner,
+      group => $rrd_file_owner,
+      mode => '0755'
+    }
 
+    file { $rrdcached_default_file_dir :
+      ensure => link,
+      target => $rrd_files_dir,
+      force => true
+    }
+
+    File[$rrd_py_file_path] -> Hdp::Directory_recursive_create[$rrd_files_dir] -> File[$rrdcached_default_file_dir] -> Anchor['hdp-ganglia::server::files::end']
+  }
 }