Author: swagle
Date: Mon Apr 29 20:38:22 2013
New Revision: 1477332

URL: http://svn.apache.org/r1477332
Log:
AMBARI-2044. hive-site.xml permission denied exception. (swagle)

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

Modified: incubator/ambari/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1477332&r1=1477331&r2=1477332&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Mon Apr 29 20:38:22 2013
@@ -804,6 +804,8 @@ Trunk (unreleased changes):
 
  BUG FIXES
 
+ AMBARI-2044. hive-site.xml permission denied exception. (swagle)
+
  AMBARI-2041. If a host that has a service client installed and the host is 
down, 
  service start will fail. (swagle)
 

Modified: 
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hive/manifests/init.pp
URL: 
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hive/manifests/init.pp?rev=1477332&r1=1477331&r2=1477332&view=diff
==============================================================================
--- 
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hive/manifests/init.pp
 (original)
+++ 
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hive/manifests/init.pp
 Mon Apr 29 20:38:22 2013
@@ -48,6 +48,17 @@ class hdp-hive(
     }
   }
 
+  $inited_nagios_user = hdp_user("nagios_user")
+
+  if ($inited_nagios_user != undef and $service_state in 
['running','stopped','installed_and_configured']) {
+    exec { 'add_permissions_for_nagios_user':
+      command => "setfacl -m user:${inited_nagios_user}:r-- 
${hdp::params::hive_conf_dir}/hive-site.xml",
+      onlyif  => "getent passwd ${inited_nagios_user} >/dev/null",
+      path    => '/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin',
+      require => Configgenerator::Configfile['hive-site']
+    }
+  }
+
   anchor { 'hdp-hive::begin': }
   anchor { 'hdp-hive::end': } 
 


Reply via email to