You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2013/12/13 18:55:03 UTC

git commit: AMBARI-4066. nagios fails when hbase is included on Python

Updated Branches:
  refs/heads/trunk 227bb3752 -> 9b32b676e


AMBARI-4066. nagios fails when hbase is included on Python


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

Branch: refs/heads/trunk
Commit: 9b32b676e8c96e4cea137d94dc8ac8b9daafcd9d
Parents: 227bb37
Author: Andrew Onischuk <ao...@hortonworks.com>
Authored: Fri Dec 13 09:53:59 2013 -0800
Committer: Andrew Onischuk <ao...@hortonworks.com>
Committed: Fri Dec 13 09:53:59 2013 -0800

----------------------------------------------------------------------
 .../stacks/HDP/2.0._/services/HIVE/package/scripts/params.py  | 4 ++--
 .../HDP/2.0._/services/HIVE/package/scripts/service_check.py  | 2 +-
 .../2.0._/services/NAGIOS/package/scripts/nagios_server.py    | 6 +++---
 .../HDP/2.0._/services/NAGIOS/package/scripts/params.py       | 7 ++++---
 4 files changed, 10 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/9b32b676/ambari-server/src/main/resources/stacks/HDP/2.0._/services/HIVE/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0._/services/HIVE/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0._/services/HIVE/package/scripts/params.py
index 9cf50ad..2fbf776 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0._/services/HIVE/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0._/services/HIVE/package/scripts/params.py
@@ -58,7 +58,7 @@ smoke_user_keytab = config['configurations']['global']['smokeuser_keytab']
 security_enabled = config['configurations']['global']['security_enabled']
 
 kinit_path_local = get_kinit_path([default("kinit_path_local",None), "/usr/bin", "/usr/kerberos/bin", "/usr/sbin"])
-hive_metatore_keytab_path = default("hive-site/hive.metastore.kerberos.keytab.file","/etc/security/keytabs/hive.service.keytab")
+hive_metastore_keytab_path =  config['configurations']['hive-site']['hive.metastore.kerberos.keytab.file']
 
 #hive_env
 hive_conf_dir = "/etc/hive/conf"
@@ -127,4 +127,4 @@ webhcat_user = config['configurations']['global']['webhcat_user']
 hcat_pid_dir = config['configurations']['global']['hcat_pid_dir']   #hcat_pid_dir
 hcat_log_dir = config['configurations']['global']['hcat_log_dir']   #hcat_log_dir
 
-hadoop_conf_dir = config['configurations']['global']['hadoop_conf_dir']
+hadoop_conf_dir = '/etc/hadoop/conf'

http://git-wip-us.apache.org/repos/asf/ambari/blob/9b32b676/ambari-server/src/main/resources/stacks/HDP/2.0._/services/HIVE/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0._/services/HIVE/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/HDP/2.0._/services/HIVE/package/scripts/service_check.py
index 959240c..c67896c 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0._/services/HIVE/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0._/services/HIVE/package/scripts/service_check.py
@@ -30,7 +30,7 @@ class HiveServiceCheck(Script):
     env.set_params(params)
     if params.security_enabled:
       kinit_cmd = format("{kinit_path_local} -kt {smoke_user_keytab} {smokeuser};")
-      hive_principal_ext = format("principal={hive_metatore_keytab_path}")
+      hive_principal_ext = format("principal={hive_metastore_keytab_path}")
       hive_url_ext = format("{hive_url}/\\;{hive_principal_ext}")
       smoke_cmd = format("{kinit_cmd} env JAVA_HOME={java64_home} {smoke_test_path} {hive_url_ext} {smoke_test_sql}")
     else:

http://git-wip-us.apache.org/repos/asf/ambari/blob/9b32b676/ambari-server/src/main/resources/stacks/HDP/2.0._/services/NAGIOS/package/scripts/nagios_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0._/services/NAGIOS/package/scripts/nagios_server.py b/ambari-server/src/main/resources/stacks/HDP/2.0._/services/NAGIOS/package/scripts/nagios_server.py
index c33b986..7584284 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0._/services/NAGIOS/package/scripts/nagios_server.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0._/services/NAGIOS/package/scripts/nagios_server.py
@@ -66,10 +66,10 @@ def remove_conflicting_packages():
   )
 
 def main():
-  command_type = sys.argv[1] if len(sys.argv)>1 else "stop"
+  command_type = sys.argv[1] if len(sys.argv)>1 else "install"
   print "Running "+command_type
-  command_data_file = '/root/workspace/Nagios/input.json'
-  basedir = '/root/workspace/Nagios/main'
+  command_data_file = '/var/lib/ambari-agent/data/command-3.json'
+  basedir = '/root/ambari/ambari-server/src/main/resources/stacks/HDP/2.0._/services/NAGIOS/package'
   stroutfile = '/1.txt'
   sys.argv = ["", command_type, command_data_file, basedir, stroutfile]
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/9b32b676/ambari-server/src/main/resources/stacks/HDP/2.0._/services/NAGIOS/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0._/services/NAGIOS/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0._/services/NAGIOS/package/scripts/params.py
index 17111cc..72afa3d 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0._/services/NAGIOS/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0._/services/NAGIOS/package/scripts/params.py
@@ -66,6 +66,7 @@ datanode_port = get_port_from_url(config['configurations']['hdfs-site']['dfs.dat
 flume_port = "4159"
 hive_metastore_port = config['configurations']['global']['hive_metastore_port'] #"9083"
 templeton_port = config['configurations']['webhcat-site']['templeton.port'] #"50111"
+hbase_rs_port = "60030"
 
 # this is different for HDP1
 nn_metrics_property = "FSNamesystem"
@@ -125,7 +126,7 @@ _flume_hosts = default("/clusterHostInfo/flume_hosts", None)
 _nagios_server_host = default("/clusterHostInfo/nagios_server_host",None)
 _ganglia_server_host = default("/clusterHostInfo/ganglia_server_host",None)
 
-_hbase_master_hosts = default("/clusterHostInfo/hbase_master_hosts",None)
+hbase_master_hosts = default("/clusterHostInfo/hbase_master_hosts",None)
 _hive_server_host = default("/clusterHostInfo/hive_server_host",None)
 _oozie_server = default("/clusterHostInfo/oozie_server",None)
 _webhcat_server_host = default("/clusterHostInfo/webhcat_server_host",None)
@@ -149,7 +150,7 @@ hostgroup_defs = {
     'ganglia-server' : _ganglia_server_host,
     'flume-servers' : _flume_hosts,
     'zookeeper-servers' : _zookeeper_hosts,
-    'hbasemasters' : _hbase_master_hosts,
+    'hbasemasters' : hbase_master_hosts,
     'hiveserver' : _hive_server_host,
     'region-servers' : _hbase_rs_hosts,
     'oozie-server' : _oozie_server,
@@ -159,4 +160,4 @@ hostgroup_defs = {
     'nodemanagers' : _nm_hosts,
     'historyserver2' : _hs_host,
     'journalnodes' : _journalnode_hosts
-}
\ No newline at end of file
+}