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 2014/01/16 16:06:52 UTC
[1/3] git commit: AMBARI-4313. HistoryServer alerts on 1.3.4 stack
(aonishuk)
Updated Branches:
refs/heads/trunk b01a7b7fa -> b5d3ecb9f
AMBARI-4313. HistoryServer alerts on 1.3.4 stack (aonishuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b5d3ecb9
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b5d3ecb9
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b5d3ecb9
Branch: refs/heads/trunk
Commit: b5d3ecb9fbbd78b837a3f6b8d205d9fa147b6717
Parents: 0ecb08e
Author: Andrew Onischuk <ao...@hortonworks.com>
Authored: Thu Jan 16 07:04:45 2014 -0800
Committer: Andrew Onischuk <ao...@hortonworks.com>
Committed: Thu Jan 16 07:06:34 2014 -0800
----------------------------------------------------------------------
.../HDP/1.3.4/services/NAGIOS/package/scripts/params.py | 2 +-
.../NAGIOS/package/templates/hadoop-services.cfg.j2 | 11 -----------
2 files changed, 1 insertion(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/b5d3ecb9/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/NAGIOS/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/NAGIOS/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/NAGIOS/package/scripts/params.py
index 0cc6515..8694dff 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/NAGIOS/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/NAGIOS/package/scripts/params.py
@@ -59,7 +59,7 @@ snamenode_port = get_port_from_url(config['configurations']['hdfs-site']["dfs.se
hbase_master_rpc_port = "60000"
rm_port = get_port_from_url(config['configurations']['yarn-site']['yarn.resourcemanager.webapp.address'])
nm_port = "8042"
-hs_port = get_port_from_url(config['configurations']['mapred-site']['mapreduce.jobhistory.webapp.address'])
+hs_port = get_port_from_url(config['configurations']['mapred-site']['mapreduce.history.server.http.address'])
journalnode_port = get_port_from_url(config['configurations']['hdfs-site']['dfs.journalnode.http-address'])
datanode_port = config['configurations']['hdfs-site']['ambari.dfs.datanode.http.port']
flume_port = "4159"
http://git-wip-us.apache.org/repos/asf/ambari/blob/b5d3ecb9/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/NAGIOS/package/templates/hadoop-services.cfg.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/NAGIOS/package/templates/hadoop-services.cfg.j2 b/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/NAGIOS/package/templates/hadoop-services.cfg.j2
index 76c1a88..d3e5e24 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/NAGIOS/package/templates/hadoop-services.cfg.j2
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.4/services/NAGIOS/package/templates/hadoop-services.cfg.j2
@@ -505,17 +505,6 @@ define service {
define service {
hostgroup_name historyserver2
use hadoop-service
- service_description JOBHISTORY::HistoryServer RPC latency
- servicegroups MAPREDUCE
- check_command check_rpcq_latency!JobHistoryServer!{{ hs_port }}!3000!5000!{{ str(hadoop_ssl_enabled).lower() }}!{{ nagios_keytab_path }}!{{ nagios_principal_name }}!{{ kinit_path_local }}!{{ str(security_enabled).lower() }}
- normal_check_interval 5
- retry_check_interval 1
- max_check_attempts 5
-}
-
-define service {
- hostgroup_name historyserver2
- use hadoop-service
service_description JOBHISTORY::HistoryServer process
servicegroups MAPREDUCE
check_command check_tcp!{{ hs_port }}!-w 1 -c 1
[2/3] git commit: AMBARI-4314. API script for Storm and Falcon does
not allow multinode cluster testing (aonishuk)
Posted by ao...@apache.org.
AMBARI-4314. API script for Storm and Falcon does not allow multinode
cluster testing (aonishuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0ecb08e4
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0ecb08e4
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0ecb08e4
Branch: refs/heads/trunk
Commit: 0ecb08e4c0cad254feae4518ee8eb5967de3a7a5
Parents: c4032cb
Author: Andrew Onischuk <ao...@hortonworks.com>
Authored: Thu Jan 16 06:55:01 2014 -0800
Committer: Andrew Onischuk <ao...@hortonworks.com>
Committed: Thu Jan 16 07:06:34 2014 -0800
----------------------------------------------------------------------
.../main/resources/scripts/add_service_api.py | 21 +++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/0ecb08e4/ambari-server/src/main/resources/scripts/add_service_api.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/scripts/add_service_api.py b/ambari-server/src/main/resources/scripts/add_service_api.py
index 4f06718..65faee7 100644
--- a/ambari-server/src/main/resources/scripts/add_service_api.py
+++ b/ambari-server/src/main/resources/scripts/add_service_api.py
@@ -34,11 +34,12 @@ COMPONENTS = [
"SUPERVISOR"
]
-COMPONENTS_TO_HOSTS = {
- "NIMBUS": HOSTNAME,
- "SUPERVISOR": HOSTNAME,
- #"SUPERVISOR": "dev01.hortonworks.com"
-}
+COMPONENTS_TO_HOSTS = [
+ {"NIMBUS": HOSTNAME},
+ {"SUPERVISOR": HOSTNAME},
+ #{"SUPERVISOR": "c6402.ambari.apache.org"},
+ #{"SUPERVISOR": "c6403.ambari.apache.org"}
+]
PROTOCOL = "http"
PORT = "8080"
@@ -48,7 +49,8 @@ STACK_VERSION = "2.0.8"
CONFIGS_TO_CHANGE = {
"storm-site":{
- "nimbus.host":HOSTNAME
+ #"storm.zookeeper.servers":"['c6401.amabri.apache.org','c6402.amabri.apache.org','c6403.amabri.apache.org']",
+ #"nimbus.host": "c6401.ambari.apache.org"
},
#"global":{
# "clientPort":"2182"
@@ -68,9 +70,10 @@ def main():
checked_call('curl -H \'X-Requested-By:anything\' -i -X POST -d \'{{"components":[{{"ServiceComponentInfo":{{"component_name":"{component}"}}}}]}}\' -u admin:admin {server_url}/api/v1/clusters/{cluster_name}/services?ServiceInfo/service_name={service_name}'.
format(service_name=SERVICE_NAME, component=component, server_url=SERVER_URL, cluster_name=CLUSTER_NAME))
- # assign components to hosts
- for component, host in COMPONENTS_TO_HOSTS.iteritems():
- checked_call('curl -H \'X-Requested-By:anything\' -i -X POST -d \'{{"host_components":[{{"HostRoles":{{"component_name":"{component}"}}}}]}}\' -u admin:admin {server_url}/api/v1/clusters/{cluster_name}/hosts?Hosts/host_name={host}'.
+ # assign components to hosts
+ for x in COMPONENTS_TO_HOSTS:
+ for component, host in x.iteritems():
+ checked_call('curl -H \'X-Requested-By:anything\' -i -X POST -d \'{{"host_components":[{{"HostRoles":{{"component_name":"{component}"}}}}]}}\' -u admin:admin {server_url}/api/v1/clusters/{cluster_name}/hosts?Hosts/host_name={host}'.
format(host=host, component=component, server_url=SERVER_URL, cluster_name=CLUSTER_NAME))
# update and create all the service-specific configurations
[3/3] git commit: AMBARI-4315. Proposed changes to new resource mgmt
logging (aonishuk)
Posted by ao...@apache.org.
AMBARI-4315. Proposed changes to new resource mgmt logging (aonishuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c4032cbd
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c4032cbd
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c4032cbd
Branch: refs/heads/trunk
Commit: c4032cbd28dc3f19d04689beeadfadb7f9867c83
Parents: b01a7b7
Author: Andrew Onischuk <ao...@hortonworks.com>
Authored: Thu Jan 16 06:52:18 2014 -0800
Committer: Andrew Onischuk <ao...@hortonworks.com>
Committed: Thu Jan 16 07:06:34 2014 -0800
----------------------------------------------------------------------
.../src/main/python/resource_management/core/environment.py | 6 +++---
.../resource_management/core/providers/package/__init__.py | 3 ---
.../resource_management/core/providers/package/yumrpm.py | 8 ++++++--
.../resource_management/core/providers/package/zypper.py | 8 ++++++--
.../main/python/resource_management/core/providers/system.py | 2 +-
.../src/main/python/resource_management/core/source.py | 6 ++++++
.../resource_management/libraries/functions/default.py | 4 +++-
.../resource_management/libraries/providers/xml_config.py | 2 +-
.../python/resource_management/libraries/script/script.py | 4 ++--
9 files changed, 28 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/c4032cbd/ambari-agent/src/main/python/resource_management/core/environment.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/python/resource_management/core/environment.py b/ambari-agent/src/main/python/resource_management/core/environment.py
index 597644e..e0e0aaa 100644
--- a/ambari-agent/src/main/python/resource_management/core/environment.py
+++ b/ambari-agent/src/main/python/resource_management/core/environment.py
@@ -130,19 +130,19 @@ class Environment(object):
# Run resource actions
while self.resource_list:
resource = self.resource_list.pop(0)
- self.log.debug("Running resource %r" % resource)
+ self.log.info("%s %s" % (resource, repr(resource.arguments).replace("': u'","': '")))
if resource.initial_wait:
time.sleep(resource.initial_wait)
if resource.not_if is not None and self._check_condition(
resource.not_if):
- self.log.debug("Skipping %s due to not_if" % resource)
+ self.log.info("Skipping %s due to not_if" % resource)
continue
if resource.only_if is not None and not self._check_condition(
resource.only_if):
- self.log.debug("Skipping %s due to only_if" % resource)
+ self.log.info("Skipping %s due to only_if" % resource)
continue
for action in resource.action:
http://git-wip-us.apache.org/repos/asf/ambari/blob/c4032cbd/ambari-agent/src/main/python/resource_management/core/providers/package/__init__.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/python/resource_management/core/providers/package/__init__.py b/ambari-agent/src/main/python/resource_management/core/providers/package/__init__.py
index 7ee85be..5ab2b27 100644
--- a/ambari-agent/src/main/python/resource_management/core/providers/package/__init__.py
+++ b/ambari-agent/src/main/python/resource_management/core/providers/package/__init__.py
@@ -37,17 +37,14 @@ class PackageProvider(Provider):
def action_install(self):
package_name = self.get_package_name_with_version()
- self.log.info("Installing package %s", package_name)
self.install_package(package_name)
def action_upgrade(self):
package_name = self.get_package_name_with_version()
- self.log.info("Upgrading package %s", package_name)
self.upgrade_package(package_name)
def action_remove(self):
package_name = self.get_package_name_with_version()
- self.log.info("Removing package %s", package_name)
self.remove_package(package_name)
def get_package_name_with_version(self):
http://git-wip-us.apache.org/repos/asf/ambari/blob/c4032cbd/ambari-agent/src/main/python/resource_management/core/providers/package/yumrpm.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/python/resource_management/core/providers/package/yumrpm.py b/ambari-agent/src/main/python/resource_management/core/providers/package/yumrpm.py
index a66cecc..2e7218e 100644
--- a/ambari-agent/src/main/python/resource_management/core/providers/package/yumrpm.py
+++ b/ambari-agent/src/main/python/resource_management/core/providers/package/yumrpm.py
@@ -28,10 +28,14 @@ REMOVE_CMD = "/usr/bin/yum -d 0 -e 0 -y erase %s"
class YumProvider(PackageProvider):
def install_package(self, name):
- shell.checked_call(INSTALL_CMD % (name))
+ cmd = INSTALL_CMD % (name)
+ self.log.info("Installing package %s ('%s')", name, cmd)
+ shell.checked_call(cmd)
def upgrade_package(self, name):
return self.install_package(name)
def remove_package(self, name):
- shell.checked_call(REMOVE_CMD % (name))
+ cmd = REMOVE_CMD % (name)
+ self.log.info("Removing package %s ('%s')", name, cmd)
+ shell.checked_call(cmd)
http://git-wip-us.apache.org/repos/asf/ambari/blob/c4032cbd/ambari-agent/src/main/python/resource_management/core/providers/package/zypper.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/python/resource_management/core/providers/package/zypper.py b/ambari-agent/src/main/python/resource_management/core/providers/package/zypper.py
index 7a5948c..665a563 100644
--- a/ambari-agent/src/main/python/resource_management/core/providers/package/zypper.py
+++ b/ambari-agent/src/main/python/resource_management/core/providers/package/zypper.py
@@ -28,10 +28,14 @@ REMOVE_CMD = "/usr/bin/zypper --quiet remove --no-confirm %s"
class ZypperProvider(PackageProvider):
def install_package(self, name):
- shell.checked_call(INSTALL_CMD % (name))
+ cmd = INSTALL_CMD % (name)
+ self.log.info("Installing package %s ('%s')", name, cmd)
+ shell.checked_call(cmd)
def upgrade_package(self, name):
return self.install_package(name)
def remove_package(self, name):
- shell.checked_call(REMOVE_CMD % (name))
+ cmd = REMOVE_CMD % (name)
+ self.log.info("Removing package %s ('%s')", name, cmd)
+ shell.checked_call(cmd)
http://git-wip-us.apache.org/repos/asf/ambari/blob/c4032cbd/ambari-agent/src/main/python/resource_management/core/providers/system.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/python/resource_management/core/providers/system.py b/ambari-agent/src/main/python/resource_management/core/providers/system.py
index f5a04d3..ca428e2 100644
--- a/ambari-agent/src/main/python/resource_management/core/providers/system.py
+++ b/ambari-agent/src/main/python/resource_management/core/providers/system.py
@@ -218,7 +218,7 @@ class ExecuteProvider(Provider):
if os.path.exists(self.resource.creates):
return
- self.log.info("Executing %s" % self.resource)
+ self.log.debug("Executing %s" % self.resource)
if self.resource.path != []:
if not self.resource.environment:
http://git-wip-us.apache.org/repos/asf/ambari/blob/c4032cbd/ambari-agent/src/main/python/resource_management/core/source.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/python/resource_management/core/source.py b/ambari-agent/src/main/python/resource_management/core/source.py
index a1c900d..ec7593a 100644
--- a/ambari-agent/src/main/python/resource_management/core/source.py
+++ b/ambari-agent/src/main/python/resource_management/core/source.py
@@ -45,6 +45,9 @@ class Source(object):
def __call__(self):
return self.get_content()
+
+ def __repr__(self):
+ return self.__class__.__name__+"('"+self.name+"')"
class StaticFile(Source):
@@ -123,6 +126,9 @@ else:
def __init__(self, name, extra_imports=[], **kwargs):
self.template_env = JinjaEnvironment(loader=FunctionLoader(lambda text: text))
super(InlineTemplate, self).__init__(name, extra_imports, **kwargs)
+
+ def __repr__(self):
+ return "InlineTemplate(...)"
class DownloadSource(Source):
http://git-wip-us.apache.org/repos/asf/ambari/blob/c4032cbd/ambari-agent/src/main/python/resource_management/libraries/functions/default.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/python/resource_management/libraries/functions/default.py b/ambari-agent/src/main/python/resource_management/libraries/functions/default.py
index 46a2fed..1520e00 100644
--- a/ambari-agent/src/main/python/resource_management/libraries/functions/default.py
+++ b/ambari-agent/src/main/python/resource_management/libraries/functions/default.py
@@ -23,6 +23,7 @@ Ambari Agent
__all__ = ["default"]
import logging
from resource_management.libraries.script import Script
+from resource_management.libraries.script.config_dictionary import UnknownConfiguration
default_subdict='/configurations/global'
log = logging.getLogger('resource_management')
@@ -38,7 +39,8 @@ def default(name, default_value):
if x in curr_dict:
curr_dict = curr_dict[x]
else:
- log.debug("Cannot find configuration: '%s'. Using '%s' value as default" % (name, default_value))
+ if not isinstance(default_value, UnknownConfiguration):
+ log.info("Cannot find configuration: '%s'. Using '%s' value as default" % (name, default_value))
return default_value
return curr_dict
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/c4032cbd/ambari-agent/src/main/python/resource_management/libraries/providers/xml_config.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/python/resource_management/libraries/providers/xml_config.py b/ambari-agent/src/main/python/resource_management/libraries/providers/xml_config.py
index 8c00e7a..b2b8609 100644
--- a/ambari-agent/src/main/python/resource_management/libraries/providers/xml_config.py
+++ b/ambari-agent/src/main/python/resource_management/libraries/providers/xml_config.py
@@ -40,7 +40,7 @@ class XmlConfigProvider(Provider):
</configuration>''', extra_imports=[time], configurations_dict=self.resource.configurations)
- self.log.debug(format("Generating config: {conf_dir}/{filename}"))
+ self.log.info(format("Generating config: {conf_dir}/{filename}"))
with Environment.get_instance_copy() as env:
File (format("{conf_dir}/{filename}"),
http://git-wip-us.apache.org/repos/asf/ambari/blob/c4032cbd/ambari-agent/src/main/python/resource_management/libraries/script/script.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/python/resource_management/libraries/script/script.py b/ambari-agent/src/main/python/resource_management/libraries/script/script.py
index 702aafe..86883c4 100644
--- a/ambari-agent/src/main/python/resource_management/libraries/script/script.py
+++ b/ambari-agent/src/main/python/resource_management/libraries/script/script.py
@@ -63,9 +63,9 @@ class Script(object):
# set up logging (two separate loggers for stderr and stdout with different loglevels)
logger = logging.getLogger('resource_management')
logger.setLevel(logging.DEBUG)
- formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
+ formatter = logging.Formatter('%(asctime)s - %(message)s')
chout = logging.StreamHandler(sys.stdout)
- chout.setLevel(logging.DEBUG)
+ chout.setLevel(logging.INFO)
chout.setFormatter(formatter)
cherr = logging.StreamHandler(sys.stderr)
cherr.setLevel(logging.ERROR)