ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmitriu...@apache.org
Subject git commit: AMBARI-4321. Ganglia Monitor does not start on added host (Eugene Chekanskiy via dlysnichenko)
Date Tue, 21 Jan 2014 15:49:53 GMT
Updated Branches:
  refs/heads/trunk b84b0732a -> 4528f4b09


AMBARI-4321. Ganglia Monitor does not start on added host (Eugene Chekanskiy via dlysnichenko)


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

Branch: refs/heads/trunk
Commit: 4528f4b098ee2701985598388e753bf66d97fe3c
Parents: b84b073
Author: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
Authored: Tue Jan 21 17:44:06 2014 +0200
Committer: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
Committed: Tue Jan 21 17:44:06 2014 +0200

----------------------------------------------------------------------
 .../GANGLIA/package/scripts/ganglia_monitor.py  | 41 +++----------
 .../GANGLIA/package/scripts/ganglia_server.py   |  4 +-
 .../HDFS/package/scripts/hdfs_client.py         |  4 +-
 .../services/HDFS/package/scripts/snamenode.py  |  4 +-
 .../GANGLIA/package/scripts/ganglia_monitor.py  | 61 ++++----------------
 .../services/HDFS/package/scripts/datanode.py   |  4 +-
 .../HDFS/package/scripts/journalnode.py         |  4 +-
 .../services/HDFS/package/scripts/namenode.py   |  4 +-
 .../services/HDFS/package/scripts/zkfc_slave.py |  4 +-
 9 files changed, 35 insertions(+), 95 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/4528f4b0/ambari-server/src/main/resources/stacks/HDP/1.3.3/services/GANGLIA/package/scripts/ganglia_monitor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.3/services/GANGLIA/package/scripts/ganglia_monitor.py
b/ambari-server/src/main/resources/stacks/HDP/1.3.3/services/GANGLIA/package/scripts/ganglia_monitor.py
index bddecf6..207331b 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.3/services/GANGLIA/package/scripts/ganglia_monitor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.3/services/GANGLIA/package/scripts/ganglia_monitor.py
@@ -31,7 +31,7 @@ class GangliaMonitor(Script):
 
     self.install_packages(env)
     env.set_params(params)
-    self.config(env)
+    self.configure(env)
 
   def start(self, env):
     ganglia_monitor_service.monitor("start")
@@ -56,7 +56,7 @@ class GangliaMonitor(Script):
       raise ComponentIsNotRunning()
 
 
-  def config(self, env):
+  def configure(self, env):
     import params
 
     ganglia.groups_and_users()
@@ -104,37 +104,14 @@ class GangliaMonitor(Script):
                       owner = "root",
                       group = params.user_group)
 
-    if params.is_hsnode_master:
-      generate_daemon("gmond",
-                      name = "HDPHistoryServer",
-                      role = "monitor",
-                      owner = "root",
-                      group = params.user_group)
-
-    if params.is_slave:
-      generate_daemon("gmond",
-                      name = "HDPDataNode",
-                      role = "monitor",
-                      owner = "root",
-                      group = params.user_group)
-
-    if params.is_tasktracker:
-      generate_daemon("gmond",
-                      name = "HDPTaskTracker",
-                      role = "monitor",
-                      owner = "root",
-                      group = params.user_group)
-
-    if params.is_hbase_rs:
-      generate_daemon("gmond",
-                      name = "HDPHBaseRegionServer",
-                      role = "monitor",
-                      owner = "root",
-                      group = params.user_group)
-
-    if params.is_flume:
+    pure_slave = not (params.is_namenode_master and
+                      params.is_jtnode_master and
+                      params.is_rmnode_master and
+                      params.is_hsnode_master and
+                      params.is_hbase_master) and params.is_slave
+    if pure_slave:
       generate_daemon("gmond",
-                      name = "HDPFlumeServer",
+                      name = "HDPSlaves",
                       role = "monitor",
                       owner = "root",
                       group = params.user_group)

http://git-wip-us.apache.org/repos/asf/ambari/blob/4528f4b0/ambari-server/src/main/resources/stacks/HDP/1.3.3/services/GANGLIA/package/scripts/ganglia_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.3/services/GANGLIA/package/scripts/ganglia_server.py
b/ambari-server/src/main/resources/stacks/HDP/1.3.3/services/GANGLIA/package/scripts/ganglia_server.py
index e391562..7fa747a 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.3/services/GANGLIA/package/scripts/ganglia_server.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.3/services/GANGLIA/package/scripts/ganglia_server.py
@@ -31,7 +31,7 @@ class GangliaServer(Script):
 
     self.install_packages(env)
     env.set_params(params)
-    self.config(env)
+    self.configure(env)
 
   def start(self, env):
     import params
@@ -52,7 +52,7 @@ class GangliaServer(Script):
     # Recursively check all existing gmetad pid files
     check_process_status(pid_file)
 
-  def config(self, env):
+  def configure(self, env):
     import params
 
     ganglia.groups_and_users()

http://git-wip-us.apache.org/repos/asf/ambari/blob/4528f4b0/ambari-server/src/main/resources/stacks/HDP/1.3.3/services/HDFS/package/scripts/hdfs_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.3/services/HDFS/package/scripts/hdfs_client.py
b/ambari-server/src/main/resources/stacks/HDP/1.3.3/services/HDFS/package/scripts/hdfs_client.py
index ec24c7d..8180689 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.3/services/HDFS/package/scripts/hdfs_client.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.3/services/HDFS/package/scripts/hdfs_client.py
@@ -27,7 +27,7 @@ class HdfsClient(Script):
 
     self.install_packages(env)
     env.set_params(params)
-    self.config(env)
+    self.configure(env)
 
   def start(self, env):
     import params
@@ -42,7 +42,7 @@ class HdfsClient(Script):
   def status(self, env):
     raise ClientComponentHasNoStatus()
 
-  def config(self, env):
+  def configure(self, env):
     import params
 
     pass

http://git-wip-us.apache.org/repos/asf/ambari/blob/4528f4b0/ambari-server/src/main/resources/stacks/HDP/1.3.3/services/HDFS/package/scripts/snamenode.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.3/services/HDFS/package/scripts/snamenode.py
b/ambari-server/src/main/resources/stacks/HDP/1.3.3/services/HDFS/package/scripts/snamenode.py
index 8f682ec..b2a3bd1 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.3/services/HDFS/package/scripts/snamenode.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.3/services/HDFS/package/scripts/snamenode.py
@@ -35,7 +35,7 @@ class SNameNode(Script):
 
     env.set_params(params)
 
-    self.config(env)
+    self.configure(env)
     snamenode(action="start")
 
   def stop(self, env):
@@ -45,7 +45,7 @@ class SNameNode(Script):
 
     snamenode(action="stop")
 
-  def config(self, env):
+  def configure(self, env):
     import params
 
     env.set_params(params)

http://git-wip-us.apache.org/repos/asf/ambari/blob/4528f4b0/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/GANGLIA/package/scripts/ganglia_monitor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/GANGLIA/package/scripts/ganglia_monitor.py
b/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/GANGLIA/package/scripts/ganglia_monitor.py
index 6ae004b..4abdb9b 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/GANGLIA/package/scripts/ganglia_monitor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/GANGLIA/package/scripts/ganglia_monitor.py
@@ -31,7 +31,7 @@ class GangliaMonitor(Script):
 
     self.install_packages(env)
     env.set_params(params)
-    self.config(env)
+    self.configure(env)
 
   def start(self, env):
     ganglia_monitor_service.monitor("start")
@@ -56,7 +56,7 @@ class GangliaMonitor(Script):
       raise ComponentIsNotRunning()
 
 
-  def config(self, env):
+  def configure(self, env):
     import params
 
     ganglia.groups_and_users()
@@ -104,54 +104,17 @@ class GangliaMonitor(Script):
                       owner = "root",
                       group = params.user_group)
 
-    if params.is_nodemanager:
+    pure_slave = not (params.is_namenode_master and
+                      params.is_jtnode_master and
+                      params.is_rmnode_master and
+                      params.is_hsnode_master and
+                      params.is_hbase_master) and params.is_slave
+    if pure_slave:
       generate_daemon("gmond",
-                      name = "HDPNodeManager",
-                      role = "monitor",
-                      owner = "root",
-                      group = params.user_group)
-
-    if params.is_hsnode_master:
-      generate_daemon("gmond",
-                      name = "HDPHistoryServer",
-                      role = "monitor",
-                      owner = "root",
-                      group = params.user_group)
-
-    if params.is_slave:
-      generate_daemon("gmond",
-                      name = "HDPDataNode",
-                      role = "monitor",
-                      owner = "root",
-                      group = params.user_group)
-
-    if params.is_tasktracker:
-      generate_daemon("gmond",
-                      name = "HDPTaskTracker",
-                      role = "monitor",
-                      owner = "root",
-                      group = params.user_group)
-
-    if params.is_hbase_rs:
-      generate_daemon("gmond",
-                      name = "HDPHBaseRegionServer",
-                      role = "monitor",
-                      owner = "root",
-                      group = params.user_group)
-
-    if params.is_flume:
-      generate_daemon("gmond",
-                      name = "HDPFlumeServer",
-                      role = "monitor",
-                      owner = "root",
-                      group = params.user_group)
-
-    if params.is_jn_host:
-      generate_daemon("gmond",
-                      name = "HDPJournalNode",
-                      role = "monitor",
-                      owner = "root",
-                      group = params.user_group)
+                    name = "HDPSlaves",
+                    role = "monitor",
+                    owner = "root",
+                    group = params.user_group)
 
     Directory(path.join(params.ganglia_dir, "conf.d"),
               owner="root",

http://git-wip-us.apache.org/repos/asf/ambari/blob/4528f4b0/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/HDFS/package/scripts/datanode.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/HDFS/package/scripts/datanode.py
b/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/HDFS/package/scripts/datanode.py
index eaa27cf..57fdb35 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/HDFS/package/scripts/datanode.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/HDFS/package/scripts/datanode.py
@@ -32,7 +32,7 @@ class DataNode(Script):
     import params
 
     env.set_params(params)
-    self.config(env)
+    self.configure(env)
     datanode(action="start")
 
   def stop(self, env):
@@ -41,7 +41,7 @@ class DataNode(Script):
     env.set_params(params)
     datanode(action="stop")
 
-  def config(self, env):
+  def configure(self, env):
     import params
 
     datanode(action="configure")

http://git-wip-us.apache.org/repos/asf/ambari/blob/4528f4b0/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/HDFS/package/scripts/journalnode.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/HDFS/package/scripts/journalnode.py
b/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/HDFS/package/scripts/journalnode.py
index fd355cc..f2134d5 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/HDFS/package/scripts/journalnode.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/HDFS/package/scripts/journalnode.py
@@ -32,7 +32,7 @@ class JournalNode(Script):
     import params
 
     env.set_params(params)
-    self.config(env)
+    self.configure(env)
     service(
       action="start", name="journalnode", user=params.hdfs_user,
       create_pid_dir=True,
@@ -53,7 +53,7 @@ class JournalNode(Script):
       principal=params.dfs_journalnode_kerberos_principal
     )
 
-  def config(self, env):
+  def configure(self, env):
     import params
 
     Directory(params.jn_edits_dir,

http://git-wip-us.apache.org/repos/asf/ambari/blob/4528f4b0/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HDFS/package/scripts/namenode.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HDFS/package/scripts/namenode.py
b/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HDFS/package/scripts/namenode.py
index 9a1dba36..c799415 100644
--- a/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HDFS/package/scripts/namenode.py
+++ b/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HDFS/package/scripts/namenode.py
@@ -34,7 +34,7 @@ class NameNode(Script):
     import params
 
     env.set_params(params)
-    self.config(env)
+    self.configure(env)
     namenode(action="start")
 
   def stop(self, env):
@@ -43,7 +43,7 @@ class NameNode(Script):
     env.set_params(params)
     namenode(action="stop")
 
-  def config(self, env):
+  def configure(self, env):
     import params
 
     env.set_params(params)

http://git-wip-us.apache.org/repos/asf/ambari/blob/4528f4b0/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HDFS/package/scripts/zkfc_slave.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HDFS/package/scripts/zkfc_slave.py
b/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HDFS/package/scripts/zkfc_slave.py
index 1f9ba65..f415f24 100644
--- a/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HDFS/package/scripts/zkfc_slave.py
+++ b/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HDFS/package/scripts/zkfc_slave.py
@@ -32,7 +32,7 @@ class ZkfcSlave(Script):
     import params
 
     env.set_params(params)
-    self.config(env)
+    self.configure(env)
     service(
       action="start", name="zkfc", user=params.hdfs_user, create_pid_dir=True,
       create_log_dir=True
@@ -47,7 +47,7 @@ class ZkfcSlave(Script):
       create_log_dir=True
     )
 
-  def config(self, env):
+  def configure(self, env):
     pass
 
   def status(self, env):


Mime
View raw message