AMBARI-7144. On Enable HA on a 3 node cluster - popup on warning for NN and SNN on same node appears.
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7490cfda Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7490cfda Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7490cfda Branch: refs/heads/branch-alerts-dev Commit: 7490cfdaf72d4f323edb40179c57266d8e18acfe Parents: ce77f0e Author: Srimanth Gunturi <sgunt...@hortonworks.com> Authored: Wed Sep 3 17:55:24 2014 -0700 Committer: Srimanth Gunturi <sgunt...@hortonworks.com> Committed: Wed Sep 3 17:55:30 2014 -0700 ---------------------------------------------------------------------- .../resources/stacks/HDP/2.0.6/services/stack_advisor.py | 8 -------- .../test/python/stacks/2.0.6/common/test_stack_advisor.py | 4 +--- 2 files changed, 1 insertion(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/7490cfda/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py index dd4fae3..d5be339 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py @@ -37,14 +37,6 @@ class HDP206StackAdvisor(DefaultStackAdvisor): nameNodeHosts = [component["StackServiceComponents"]["hostnames"] for component in componentsList if component["StackServiceComponents"]["component_name"] == "NAMENODE"] secondaryNameNodeHosts = [component["StackServiceComponents"]["hostnames"] for component in componentsList if component["StackServiceComponents"]["component_name"] == "SECONDARY_NAMENODE"] - if hostsCount > 1 and len(nameNodeHosts) > 0 and len(secondaryNameNodeHosts) > 0: - nameNodeHosts = nameNodeHosts[0] - secondaryNameNodeHosts = secondaryNameNodeHosts[0] - commonHosts = list(set(nameNodeHosts).intersection(secondaryNameNodeHosts)) - for host in commonHosts: - items.append( { "type": 'host-component', "level": 'WARN', "message": 'NameNode and Secondary NameNode should not be hosted on same machine', "component-name": 'NAMENODE', "host": str(host) } ) - items.append( { "type": 'host-component', "level": 'WARN', "message": 'NameNode and Secondary NameNode should not be hosted on same machine', "component-name": 'SECONDARY_NAMENODE', "host": str(host) } ) - # Validating cardinality for component in componentsList: if component["StackServiceComponents"]["cardinality"] is not None: http://git-wip-us.apache.org/repos/asf/ambari/blob/7490cfda/ambari-server/src/test/python/stacks/2.0.6/common/test_stack_advisor.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.0.6/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.0.6/common/test_stack_advisor.py index aa86242..510b439 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/common/test_stack_advisor.py +++ b/ambari-server/src/test/python/stacks/2.0.6/common/test_stack_advisor.py @@ -85,7 +85,7 @@ class TestHDP206StackAdvisor(TestCase): } self.assertHostLayout(expectedComponentsHostsMap, result) - def test_validationNamenodeAndSecondaryNamenode2Hosts(self): + def test_validationNamenodeAndSecondaryNamenode2Hosts_noMessagesForSameHost(self): servicesInfo = [ { "name": "HDFS", @@ -99,8 +99,6 @@ class TestHDP206StackAdvisor(TestCase): result = self.stackAdvisor.validateComponentLayout(services, hosts) expectedItems = [ - {"message": "NameNode and Secondary NameNode should not be hosted on same machine", "level": "WARN", "host": "host1"}, - {"message": "NameNode and Secondary NameNode should not be hosted on same machine", "level": "WARN", "host": "host1"}, {"message": "Host is not used", "level": "ERROR", "host": "host2"} ] self.assertValidationResult(expectedItems, result)