You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sm...@apache.org on 2014/04/11 00:53:53 UTC
[1/2] git commit: AMBARI-5433. Add Host failed on upgraded cluster on
Suse
Repository: ambari
Updated Branches:
refs/heads/branch-1.5.1 82e3af213 -> 2823a0664
AMBARI-5433. Add Host failed on upgraded cluster on Suse
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2823a066
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2823a066
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2823a066
Branch: refs/heads/branch-1.5.1
Commit: 2823a06648faa0f6608427dc50423f0edaa7ad4f
Parents: a29fa8c
Author: Sumit Mohanty <sm...@hortonworks.com>
Authored: Thu Apr 10 15:25:53 2014 -0700
Committer: Sumit Mohanty <sm...@hortonworks.com>
Committed: Thu Apr 10 15:53:24 2014 -0700
----------------------------------------------------------------------
ambari-server/src/main/python/ambari-server.py | 2 ++
ambari-server/src/test/python/TestAmbariServer.py | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/2823a066/ambari-server/src/main/python/ambari-server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/ambari-server.py b/ambari-server/src/main/python/ambari-server.py
index 72ae9b4..fb8c311 100755
--- a/ambari-server/src/main/python/ambari-server.py
+++ b/ambari-server/src/main/python/ambari-server.py
@@ -562,6 +562,8 @@ def update_ambari_properties():
if ("agent.fqdn.service.url" == prop_key):
#BUG-7179 what is agent.fqdn property in ambari.props?
new_properties.process_pair(GET_FQDN_SERVICE_URL, prop_value)
+ elif ("server.os_type" == prop_key):
+ new_properties.process_pair(OS_TYPE_PROPERTY, OS_FAMILY + OS_VERSION)
else:
new_properties.process_pair(prop_key, prop_value)
http://git-wip-us.apache.org/repos/asf/ambari/blob/2823a066/ambari-server/src/test/python/TestAmbariServer.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/TestAmbariServer.py b/ambari-server/src/test/python/TestAmbariServer.py
index d7de77f..f1b52cc 100644
--- a/ambari-server/src/test/python/TestAmbariServer.py
+++ b/ambari-server/src/test/python/TestAmbariServer.py
@@ -3207,14 +3207,14 @@ MIIFHjCCAwYCCQDpHKOBI+Lt0zANBgkqhkiG9w0BAQUFADBRMQswCQYDVQQGEwJV
properties = ["server.jdbc.user.name=ambari-server\n",
"server.jdbc.user.passwd=/etc/ambari-server/conf/password.dat\n",
"java.home=/usr/jdk64/jdk1.6.0_31\n",
- "server.os_type=redhat6\n",
+ "server.jdbc.database=ambari\n",
"ambari-server.user=ambari\n",
"agent.fqdn.service.url=URL\n"]
NEW_PROPERTY = 'some_new_property=some_value\n'
JDK_NAME_PROPERTY = 'jdk.name=jdk-6u31-linux-x64.bin\n'
JCE_NAME_PROPERTY = 'jce.name=jce_policy-6.zip\n'
- CHANGED_VALUE_PROPERTY = 'server.os_type=should_not_overwrite_value\n'
+ CHANGED_VALUE_PROPERTY = 'server.jdbc.database=should_not_overwrite_value\n'
get_conf_dir_mock.return_value = '/etc/ambari-server/conf'
[2/2] git commit: AMBARI-5431. storm-env.sh needs to be created at
/etc/storm/conf
Posted by sm...@apache.org.
AMBARI-5431. storm-env.sh needs to be created at /etc/storm/conf
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a29fa8cd
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a29fa8cd
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a29fa8cd
Branch: refs/heads/branch-1.5.1
Commit: a29fa8cda9325e00eade70b7f499e1384ad22387
Parents: 82e3af2
Author: Sumit Mohanty <sm...@hortonworks.com>
Authored: Thu Apr 10 14:57:51 2014 -0700
Committer: Sumit Mohanty <sm...@hortonworks.com>
Committed: Thu Apr 10 15:53:24 2014 -0700
----------------------------------------------------------------------
.../services/STORM/package/scripts/params.py | 1 +
.../2.1/services/STORM/package/scripts/storm.py | 27 +++++++-----
.../STORM/package/templates/storm-env.sh.j2 | 45 ++++++++++++++++++++
.../stacks/2.1/STORM/test_storm_drpc_server.py | 6 +++
.../stacks/2.1/STORM/test_storm_nimbus.py | 6 +++
.../stacks/2.1/STORM/test_storm_nimbus_prod.py | 8 +++-
.../2.1/STORM/test_storm_rest_api_service.py | 6 +++
.../stacks/2.1/STORM/test_storm_supervisor.py | 6 +++
.../2.1/STORM/test_storm_supervisor_prod.py | 8 +++-
.../stacks/2.1/STORM/test_storm_ui_server.py | 6 +++
10 files changed, 106 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/a29fa8cd/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/params.py
index c0f3e18..fcc8fbc 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/params.py
@@ -38,6 +38,7 @@ rest_api_port = "8745"
rest_api_admin_port = "8746"
rest_api_conf_file = format("{conf_dir}/config.yaml")
rest_lib_dir = "/usr/lib/storm/contrib/storm-rest"
+java_home = config['hostLevelParams']['java_home']
if 'ganglia_server_host' in config['clusterHostInfo'] and \
len(config['clusterHostInfo']['ganglia_server_host'])>0:
http://git-wip-us.apache.org/repos/asf/ambari/blob/a29fa8cd/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/storm.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/storm.py b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/storm.py
index bce272b..2e7f818 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/storm.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/storm.py
@@ -22,6 +22,7 @@ from resource_management import *
from yaml_config import yaml_config
import sys
+
def storm():
import params
@@ -32,19 +33,23 @@ def storm():
)
File(format("{conf_dir}/config.yaml"),
- content=Template("config.yaml.j2"),
- owner = params.storm_user,
- group = params.user_group
+ content=Template("config.yaml.j2"),
+ owner=params.storm_user,
+ group=params.user_group
+ )
+
+ yaml_config("storm.yaml",
+ conf_dir=params.conf_dir,
+ configurations=params.config['configurations']['storm-site'],
+ owner=params.storm_user,
+ group=params.user_group
)
- yaml_config( "storm.yaml",
- conf_dir = params.conf_dir,
- configurations = params.config['configurations']['storm-site'],
- owner = params.storm_user,
- group = params.user_group
+ TemplateConfig(format("{conf_dir}/storm-env.sh"),
+ owner=params.storm_user
)
-
+
if params.security_enabled:
- TemplateConfig( format("{conf_dir}/storm_jaas.conf"),
- owner = params.storm_user
+ TemplateConfig(format("{conf_dir}/storm_jaas.conf"),
+ owner=params.storm_user
)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/a29fa8cd/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/templates/storm-env.sh.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/templates/storm-env.sh.j2 b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/templates/storm-env.sh.j2
new file mode 100644
index 0000000..d429c47
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/templates/storm-env.sh.j2
@@ -0,0 +1,45 @@
+{#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#}
+
+
+#!/bin/bash
+#
+# Copyright 2014 The Apache Software Foundation
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Set Storm specific environment variables here.
+
+# The java implementation to use.
+export JAVA_HOME={{java_home}}
+
+# export STORM_CONF_DIR=""
http://git-wip-us.apache.org/repos/asf/ambari/blob/a29fa8cd/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_drpc_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_drpc_server.py b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_drpc_server.py
index 75ee5e6..e2617b1 100644
--- a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_drpc_server.py
+++ b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_drpc_server.py
@@ -156,6 +156,9 @@ class TestStormDrpcServer(RMFTestCase):
group = 'hadoop',
mode = None,
)
+ self.assertResourceCalled('TemplateConfig', '/etc/storm/conf/storm-env.sh',
+ owner = 'storm',
+ )
def assert_configure_secured(self):
self.assertResourceCalled('Directory', '/var/log/storm',
@@ -189,6 +192,9 @@ class TestStormDrpcServer(RMFTestCase):
group = 'hadoop',
mode = None,
)
+ self.assertResourceCalled('TemplateConfig', '/etc/storm/conf/storm-env.sh',
+ owner = 'storm',
+ )
self.assertResourceCalled('TemplateConfig', '/etc/storm/conf/storm_jaas.conf',
owner = 'storm',
)
http://git-wip-us.apache.org/repos/asf/ambari/blob/a29fa8cd/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_nimbus.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_nimbus.py b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_nimbus.py
index f5247ac..00b81ce 100644
--- a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_nimbus.py
+++ b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_nimbus.py
@@ -156,6 +156,9 @@ class TestStormNimbus(RMFTestCase):
group = 'hadoop',
mode = None,
)
+ self.assertResourceCalled('TemplateConfig', '/etc/storm/conf/storm-env.sh',
+ owner = 'storm',
+ )
def assert_configure_secured(self):
self.assertResourceCalled('Directory', '/var/log/storm',
@@ -189,6 +192,9 @@ class TestStormNimbus(RMFTestCase):
group = 'hadoop',
mode = None,
)
+ self.assertResourceCalled('TemplateConfig', '/etc/storm/conf/storm-env.sh',
+ owner = 'storm',
+ )
self.assertResourceCalled('TemplateConfig', '/etc/storm/conf/storm_jaas.conf',
owner = 'storm',
)
http://git-wip-us.apache.org/repos/asf/ambari/blob/a29fa8cd/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_nimbus_prod.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_nimbus_prod.py b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_nimbus_prod.py
index b236083..f40cfc7 100644
--- a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_nimbus_prod.py
+++ b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_nimbus_prod.py
@@ -125,6 +125,9 @@ class TestStormNimbus(RMFTestCase):
group = 'hadoop',
mode = None,
)
+ self.assertResourceCalled('TemplateConfig', '/etc/storm/conf/storm-env.sh',
+ owner = 'storm',
+ )
def assert_configure_secured(self):
self.assertResourceCalled('Directory', '/var/log/storm',
@@ -157,7 +160,10 @@ class TestStormNimbus(RMFTestCase):
content = 'InlineTemplateMock',
group = 'hadoop',
mode = None,
- )
+ )
+ self.assertResourceCalled('TemplateConfig', '/etc/storm/conf/storm-env.sh',
+ owner = 'storm',
+ )
self.assertResourceCalled('TemplateConfig', '/etc/storm/conf/storm_jaas.conf',
owner = 'storm',
)
http://git-wip-us.apache.org/repos/asf/ambari/blob/a29fa8cd/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_rest_api_service.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_rest_api_service.py b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_rest_api_service.py
index 243184f..b78d0b1 100644
--- a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_rest_api_service.py
+++ b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_rest_api_service.py
@@ -156,6 +156,9 @@ class TestStormRestApi(RMFTestCase):
group = 'hadoop',
mode = None,
)
+ self.assertResourceCalled('TemplateConfig', '/etc/storm/conf/storm-env.sh',
+ owner = 'storm',
+ )
def assert_configure_secured(self):
self.assertResourceCalled('Directory', '/var/log/storm',
@@ -189,6 +192,9 @@ class TestStormRestApi(RMFTestCase):
group = 'hadoop',
mode = None,
)
+ self.assertResourceCalled('TemplateConfig', '/etc/storm/conf/storm-env.sh',
+ owner = 'storm',
+ )
self.assertResourceCalled('TemplateConfig', '/etc/storm/conf/storm_jaas.conf',
owner = 'storm',
)
http://git-wip-us.apache.org/repos/asf/ambari/blob/a29fa8cd/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_supervisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_supervisor.py b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_supervisor.py
index 240b39f..8ebe10e 100644
--- a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_supervisor.py
+++ b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_supervisor.py
@@ -195,6 +195,9 @@ class TestStormSupervisor(RMFTestCase):
group = 'hadoop',
mode = None,
)
+ self.assertResourceCalled('TemplateConfig', '/etc/storm/conf/storm-env.sh',
+ owner = 'storm',
+ )
def assert_configure_secured(self):
self.assertResourceCalled('Directory', '/var/log/storm',
@@ -228,6 +231,9 @@ class TestStormSupervisor(RMFTestCase):
group = 'hadoop',
mode = None,
)
+ self.assertResourceCalled('TemplateConfig', '/etc/storm/conf/storm-env.sh',
+ owner = 'storm',
+ )
self.assertResourceCalled('TemplateConfig', '/etc/storm/conf/storm_jaas.conf',
owner = 'storm',
)
http://git-wip-us.apache.org/repos/asf/ambari/blob/a29fa8cd/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_supervisor_prod.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_supervisor_prod.py b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_supervisor_prod.py
index 6e3639c..b3df2c5 100644
--- a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_supervisor_prod.py
+++ b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_supervisor_prod.py
@@ -170,6 +170,9 @@ class TestStormSupervisor(RMFTestCase):
group = 'hadoop',
mode = None,
)
+ self.assertResourceCalled('TemplateConfig', '/etc/storm/conf/storm-env.sh',
+ owner = 'storm',
+ )
def assert_configure_secured(self):
self.assertResourceCalled('Directory', '/var/log/storm',
@@ -202,7 +205,10 @@ class TestStormSupervisor(RMFTestCase):
content = 'InlineTemplateMock',
group = 'hadoop',
mode = None,
- )
+ )
+ self.assertResourceCalled('TemplateConfig', '/etc/storm/conf/storm-env.sh',
+ owner = 'storm',
+ )
self.assertResourceCalled('TemplateConfig', '/etc/storm/conf/storm_jaas.conf',
owner = 'storm',
)
http://git-wip-us.apache.org/repos/asf/ambari/blob/a29fa8cd/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_ui_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_ui_server.py b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_ui_server.py
index 5403ebb..a9732fe 100644
--- a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_ui_server.py
+++ b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_ui_server.py
@@ -156,6 +156,9 @@ class TestStormUiServer(RMFTestCase):
group = 'hadoop',
mode = None,
)
+ self.assertResourceCalled('TemplateConfig', '/etc/storm/conf/storm-env.sh',
+ owner = 'storm',
+ )
def assert_configure_secured(self):
self.assertResourceCalled('Directory', '/var/log/storm',
@@ -189,6 +192,9 @@ class TestStormUiServer(RMFTestCase):
group = 'hadoop',
mode = None,
)
+ self.assertResourceCalled('TemplateConfig', '/etc/storm/conf/storm-env.sh',
+ owner = 'storm',
+ )
self.assertResourceCalled('TemplateConfig', '/etc/storm/conf/storm_jaas.conf',
owner = 'storm',
)