incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From odiache...@apache.org
Subject git commit: AMBARI-3273. Remove unnecessary warnings in puppet scripts that make it harder to look at the real logs.(Andrew Onischuk via odiachenko)
Date Fri, 20 Sep 2013 15:11:58 GMT
Updated Branches:
  refs/heads/trunk 9eb563bb5 -> 2951f1bc1


AMBARI-3273. Remove unnecessary warnings in puppet scripts that make it harder to look at
the real logs.(Andrew Onischuk via odiachenko)


Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/2951f1bc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/2951f1bc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/2951f1bc

Branch: refs/heads/trunk
Commit: 2951f1bc17ba72160e18700d6108e4f37670367f
Parents: 9eb563b
Author: Oleksandr Diachenko <odiachenko@hortonworks.com>
Authored: Fri Sep 20 18:11:32 2013 +0300
Committer: Oleksandr Diachenko <odiachenko@hortonworks.com>
Committed: Fri Sep 20 18:11:45 2013 +0300

----------------------------------------------------------------------
 .../puppet/modules/hdp-hadoop/manifests/client.pp     |  2 +-
 .../puppet/modules/hdp-hadoop/manifests/datanode.pp   |  2 +-
 .../main/puppet/modules/hdp-hadoop/manifests/hcfs.pp  |  2 +-
 .../main/puppet/modules/hdp-hadoop/manifests/init.pp  | 14 +++++++-------
 .../puppet/modules/hdp-hadoop/manifests/jobtracker.pp |  2 +-
 .../modules/hdp-hadoop/manifests/journalnode.pp       |  2 +-
 .../puppet/modules/hdp-hadoop/manifests/namenode.pp   |  2 +-
 .../puppet/modules/hdp-hadoop/manifests/snamenode.pp  |  2 +-
 .../modules/hdp-hadoop/manifests/tasktracker.pp       |  2 +-
 .../main/puppet/modules/hdp-hadoop/manifests/zkfc.pp  |  2 +-
 .../puppet/modules/hdp-nagios/manifests/server.pp     |  2 ++
 .../hdp-nagios/templates/hadoop-services.cfg.erb      |  6 +++---
 .../main/puppet/modules/hdp-yarn/manifests/service.pp |  5 ++---
 13 files changed, 23 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/2951f1bc/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/client.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/client.pp b/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/client.pp
index 7a4b928..97629a8 100644
--- a/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/client.pp
+++ b/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/client.pp
@@ -24,7 +24,7 @@ class hdp-hadoop::client(
 {
   $hdp::params::service_exists['hdp-hadoop::client'] = true
 
-  Hdp-hadoop::Common<||>{service_states +> $service_state}
+  Hdp-hadoop::Common<||>{service_state => $service_state}
 
   if ($hdp::params::use_32_bits_on_slaves == true) {
     Hdp-hadoop::Package<||>{include_32_bit => true}

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/2951f1bc/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/datanode.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/datanode.pp b/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/datanode.pp
index 61fd347..04a0d8e 100644
--- a/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/datanode.pp
+++ b/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/datanode.pp
@@ -26,7 +26,7 @@ class hdp-hadoop::datanode(
 
   $hdp::params::service_exists['hdp-hadoop::datanode'] = true
 
-  Hdp-hadoop::Common<||>{service_states +> $service_state}
+  Hdp-hadoop::Common<||>{service_state => $service_state}
 
   if ($hdp::params::use_32_bits_on_slaves == true) {
     Hdp-hadoop::Package<||>{include_32_bit => true}

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/2951f1bc/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/hcfs.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/hcfs.pp b/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/hcfs.pp
index 8f6dc5e..58f7708 100644
--- a/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/hcfs.pp
+++ b/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/hcfs.pp
@@ -24,7 +24,7 @@ class hdp-hadoop::hcfs_client(
 ) inherits hdp-hadoop::params
 {
   $hdp::params::service_exists['hdp-hadoop::hcfs_client'] = true
-  Hdp-hadoop::Common<||>{service_states +> $service_state}
+  Hdp-hadoop::Common<||>{service_state => $service_state}
   Hdp-hadoop::Package<||>{include_64_bit => true}
   Hdp-hadoop::Configfile<||>{sizes +> 64}
   

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/2951f1bc/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/init.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/init.pp b/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/init.pp
index ab7c4b5..da3d1cb 100644
--- a/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/init.pp
+++ b/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/init.pp
@@ -20,11 +20,11 @@
 #
 #singleton for use with <||> form so that namenode, datanode, etc can pass state to
hdp-hadoop and still use include
 define hdp-hadoop::common(
-  $service_states = []
+  $service_state
 )
 {
   class { 'hdp-hadoop':
-    service_states => $service_states    
+    service_state => $service_state
   }
   anchor{'hdp-hadoop::common::begin':} -> Class['hdp-hadoop'] -> anchor{'hdp-hadoop::common::end':}

 }
@@ -214,7 +214,7 @@ class hdp-hadoop::initialize()
 }
 
 class hdp-hadoop(
-  $service_states  = []
+  $service_state
 )
 {
   include hdp-hadoop::params
@@ -226,7 +226,7 @@ class hdp-hadoop(
   anchor{'hdp-hadoop::begin':} 
   anchor{'hdp-hadoop::end':} 
 
-  if ('uninstalled' in $service_states) {
+  if ($service_state=='uninstalled') {
     hdp-hadoop::package { 'hadoop':
       ensure => 'uninstalled'
     }
@@ -313,7 +313,7 @@ class hdp-hadoop(
 
     # log4j.properties has to be installed just one time to prevent
     # manual changes overwriting
-    if ('installed_and_configured' in $service_states) {
+    if ($service_state=='installed_and_configured') {
       hdp-hadoop::configfile { 'log4j.properties' :
         tag   => 'common',
         owner => $hdfs_user,
@@ -526,7 +526,7 @@ define hdp-hadoop::update-log4j-property(
   $hadoop_conf_dir = $hdp-hadoop::params::conf_dir
 )
 {
-  hdp::exec{ "sed -i 's~\(${hdp-hadoop::params::rca_disabled_prefix}\)\?${name[name]}=.*~${hdp-hadoop::params::rca_prefix}${name[name]}=${name[value]}~'
${hadoop_conf_dir}/${log4j_file}":
-    command => "sed -i 's~\(${hdp-hadoop::params::rca_disabled_prefix}\)\?${name[name]}=.*~${hdp-hadoop::params::rca_prefix}${name[name]}=${name[value]}~'
${hadoop_conf_dir}/${log4j_file}"
+  hdp::exec{ "sed -i 's~\\(${hdp-hadoop::params::rca_disabled_prefix}\\)\\?${name[name]}=.*~${hdp-hadoop::params::rca_prefix}${name[name]}=${name[value]}~'
${hadoop_conf_dir}/${log4j_file}":
+    command => "sed -i 's~\\(${hdp-hadoop::params::rca_disabled_prefix}\\)\\?${name[name]}=.*~${hdp-hadoop::params::rca_prefix}${name[name]}=${name[value]}~'
${hadoop_conf_dir}/${log4j_file}"
   }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/2951f1bc/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/jobtracker.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/jobtracker.pp b/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/jobtracker.pp
index b96ca2f..23503da 100644
--- a/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/jobtracker.pp
+++ b/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/jobtracker.pp
@@ -24,7 +24,7 @@ class hdp-hadoop::jobtracker(
 ) inherits hdp-hadoop::params
 {
   $hdp::params::service_exists['hdp-hadoop::jobtracker'] = true
-  Hdp-hadoop::Common<||>{service_states +> $service_state}
+  Hdp-hadoop::Common<||>{service_state => $service_state}
   Hdp-hadoop::Package<||>{include_64_bit => true}
   Hdp-hadoop::Configfile<||>{sizes +> 64}
 

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/2951f1bc/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/journalnode.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/journalnode.pp b/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/journalnode.pp
index 3d5aaa6..f45c684 100644
--- a/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/journalnode.pp
+++ b/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/journalnode.pp
@@ -26,7 +26,7 @@ class hdp-hadoop::journalnode(
 
   $hdp::params::service_exists['hdp-hadoop::journalnode'] = true
   
-  Hdp-hadoop::Common<||>{service_states +> $service_state}
+  Hdp-hadoop::Common<||>{service_state => $service_state}
   Hdp-hadoop::Package<||>{include_64_bit => true}
   Hdp-hadoop::Configfile<||>{sizes +> 64}
   

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/2951f1bc/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/namenode.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/namenode.pp b/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/namenode.pp
index 0d65510..c33cdba 100644
--- a/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/namenode.pp
+++ b/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/namenode.pp
@@ -27,7 +27,7 @@ class hdp-hadoop::namenode(
 {
   $hdp::params::service_exists['hdp-hadoop::namenode'] = true
 
-  Hdp-hadoop::Common<||>{service_states +> $service_state}
+  Hdp-hadoop::Common<||>{service_state => $service_state}
   Hdp-hadoop::Package<||>{include_64_bit => true}
   Hdp-hadoop::Configfile<||>{sizes +> 64}
 

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/2951f1bc/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/snamenode.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/snamenode.pp b/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/snamenode.pp
index bb6a720..f2c5beb 100644
--- a/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/snamenode.pp
+++ b/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/snamenode.pp
@@ -25,7 +25,7 @@ class hdp-hadoop::snamenode(
 {
   $hdp::params::service_exists['hdp-hadoop::snamenode'] = true
 
-  Hdp-hadoop::Common<||>{service_states +> $service_state}
+  Hdp-hadoop::Common<||>{service_state => $service_state}
   Hdp-hadoop::Package<||>{include_64_bit => true}
   Hdp-hadoop::Configfile<||>{sizes +> 64}
 

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/2951f1bc/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/tasktracker.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/tasktracker.pp b/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/tasktracker.pp
index a86ae73..e6869d6 100644
--- a/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/tasktracker.pp
+++ b/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/tasktracker.pp
@@ -25,7 +25,7 @@ class hdp-hadoop::tasktracker(
 {
   $hdp::params::service_exists['hdp-hadoop::tasktracker'] = true
 
-  Hdp-hadoop::Common<||>{service_states +> $service_state}
+  Hdp-hadoop::Common<||>{service_state => $service_state}
 
   if ($hdp::params::use_32_bits_on_slaves == true) {
     Hdp-hadoop::Package<||>{include_32_bit => true}

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/2951f1bc/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/zkfc.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/zkfc.pp b/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/zkfc.pp
index 3ec0055..5f74012 100644
--- a/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/zkfc.pp
+++ b/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/zkfc.pp
@@ -24,7 +24,7 @@ class hdp-hadoop::zkfc(
 ) inherits hdp-hadoop::params 
 {
 
-  Hdp-hadoop::Common<||>{service_states +> $service_state}
+  Hdp-hadoop::Common<||>{service_state => $service_state}
   Hdp-hadoop::Package<||>{include_64_bit => true}
   Hdp-hadoop::Configfile<||>{sizes +> 64}
   

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/2951f1bc/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/server.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/server.pp b/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/server.pp
index b91870e..b409ab8 100644
--- a/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/server.pp
+++ b/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/server.pp
@@ -271,6 +271,8 @@ class hdp-nagios::server::web_permisssions()
 
 class hdp-nagios::server::services($ensure)
 {
+   $pid_file = $hdp-nagios::params::nagios_pid_file
+  
    if ($ensure == 'running') {
      $command = "service nagios start"
    } elsif ($ensure == 'stopped') {

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/2951f1bc/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-services.cfg.erb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-services.cfg.erb
b/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-services.cfg.erb
index 816ee59..7ce33e6 100644
--- a/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-services.cfg.erb
+++ b/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-services.cfg.erb
@@ -85,7 +85,7 @@ define service {
         use                     hadoop-service
         service_description     AMBARI::Ambari Agent process
         servicegroups           AMBARI
-        check_command           check_tcp!<%=scope.function_hdp_template_var("all_ping_ports")[index]%>!-w
1 -c 1
+        check_command           check_tcp!<%=scope.function_hdp_template_var("::all_ping_ports")[index]%>!-w
1 -c 1
         normal_check_interval   1
         retry_check_interval    0.25
         max_check_attempts      4
@@ -480,7 +480,7 @@ define service {
         use                     hadoop-service
         service_description     NODEMANAGER::NodeManager process
         servicegroups           YARN
-        check_command           check_tcp!<%=scope.function_hdp_template_var("nm_port")%>!-w
1 -c 1
+        check_command           check_tcp!<%=scope.function_hdp_template_var("::hdp::nm_port")%>!-w
1 -c 1
         normal_check_interval   1
         retry_check_interval    0.5
         max_check_attempts      3
@@ -491,7 +491,7 @@ define service {
         use                     hadoop-service
         service_description     NODEMANAGER::NodeManager health
         servicegroups           YARN
-        check_command           check_nodemanager_health!<%=scope.function_hdp_template_var("nm_port")%>!<%=scope.function_hdp_template_var("::hdp::params::security_enabled")%>!<%=scope.function_hdp_template_var("nagios_keytab_path")%>!<%=scope.function_hdp_template_var("nagios_principal_name")%>!<%=scope.function_hdp_template_var("kinit_path_local")%>
+        check_command           check_nodemanager_health!<%=scope.function_hdp_template_var("::hdp::nm_port")%>!<%=scope.function_hdp_template_var("::hdp::params::security_enabled")%>!<%=scope.function_hdp_template_var("nagios_keytab_path")%>!<%=scope.function_hdp_template_var("nagios_principal_name")%>!<%=scope.function_hdp_template_var("kinit_path_local")%>
         normal_check_interval   1
         retry_check_interval    1
         max_check_attempts      3

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/2951f1bc/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/service.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/service.pp b/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/service.pp
index 74c77e8..c20fa42 100644
--- a/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/service.pp
+++ b/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/service.pp
@@ -65,12 +65,11 @@ define hdp-yarn::service(
     $daemon_cmd = undef
   }
  
- 
    if ($create_pid_dir == true) {
     hdp::directory_recursive_create { $pid_dir: 
       owner       => $user,
       context_tag => 'yarn_service',
-      service_state => $service_state,
+      service_state => $ensure,
       force => true
     }
   }
@@ -79,7 +78,7 @@ define hdp-yarn::service(
     hdp::directory_recursive_create { $log_dir: 
       owner       => $user,
       context_tag => 'yarn_service',
-      service_state => $service_state,
+      service_state => $ensure,
       force => true
     }
     


Mime
View raw message