You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by dm...@apache.org on 2015/08/03 14:48:03 UTC

ambari git commit: AMBARI-12581. Host check/clean-up logic should clean up new packages and folder names (dlysnichenko)

Repository: ambari
Updated Branches:
  refs/heads/trunk 316404fe5 -> fb28fe7ac


AMBARI-12581. Host check/clean-up logic should clean up new packages and folder names (dlysnichenko)


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

Branch: refs/heads/trunk
Commit: fb28fe7ac286e679112a7da19f72cabbf3caa8ee
Parents: 316404f
Author: Lisnichenko Dmitro <dl...@hortonworks.com>
Authored: Mon Aug 3 15:47:36 2015 +0300
Committer: Lisnichenko Dmitro <dl...@hortonworks.com>
Committed: Mon Aug 3 15:48:24 2015 +0300

----------------------------------------------------------------------
 .../python/ambari_agent/HostCheckReportFileHandler.py |  4 +++-
 ambari-agent/src/main/python/ambari_agent/HostInfo.py |  7 ++++---
 .../resources/custom_actions/scripts/check_host.py    | 14 ++++++++------
 3 files changed, 15 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/fb28fe7a/ambari-agent/src/main/python/ambari_agent/HostCheckReportFileHandler.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/python/ambari_agent/HostCheckReportFileHandler.py b/ambari-agent/src/main/python/ambari_agent/HostCheckReportFileHandler.py
index a4b898d..794e427 100644
--- a/ambari-agent/src/main/python/ambari_agent/HostCheckReportFileHandler.py
+++ b/ambari-agent/src/main/python/ambari_agent/HostCheckReportFileHandler.py
@@ -80,7 +80,7 @@ class HostCheckReportFileHandler:
       with open(self.hostCheckCustomActionsFilePath, 'wb') as configfile:
         config.write(configfile)
     except Exception, err:
-      logger.error("Can't write host check file at %s :%s " % (self.hostCheckFilePath, err.message))
+      logger.error("Can't write host check file at %s :%s " % (self.hostCheckCustomActionsFilePath, err.message))
       traceback.print_exc()
 
   def writeHostCheckFile(self, hostInfo):
@@ -117,6 +117,8 @@ class HostCheckReportFileHandler:
         items = []
         for itemDetail in hostInfo['stackFoldersAndFiles']:
           items.append(itemDetail['name'])
+        if os.path.exists('/usr/hdp'):
+          items.append('/usr/hdp')
         config.add_section('directories')
         config.set('directories', 'dir_list', ','.join(items))
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb28fe7a/ambari-agent/src/main/python/ambari_agent/HostInfo.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/python/ambari_agent/HostInfo.py b/ambari-agent/src/main/python/ambari_agent/HostInfo.py
index 385c758..b87b599 100644
--- a/ambari-agent/src/main/python/ambari_agent/HostInfo.py
+++ b/ambari-agent/src/main/python/ambari_agent/HostInfo.py
@@ -132,7 +132,7 @@ class HostInfoLinux(HostInfo):
     "rrdcached", "hcat", "ambari-qa", "sqoop-ambari-qa", "sqoop-ambari_qa",
     "webhcat", "hadoop-hdfs", "hadoop-yarn", "hadoop-mapreduce",
     "knox", "yarn", "hive-webhcat", "kafka", "slider", "storm-slider-client",
-    "ganglia-web"
+    "ganglia-web", "mahout", "spark", "pig", "phoenix", "ranger", "accumulo"
   ]
 
 
@@ -144,9 +144,10 @@ class HostInfoLinux(HostInfo):
   DEFAULT_USERS = [
     "hive", "ambari-qa", "oozie", "hbase", "hcat", "mapred",
     "hdfs", "rrdcached", "zookeeper", "flume", "sqoop", "sqoop2",
-    "hue", "yarn", "tez", "storm", "falcon", "kafka", "knox"
+    "hue", "yarn", "tez", "storm", "falcon", "kafka", "knox", "ams",
+    "hadoop", "spark", "accumulo", "atlas", "mahout", "ranger", "kms"
   ]
-
+  
   # Default set of directories that are checked for existence of files and folders
   DEFAULT_DIRS = [
     "/etc", "/var/run", "/var/log", "/usr/lib", "/var/lib", "/var/tmp", "/tmp", "/var",

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb28fe7a/ambari-server/src/main/resources/custom_actions/scripts/check_host.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/custom_actions/scripts/check_host.py b/ambari-server/src/main/resources/custom_actions/scripts/check_host.py
index 40bea98..9548e3f 100644
--- a/ambari-server/src/main/resources/custom_actions/scripts/check_host.py
+++ b/ambari-server/src/main/resources/custom_actions/scripts/check_host.py
@@ -66,31 +66,33 @@ THP_FILE = "/sys/kernel/mm/redhat_transparent_hugepage/enabled"
 class CheckHost(Script):
   # Packages that are used to find repos (then repos are used to find other packages)
   PACKAGES = [
-    "hadoop_2_2_*", "hadoop-2-2-.*", "zookeeper_2_2_*", "zookeeper-2-2-.*",
-    "hadoop", "zookeeper", "webhcat", "*-manager-server-db", "*-manager-daemons"
+    "hadoop", "zookeeper", "webhcat", "oozie", "ambari", "*-manager-server-db",
+    "*-manager-daemons", "mahout", "spark", "falcon", "hbase", "kafka", "knox",
+    "slider", "sqoop", "storm", "pig", "flume","hcatalog", "phoenix", "ranger",
+    "accumulo", "hive_*"
   ]
   
 
   # ignore packages from repos whose names start with these strings
   IGNORE_PACKAGES_FROM_REPOS = [
-    "ambari", "installed"
+    "installed"
   ]
   
 
   # ignore required packages
   IGNORE_PACKAGES = [
-    "epel-release"
+    "epel-release", "ambari-server", "ambari-agent"
   ]
   
   # Additional packages to look for (search packages that start with these)
   ADDITIONAL_PACKAGES = [
     "rrdtool", "rrdtool-python", "ganglia", "gmond", "gweb", "libconfuse",
-    "ambari-log4j", "hadoop", "zookeeper", "oozie", "webhcat"
+    "ambari-log4j"
   ]
   
   # ignore repos from the list of repos to be cleaned
   IGNORE_REPOS = [
-    "ambari", "HDP-UTILS"
+    "HDP-UTILS", "AMBARI", "BASE"
   ]
   
   def __init__(self):