Repository: ambari Updated Branches: refs/heads/branch-2.1 3344bb805 -> 494f954d6
AMBARI-12342 - Rack Awareness : topology_script.py is not available on HMaster machine (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/494f954d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/494f954d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/494f954d Branch: refs/heads/branch-2.1 Commit: 494f954d6e9ab9d58167926d448460a4bded2cfe Parents: 3344bb8 Author: tbeerbower <tbeerbo...@hortonworks.com> Authored: Wed Jul 8 17:22:42 2015 -0400 Committer: tbeerbower <tbeerbo...@hortonworks.com> Committed: Wed Jul 8 17:24:24 2015 -0400 ---------------------------------------------------------------------- .../stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py | 3 +-- .../src/test/python/stacks/2.0.6/configs/secured.json | 10 +++++++++- .../stacks/2.0.6/hooks/before-START/test_before_start.py | 9 +++++++++ 3 files changed, 19 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/494f954d/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py index a3fdef9..f21e4b1 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py @@ -33,8 +33,7 @@ class BeforeStartHook(Hook): setup_hadoop() setup_configs() create_javahome_symlink() - if params.refresh_topology : - create_topology_script_and_mapping() + create_topology_script_and_mapping() if __name__ == "__main__": BeforeStartHook().execute() http://git-wip-us.apache.org/repos/asf/ambari/blob/494f954d/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json b/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json index 5da1679..c9e20e2 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json +++ b/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json @@ -944,7 +944,15 @@ "all_hosts": [ "c6401.ambari.apache.org", "c6402.ambari.apache.org" - ], + ], + "all_racks": [ + "/default/rack_01", + "/default/rack_02" + ], + "all_ipv4_ips": [ + "127.0.0.1", + "127.0.0.1" + ], "storm_ui_server_hosts": [ "c6401.ambari.apache.org" ], http://git-wip-us.apache.org/repos/asf/ambari/blob/494f954d/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py b/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py index 0895b7e..df39d2f 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py +++ b/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py @@ -158,6 +158,15 @@ class TestHookBeforeStart(RMFTestCase): owner = 'hdfs', group = 'hadoop', ) + self.assertResourceCalled('File', '/etc/hadoop/conf/topology_mappings.data', + owner = 'hdfs', + content = Template('topology_mappings.data.j2'), + group = 'hadoop', + ) + self.assertResourceCalled('File', '/etc/hadoop/conf/topology_script.py', + content = StaticFile('topology_script.py'), + mode = 0755, + ) self.assertNoMoreResources() def test_hook_default_hdfs(self):