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/04/26 19:39:40 UTC

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

Author: smohanty
Date: Fri Apr 26 17:39:39 2013
New Revision: 1476314

URL: http://svn.apache.org/r1476314
Log:
AMBARI-1924. Allow for users to customize Ganglia gmetad + gmond user accounts. (smohanty)

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

Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1476314&r1=1476313&r2=1476314&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Fri Apr 26 17:39:39 2013
@@ -793,6 +793,9 @@ Trunk (unreleased changes):
 
  BUG FIXES
  
+ AMBARI-1924. Allow for users to customize Ganglia gmetad + gmond user
+ accounts. (smohanty)
+
  AMBARI-2024. Ambari Server becomes unresponsive after crashing on http reads 
  on jersey. (swagle)
 

Modified: incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-ganglia/manifests/init.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-ganglia/manifests/init.pp?rev=1476314&r1=1476313&r2=1476314&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-ganglia/manifests/init.pp (original)
+++ incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-ganglia/manifests/init.pp Fri Apr 26 17:39:39 2013
@@ -26,12 +26,30 @@ class hdp-ganglia(
     include hdp-ganglia::params
     $gmetad_user = $hdp-ganglia::params::gmetad_user
     $gmond_user = $hdp-ganglia::params::gmond_user
+
+    group { $gmetad_user :
+      ensure => present
+    }
+
+    if ($gmetad_user != $gmond_user) {
+      group { $gmond_user :
+        ensure => present
+      }
+    }
+
+    hdp::user { $gmond_user: 
+      gid    => $gmond_user,
+      groups => ["$gmond_user"]
+    }
   
-    user { $gmond_user : shell => '/bin/bash'} #provision for nobody user
     if ( $gmetad_user != $gmond_user) {
-      user { $gmetad_user : shell => '/bin/bash'} #provision for nobody user
+      hdp::user { $gmetad_user: 
+        gid    => $gmetad_user,
+        groups => ["$gmetad_user"]
+      }
     }
-    anchor{'hdp-ganglia::begin':} -> User<|title == $gmond_user or title == $gmetad_user|> ->  anchor{'hdp-ganglia::end':}
+
+    anchor{'hdp-ganglia::begin':} -> Group<|title == $gmond_user or title == $gmetad_user|> -> User<|title == $gmond_user or title == $gmetad_user|> ->  anchor{'hdp-ganglia::end':}
   }
 }