incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject svn commit: r1496193 - in /incubator/ambari/trunk/ambari-agent/src/main/puppet/modules: hdp-nagios/templates/hadoop-commands.cfg.erb hdp-nagios/templates/hadoop-services.cfg.erb hdp-templeton/manifests/server.pp hdp/manifests/params.pp
Date Mon, 24 Jun 2013 20:11:33 GMT
Author: yusaku
Date: Mon Jun 24 20:11:33 2013
New Revision: 1496193

URL: http://svn.apache.org/r1496193
Log:
AMBARI-2479. Security wizard: Nagios shows critical error for Oozie, Hive and webhcat service.
(jaimin via yusaku)

Modified:
    incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-commands.cfg.erb
    incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-services.cfg.erb
    incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-templeton/manifests/server.pp
    incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp

Modified: incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-commands.cfg.erb
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-commands.cfg.erb?rev=1496193&r1=1496192&r2=1496193&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-commands.cfg.erb
(original)
+++ incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-commands.cfg.erb
Mon Jun 24 20:11:33 2013
@@ -71,17 +71,17 @@ define command{
 
 define command{
         command_name    check_oozie_status
-        command_line    $USER1$/check_oozie_status.sh $HOSTADDRESS$ $ARG1$ $ARG2$ $ARG3$
$ARG4$ $ARG5$
+        command_line    $USER1$/check_oozie_status.sh $HOSTADDRESS$ $ARG1$ $ARG2$ $ARG3$
$ARG4$ $ARG5$ $ARG6$ $ARG7$
        }
 
 define command{
         command_name    check_templeton_status
-        command_line    $USER1$/check_templeton_status.sh $HOSTADDRESS$ $ARG1$ $ARG2$ $ARG3$
$ARG4$ $ARG5$
+        command_line    $USER1$/check_templeton_status.sh $HOSTADDRESS$ $ARG1$ $ARG2$ $ARG3$
$ARG4$ $ARG5$ $ARG6$ $ARG7$
        }
 
 define command{
         command_name    check_hive_metastore_status
-        command_line    $USER1$/check_hive_metastore_status.sh $HOSTADDRESS$ $ARG1$ $ARG2$
$ARG3$ $ARG4$ $ARG5$
+        command_line    $USER1$/check_hive_metastore_status.sh $HOSTADDRESS$ $ARG1$ $ARG2$
$ARG3$ $ARG4$ $ARG5$ $ARG6$ $ARG7$
        }
 define command{
         command_name    check_ambari_agent_status

Modified: incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-services.cfg.erb
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-services.cfg.erb?rev=1496193&r1=1496192&r2=1496193&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-services.cfg.erb
(original)
+++ incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-services.cfg.erb
Mon Jun 24 20:11:33 2013
@@ -597,7 +597,7 @@ define service {
         service_description     HIVE-METASTORE::Hive Metastore status check
         servicegroups           HIVE-METASTORE
         <%if scope.function_hdp_template_var("security_enabled")-%>
-        check_command           check_hive_metastore_status!<%=scope.function_hdp_template_var("hive_metastore_port")%>!<%=scope.function_hdp_template_var("java64_home")%>!true!<%=scope.function_hdp_template_var("keytab_path")%>/<%=scope.function_hdp_template_var("nagios_user")%>.headless.keytab!<%=scope.function_hdp_template_var("nagios_user")%>!<%=scope.function_hdp_template_var("kinit_path_local")%>/"/usr/bin/kinit"
+        check_command           check_hive_metastore_status!<%=scope.function_hdp_template_var("hive_metastore_port")%>!<%=scope.function_hdp_template_var("java64_home")%>!true!<%=scope.function_hdp_template_var("nagios_keytab_path")%>!<%=scope.function_hdp_template_var("nagios_principal_name")%>!<%=scope.function_hdp_template_var("kinit_path_local")%>
         <%else-%>
         check_command           check_hive_metastore_status!<%=scope.function_hdp_template_var("hive_metastore_port")%>!<%=scope.function_hdp_template_var("java64_home")%>!false
         <%end-%>
@@ -614,7 +614,7 @@ define service {
         service_description     OOZIE::Oozie Server status check
         servicegroups           OOZIE
         <%if scope.function_hdp_template_var("security_enabled")-%>
-        check_command           check_oozie_status!<%=scope.function_hdp_template_var("oozie_server_port")%>!<%=scope.function_hdp_template_var("java64_home")%>!true!<%=scope.function_hdp_template_var("keytab_path")%>/<%=scope.function_hdp_template_var("nagios_user")%>.headless.keytab!<%=scope.function_hdp_template_var("nagios_user")%>!<%=scope.function_hdp_template_var("kinit_path_local")%>/"/usr/bin/kinit"
+        check_command           check_oozie_status!<%=scope.function_hdp_template_var("oozie_server_port")%>!<%=scope.function_hdp_template_var("java64_home")%>!true!<%=scope.function_hdp_template_var("nagios_keytab_path")%>!<%=scope.function_hdp_template_var("nagios_principal_name")%>!<%=scope.function_hdp_template_var("kinit_path_local")%>
         <%else-%>
         check_command           check_oozie_status!<%=scope.function_hdp_template_var("oozie_server_port")%>!<%=scope.function_hdp_template_var("java64_home")%>!false
         <%end-%>
@@ -631,7 +631,7 @@ define service {
         service_description     WEBHCAT::WebHCat Server status check
         servicegroups           WEBHCAT 
         <%if scope.function_hdp_template_var("security_enabled")-%>
-        check_command           check_templeton_status!<%=scope.function_hdp_template_var("templeton_port")%>!v1!true!<%=scope.function_hdp_template_var("keytab_path")%>/<%=scope.function_hdp_template_var("nagios_user")%>.headless.keytab!<%=scope.function_hdp_template_var("nagios_user")%>!<%=scope.function_hdp_template_var("kinit_path_local")%>/"/usr/bin/kinit"
+        check_command           check_templeton_status!<%=scope.function_hdp_template_var("templeton_port")%>!v1!true!<%=scope.function_hdp_template_var("nagios_keytab_path")%>!<%=scope.function_hdp_template_var("nagios_principal_name")%>!<%=scope.function_hdp_template_var("kinit_path_local")%>
         <%else-%>
         check_command           check_templeton_status!<%=scope.function_hdp_template_var("templeton_port")%>!v1!false
         <%end-%>

Modified: incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-templeton/manifests/server.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-templeton/manifests/server.pp?rev=1496193&r1=1496192&r2=1496193&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-templeton/manifests/server.pp
(original)
+++ incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-templeton/manifests/server.pp
Mon Jun 24 20:11:33 2013
@@ -25,8 +25,6 @@ class hdp-templeton::server(
 {  
 
   $templeton_user = $hdp-templeton::params::templeton_user
-  $smoke_test_user = $hdp::params::smokeuser
-  $smokeuser_keytab = $hdp::params::smokeuser_keytab
   if ($service_state == 'no_op') { 
   } elsif ($service_state in ['running','stopped','installed_and_configured','uninstalled'])
{
   $hdp::params::service_exists['hdp-templeton::server'] = true
@@ -56,12 +54,6 @@ class hdp-templeton::server(
      }
   }
 
-  if ($security_enabled == true) {
-    $kinit_if_needed = "su - ${smoke_test_user} -c '${smokeuser_keytab} ${smoke_test_user}';"
-  } else {
-    $kinit_if_needed = "echo 0;"
-  }
-
   class{ 'hdp-templeton' :
     service_state => $service_state,
     server        => true
@@ -86,6 +78,13 @@ class hdp-templeton::copy-hdfs-directori
 {
  $webhcat_apps_dir = $hdp::params::webhcat_apps_dir
  $webhcat_user = $hdp::params::webhcat_user
+ $smoke_test_user = $hdp::params::smokeuser
+ $smokeuser_keytab = $hdp::params::smokeuser_keytab
+ if ($hdp::params::security_enabled == true) {
+     $kinit_if_needed = "${hdp::params::kinit_path_local} -kt ${smokeuser_keytab} ${smoke_test_user};"
+   } else {
+     $kinit_if_needed = "echo 0;"
+   }
 # $pig_src_tar = "$hdp::params::artifact_dir/pig.tar.gz"
 
 #  hdp-hadoop::hdfs::copyfromlocal { '/usr/share/templeton/templeton*jar':

Modified: incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp?rev=1496193&r1=1496192&r2=1496193&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp (original)
+++ incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp Mon
Jun 24 20:11:33 2013
@@ -56,6 +56,8 @@ class hdp::params()
   $keytab_path = hdp_default("keytab_path", "/etc/security/keytabs")
   $use_hostname_in_principal = hdp_default("instance_name", true)
   $smokeuser_keytab = hdp_default("smokeuser_keytab", "/etc/security/keytabs/smokeuser.headless.keytab")
+  $nagios_keytab_path = hdp_default("nagios_keytab_path", "/etc/security/keytabs/nagios.service.keytab")
+  $nagios_principal_name = hdp_default("nagios_principal_name", "nagios")
 
   ###### hostnames
   $namenode_host = hdp_default("namenode_host")



Mime
View raw message