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/09/02 16:49:57 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/branch-2.1 516405589 -> 3e9e182d6
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/3e9e182d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3e9e182d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3e9e182d
Branch: refs/heads/branch-2.1
Commit: 3e9e182d6acdd48402e80529c384357125a3e406
Parents: 5164055
Author: Lisnichenko Dmitro <dl...@hortonworks.com>
Authored: Wed Sep 2 17:48:35 2015 +0300
Committer: Lisnichenko Dmitro <dl...@hortonworks.com>
Committed: Wed Sep 2 17:48:35 2015 +0300
----------------------------------------------------------------------
.../python/ambari_agent/HostCheckReportFileHandler.py | 4 +++-
ambari-agent/src/main/python/ambari_agent/HostInfo.py | 5 +++--
.../resources/custom_actions/scripts/check_host.py | 14 ++++++++------
3 files changed, 14 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/3e9e182d/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/3e9e182d/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 b979242..e9d4110 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,7 +144,8 @@ class HostInfoLinux(HostInfo):
DEFAULT_USERS = [
"hive", "ambari-qa", "oozie", "hbase", "hcat", "mapred",
"hdfs", "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
http://git-wip-us.apache.org/repos/asf/ambari/blob/3e9e182d/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 1e54180..4d3cf76 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
@@ -74,32 +74,34 @@ 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 packages that start with below prefixes:
IGNORE_PACKAGES = [
- "epel-release", "nagios",
+ "epel-release", "nagios", "ambari-server", "ambari-agent",
# ganglia related:
"ganglia", "libganglia", "libconfuse", "perl", "rrdtool", "python-rrdtool", "gmetad", "librrd", "rrdcached"
]
# Additional packages to look for (search packages that start with these)
ADDITIONAL_PACKAGES = [
- "ambari-log4j", "hadoop", "zookeeper", "oozie", "webhcat"
+ "ambari-log4j"
]
# ignore repos from the list of repos to be cleaned
IGNORE_REPOS = [
- "ambari", "HDP-UTILS"
+ "AMBARI", "HDP-UTILS", "BASE"
]
def __init__(self):