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/04/30 20:29:58 UTC

svn commit: r1477755 - in /incubator/ambari/trunk: CHANGES.txt ambari-agent/src/main/puppet/modules/hdp-hive/manifests/init.pp ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/server.pp

Author: swagle
Date: Tue Apr 30 18:29:58 2013
New Revision: 1477755

URL: http://svn.apache.org/r1477755
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
    incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/server.pp

Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1477755&r1=1477754&r2=1477755&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Tue Apr 30 18:29:58 2013
@@ -818,6 +818,8 @@ Trunk (unreleased changes):
 
  BUG FIXES
 
+ AMBARI-2044. hive-site.xml permission denied exception. (swagle)
+
  AMBARI-2057. Gmond left in init after install. (smohanty)
 
  AMBARI-2051. Remove hard-coded ports from agent scripts - Nagios. (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=1477755&r1=1477754&r2=1477755&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 Tue Apr 30 18:29:58 2013
@@ -48,17 +48,6 @@ 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': } 
 

Modified: incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/server.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/server.pp?rev=1477755&r1=1477754&r2=1477755&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/server.pp (original)
+++ incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/server.pp Tue Apr 30 18:29:58 2013
@@ -210,14 +210,20 @@ class hdp-nagios::server(
 
     class { 'hdp-nagios::server::services': ensure => $service_state}
 	
-	
-	Class['hdp-nagios::server::packages'] -> Class['hdp-nagios::server::enable_snmp']-> 
-	Group[$nagios_group] -> Hdp::User[$nagios_user] ->
-	Hdp::Directory[$nagios_config_dir] -> Hdp::Directory[$plugins_dir] -> Hdp::Directory_recursive_create[$nagios_pid_dir] ->
-	Hdp::Directory[$nagios_obj_dir] -> Hdp::Directory_Recursive_Create[$nagios_var_dir] ->
-	Hdp::Directory_Recursive_Create[$check_result_path] -> Hdp::Directory_Recursive_Create[$nagios_rw_dir] ->
-	Hdp::Directory[$nagios_log_dir] -> Hdp::Directory[$nagios_log_archives_dir] ->
-	Class['hdp-nagios::server::config'] -> Class['hdp-nagios::server::web_permisssions'] -> File["$nagios_config_dir/command.cfg"] -> Class['hdp-nagios::server::services'] -> Class['hdp-monitor-webserver']
+    exec { 'add_permissions_to_hive_site':
+      command => "setfacl -m user:${nagios_user}:r-- ${hdp::params::hive_conf_dir}/hive-site.xml",
+      onlyif  => "[ -f ${hdp::params::hive_conf_dir}/hive-site.xml ]",
+      path    => '/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin'
+    }
+
+    Class['hdp-nagios::server::packages'] -> Class['hdp-nagios::server::enable_snmp']->
+    Group[$nagios_group] -> Hdp::User[$nagios_user] -> Exec['add_permissions_to_hive_site'] ->
+    Hdp::Directory[$nagios_config_dir] -> Hdp::Directory[$plugins_dir] -> Hdp::Directory_recursive_create[$nagios_pid_dir] ->
+    Hdp::Directory[$nagios_obj_dir] -> Hdp::Directory_Recursive_Create[$nagios_var_dir] ->
+    Hdp::Directory_Recursive_Create[$check_result_path] -> Hdp::Directory_Recursive_Create[$nagios_rw_dir] ->
+    Hdp::Directory[$nagios_log_dir] -> Hdp::Directory[$nagios_log_archives_dir] ->
+    Class['hdp-nagios::server::config'] -> Class['hdp-nagios::server::web_permisssions'] ->
+    File["$nagios_config_dir/command.cfg"] -> Class['hdp-nagios::server::services'] -> Class['hdp-monitor-webserver']
 
   } else {
     hdp_fail("TODO not implemented yet: service_state = ${service_state}")