You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by fb...@apache.org on 2015/01/08 19:37:46 UTC
ambari git commit: AMBARI-9038 [WinGA] Dashboard doesn't load after
installation on Windows
Repository: ambari
Updated Branches:
refs/heads/trunk d49eeb6a2 -> 273e1b107
AMBARI-9038 [WinGA] Dashboard doesn't load after installation on Windows
Added the missing setting required for the OS detection to work properly
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/273e1b10
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/273e1b10
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/273e1b10
Branch: refs/heads/trunk
Commit: 273e1b1070c1433fa1c99f2f8352479f37bce465
Parents: d49eeb6
Author: Florian Barca <fb...@hortonworks.com>
Authored: Thu Jan 8 10:37:28 2015 -0800
Committer: Florian Barca <fb...@hortonworks.com>
Committed: Thu Jan 8 10:37:28 2015 -0800
----------------------------------------------------------------------
.../src/main/python/ambari_server/serverConfiguration.py | 1 +
.../src/main/python/ambari_server/serverSetup.py | 10 +++++-----
ambari-server/src/test/python/TestAmbariServer.py | 3 +++
3 files changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/273e1b10/ambari-server/src/main/python/ambari_server/serverConfiguration.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/ambari_server/serverConfiguration.py b/ambari-server/src/main/python/ambari_server/serverConfiguration.py
index aab1167..5e5c440 100644
--- a/ambari-server/src/main/python/ambari_server/serverConfiguration.py
+++ b/ambari-server/src/main/python/ambari_server/serverConfiguration.py
@@ -43,6 +43,7 @@ BLIND_PASSWORD = "*****"
# Common messages
PRESS_ENTER_MSG = "Press <enter> to continue."
+OS_FAMILY_PROPERTY = "server.os_family"
OS_TYPE_PROPERTY = "server.os_type"
BOOTSTRAP_DIR_PROPERTY = "bootstrap.dir"
http://git-wip-us.apache.org/repos/asf/ambari/blob/273e1b10/ambari-server/src/main/python/ambari_server/serverSetup.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/ambari_server/serverSetup.py b/ambari-server/src/main/python/ambari_server/serverSetup.py
index 37e46f5..2b9c950 100644
--- a/ambari-server/src/main/python/ambari_server/serverSetup.py
+++ b/ambari-server/src/main/python/ambari_server/serverSetup.py
@@ -329,12 +329,12 @@ def configure_os_settings():
except (KeyError):
print_error_msg("os_type is not set in the properties file. Setting it now.")
- if OSCheck.is_windows_family():
- master_os_type = OS_TYPE + OS_VERSION
- else:
- # MacOS not supported
- master_os_type = OS_FAMILY + OS_VERSION
+ # to check server/agent compatibility
+ master_os_family = OS_FAMILY + OS_VERSION
+ # to check supported os_types
+ master_os_type = OS_TYPE + OS_VERSION
+ write_property(OS_FAMILY_PROPERTY, master_os_family)
write_property(OS_TYPE_PROPERTY, master_os_type)
return 0
http://git-wip-us.apache.org/repos/asf/ambari/blob/273e1b10/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 9290558..5f1fa38 100644
--- a/ambari-server/src/test/python/TestAmbariServer.py
+++ b/ambari-server/src/test/python/TestAmbariServer.py
@@ -2170,6 +2170,9 @@ MIIFHjCCAwYCCQDpHKOBI+Lt0zANBgkqhkiG9w0BAQUFADBRMQswCQYDVQQGEwJV
rcode = ambari_server.configure_os_settings()
self.assertEqual(0, rcode)
self.assertTrue(write_property_mock.called)
+ self.assertEqual(2, write_property_mock.call_count)
+ self.assertEquals(write_property_mock.call_args_list[0][0][0], "server.os_family")
+ self.assertEquals(write_property_mock.call_args_list[1][0][0], "server.os_type")
@patch("__builtin__.open")