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 2016/03/21 14:35:07 UTC

[1/2] ambari git commit: AMBARI-15484. enable ssl for ambari does not update the tez view url in tez-site.xml (aonishuk)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.2 4dc612602 -> 75da576d7
  refs/heads/trunk e7bbfe10d -> 11c1066c4


AMBARI-15484. enable ssl for ambari does not update the tez view url in tez-site.xml (aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/11c1066c
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/11c1066c
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/11c1066c

Branch: refs/heads/trunk
Commit: 11c1066c4d246418492e6ba4e24aac5a49557f64
Parents: e7bbfe1
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Mon Mar 21 15:35:01 2016 +0200
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Mon Mar 21 15:35:01 2016 +0200

----------------------------------------------------------------------
 .../src/main/python/ambari_server/setupHttps.py |  7 ++++
 .../stacks/HDP/2.2/services/stack_advisor.py    |  2 ++
 .../src/test/python/TestAmbariServer.py         | 34 ++++++++++++--------
 .../stacks/2.2/common/test_stack_advisor.py     | 31 ++++++++++--------
 4 files changed, 48 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/11c1066c/ambari-server/src/main/python/ambari_server/setupHttps.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/ambari_server/setupHttps.py b/ambari-server/src/main/python/ambari_server/setupHttps.py
index 5e293fb..ce676d2 100644
--- a/ambari-server/src/main/python/ambari_server/setupHttps.py
+++ b/ambari-server/src/main/python/ambari_server/setupHttps.py
@@ -408,6 +408,8 @@ def setup_https(args):
       client_api_ssl_port = DEFAULT_SSL_API_PORT if properties.get_property(SSL_API_PORT) in ("") \
             else properties.get_property(SSL_API_PORT)
       api_ssl = properties.get_property(SSL_API) in ['true']
+      client_api_ssl_port_old_value = properties.get_property(SSL_API_PORT)
+      api_ssl_old_value = properties.get_property(SSL_API)
       cert_was_imported = False
       cert_must_import = True
       if api_ssl:
@@ -438,6 +440,11 @@ def setup_https(args):
       f = open(conf_file, 'w')
       properties.store(f, "Changed by 'ambari-server setup-https' command")
 
+      if api_ssl_old_value != properties.get_property(SSL_API) \
+          or client_api_ssl_port_old_value != properties.get_property(SSL_API_PORT):
+        print "Ambari server URL changed. To make use of the Tez View in Ambari " \
+              "please update the property tez.tez-ui.history-url.base in tez-site"
+
       ambari_user = read_ambari_user()
       if ambari_user:
         adjust_directory_permissions(ambari_user)

http://git-wip-us.apache.org/repos/asf/ambari/blob/11c1066c/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
index 0524d3c..d6bc713 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
@@ -942,6 +942,8 @@ class HDP22StackAdvisor(HDP21StackAdvisor):
                         {"config-name": 'tez.task.resource.memory.mb', "item": self.validatorLessThenDefaultValue(properties, recommendedDefaults, 'tez.task.resource.memory.mb')},
                         {"config-name": 'tez.runtime.io.sort.mb', "item": self.validatorLessThenDefaultValue(properties, recommendedDefaults, 'tez.runtime.io.sort.mb')},
                         {"config-name": 'tez.runtime.unordered.output.buffer.size-mb', "item": self.validatorLessThenDefaultValue(properties, recommendedDefaults, 'tez.runtime.unordered.output.buffer.size-mb')},]
+    if "tez.tez-ui.history-url.base" in recommendedDefaults:
+      validationItems.append({"config-name": 'tez.tez-ui.history-url.base', "item": self.validatorEqualsToRecommendedItem(properties, recommendedDefaults, 'tez.tez-ui.history-url.base')})
 
     tez_site = properties
     prop_name1 = 'tez.am.resource.memory.mb'

http://git-wip-us.apache.org/repos/asf/ambari/blob/11c1066c/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 ea9f99a..ac24f7d 100644
--- a/ambari-server/src/test/python/TestAmbariServer.py
+++ b/ambari-server/src/test/python/TestAmbariServer.py
@@ -2127,18 +2127,20 @@ class TestAmbariServer(TestCase):
     read_ambari_user_method.return_value = "user"
     #Case #1: if client ssl is on and user didnt choose
     #disable ssl option and choose import certs and keys
-    p.get_property.side_effect = ["key_dir", "5555", "6666", "true"]
+    p.get_property.side_effect = ["key_dir", "5555", "6666", "true", "5555", "true", "true", "5555"]
     get_YN_input_mock.side_effect = [False, True]
     get_validated_string_input_mock.side_effect = ["4444"]
     get_property_expected = "[call('security.server.keys_dir'),\n" + \
                             " call('client.api.ssl.port'),\n" + \
-                            " call('client.api.ssl.port'),\n call('api.ssl')]"
+                            " call('client.api.ssl.port'),\n call('api.ssl'),\n" + \
+                            " call('client.api.ssl.port'),\n call('api.ssl'),\n" + \
+                            " call('api.ssl'),\n call('client.api.ssl.port')]"
     process_pair_expected = "[call('client.api.ssl.port', '4444')]"
     set_silent(False)
     setup_https(args)
 
     self.assertTrue(p.process_pair.called)
-    self.assertTrue(p.get_property.call_count == 4)
+    self.assertTrue(p.get_property.call_count == 8)
     self.assertEqual(str(p.get_property.call_args_list), get_property_expected)
     self.assertEqual(str(p.process_pair.call_args_list), process_pair_expected)
     self.assertTrue(p.store.called)
@@ -2150,16 +2152,18 @@ class TestAmbariServer(TestCase):
     import_cert_and_key_action_mock.reset_mock()
 
     #Case #2: if client ssl is on and user choose to disable ssl option
-    p.get_property.side_effect = ["key_dir", "", "true"]
+    p.get_property.side_effect = ["key_dir", "", "true", "", "true", "false", ""]
     get_YN_input_mock.side_effect = [True]
     get_validated_string_input_mock.side_effect = ["4444"]
     get_property_expected = "[call('security.server.keys_dir'),\n" + \
-                            " call('client.api.ssl.port'),\n call('api.ssl')]"
+                            " call('client.api.ssl.port'),\n call('api.ssl'),\n" + \
+                            " call('client.api.ssl.port'),\n call('api.ssl'),\n" + \
+                            " call('api.ssl')]"
     process_pair_expected = "[call('api.ssl', 'false')]"
     setup_https(args)
 
     self.assertTrue(p.process_pair.called)
-    self.assertTrue(p.get_property.call_count == 3)
+    self.assertTrue(p.get_property.call_count == 6)
     self.assertEqual(str(p.get_property.call_args_list), get_property_expected)
     self.assertEqual(str(p.process_pair.call_args_list), process_pair_expected)
     self.assertTrue(p.store.called)
@@ -2172,16 +2176,18 @@ class TestAmbariServer(TestCase):
 
     #Case #3: if client ssl is off and user choose option
     #to import cert and keys
-    p.get_property.side_effect = ["key_dir", "", None]
+    p.get_property.side_effect = ["key_dir", "", None, "", None, None, ""]
     get_YN_input_mock.side_effect = [True, True]
     get_validated_string_input_mock.side_effect = ["4444"]
     get_property_expected = "[call('security.server.keys_dir'),\n" + \
-                            " call('client.api.ssl.port'),\n call('api.ssl')]"
+                            " call('client.api.ssl.port'),\n call('api.ssl'),\n" + \
+                            " call('client.api.ssl.port'),\n call('api.ssl'),\n" + \
+                            " call('api.ssl'),\n call('client.api.ssl.port')]"
     process_pair_expected = "[call('client.api.ssl.port', '4444')]"
     setup_https(args)
 
     self.assertTrue(p.process_pair.called)
-    self.assertTrue(p.get_property.call_count == 3)
+    self.assertTrue(p.get_property.call_count == 7)
     self.assertEqual(str(p.get_property.call_args_list), get_property_expected)
     self.assertEqual(str(p.process_pair.call_args_list), process_pair_expected)
     self.assertTrue(p.store.called)
@@ -2194,16 +2200,17 @@ class TestAmbariServer(TestCase):
 
     #Case #4: if client ssl is off and
     #user did not choose option to import cert and keys
-    p.get_property.side_effect = ["key_dir", "", None]
+    p.get_property.side_effect = ["key_dir", "", None, "", None]
     get_YN_input_mock.side_effect = [False]
     get_validated_string_input_mock.side_effect = ["4444"]
     get_property_expected = "[call('security.server.keys_dir'),\n" + \
+                            " call('client.api.ssl.port'),\n call('api.ssl'),\n" + \
                             " call('client.api.ssl.port'),\n call('api.ssl')]"
     process_pair_expected = "[]"
     setup_https(args)
 
     self.assertFalse(p.process_pair.called)
-    self.assertTrue(p.get_property.call_count == 3)
+    self.assertTrue(p.get_property.call_count == 5)
     self.assertEqual(str(p.get_property.call_args_list), get_property_expected)
     self.assertEqual(str(p.process_pair.call_args_list), process_pair_expected)
     self.assertFalse(p.store.called)
@@ -2215,16 +2222,17 @@ class TestAmbariServer(TestCase):
     import_cert_and_key_action_mock.reset_mock()
 
     #Case #5: if cert must be imported but didnt imported
-    p.get_property.side_effect = ["key_dir", "", "false"]
+    p.get_property.side_effect = ["key_dir", "", "false", "", "false"]
     get_YN_input_mock.side_effect = [True]
     import_cert_and_key_action_mock.side_effect = [False]
     get_validated_string_input_mock.side_effect = ["4444"]
     get_property_expected = "[call('security.server.keys_dir'),\n" + \
+                            " call('client.api.ssl.port'),\n call('api.ssl'),\n" + \
                             " call('client.api.ssl.port'),\n call('api.ssl')]"
     process_pair_expected = "[call('client.api.ssl.port', '4444')]"
     self.assertFalse(setup_https(args))
     self.assertTrue(p.process_pair.called)
-    self.assertTrue(p.get_property.call_count == 3)
+    self.assertTrue(p.get_property.call_count == 5)
     self.assertEqual(str(p.get_property.call_args_list), get_property_expected)
     self.assertEqual(str(p.process_pair.call_args_list), process_pair_expected)
     self.assertFalse(p.store.called)

http://git-wip-us.apache.org/repos/asf/ambari/blob/11c1066c/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
index 5d471c8..1d3789e 100644
--- a/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
+++ b/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
@@ -3118,26 +3118,31 @@ class TestHDP22StackAdvisor(TestCase):
     recommendedDefaults = {'tez.task.resource.memory.mb': '1024',
                            'tez.runtime.io.sort.mb' : '256',
                            'tez.runtime.unordered.output.buffer.size-mb' : '256',
-                           'tez.am.resource.memory.mb' : '1024'}
+                           'tez.am.resource.memory.mb' : '1024',
+                           'tez.tez-ui.history-url.base' : 'https://host:8443/#/main/views/TEZ/0.7.0.2.3.0.0-2155/TEZ_CLUSTER_INSTANCE'}
 
     properties = {'tez.task.resource.memory.mb': '2050',
                   'tez.runtime.io.sort.mb' : '256',
                   'tez.runtime.unordered.output.buffer.size-mb' : '256',
-                  'tez.am.resource.memory.mb' : '2050'}
+                  'tez.am.resource.memory.mb' : '2050',
+                  'tez.tez-ui.history-url.base' : 'http://host:8080/#/main/views/TEZ/0.7.0.2.3.0.0-2155/TEZ_CLUSTER_INSTANCE'}
 
 
-    res_expected = [{'config-name': 'tez.am.resource.memory.mb',
-                 'config-type': 'tez-site',
-                 'level': 'WARN',
-                 'message': "tez.am.resource.memory.mb should be less than YARN max allocation size (2048)",
-                 'type': 'configuration',
-                 'level': 'WARN'},
+    res_expected = [{'config-name': 'tez.tez-ui.history-url.base',
+                     'config-type': 'tez-site',
+                     'level': 'WARN',
+                     'message': "It is recommended to set value https://host:8443/#/main/views/TEZ/0.7.0.2.3.0.0-2155/TEZ_CLUSTER_INSTANCE for property tez.tez-ui.history-url.base",
+                     'type': 'configuration'},
+                    {'config-name': 'tez.am.resource.memory.mb',
+                     'config-type': 'tez-site',
+                     'level': 'WARN',
+                     'message': "tez.am.resource.memory.mb should be less than YARN max allocation size (2048)",
+                     'type': 'configuration'},
                     {'config-name': 'tez.task.resource.memory.mb',
-                 'config-type': 'tez-site',
-                 'level': 'WARN',
-                 'message': "tez.task.resource.memory.mb should be less than YARN max allocation size (2048)",
-                 'type': 'configuration',
-                 'level': 'WARN'}]
+                     'config-type': 'tez-site',
+                     'level': 'WARN',
+                     'message': "tez.task.resource.memory.mb should be less than YARN max allocation size (2048)",
+                     'type': 'configuration'}]
 
     res = self.stackAdvisor.validateTezConfigurations(properties, recommendedDefaults, configurations, '', '')
     self.assertEquals(res, res_expected)


[2/2] ambari git commit: AMBARI-15484. enable ssl for ambari does not update the tez view url in tez-site.xml (aonishuk)

Posted by ao...@apache.org.
AMBARI-15484. enable ssl for ambari does not update the tez view url in tez-site.xml (aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/75da576d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/75da576d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/75da576d

Branch: refs/heads/branch-2.2
Commit: 75da576d7cdc152bbb58d5416ab03d5bb685ef41
Parents: 4dc6126
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Mon Mar 21 15:35:04 2016 +0200
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Mon Mar 21 15:35:04 2016 +0200

----------------------------------------------------------------------
 .../src/main/python/ambari_server/setupHttps.py |  7 ++++
 .../stacks/HDP/2.2/services/stack_advisor.py    |  2 ++
 .../src/test/python/TestAmbariServer.py         | 34 ++++++++++++--------
 .../stacks/2.2/common/test_stack_advisor.py     | 31 ++++++++++--------
 4 files changed, 48 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/75da576d/ambari-server/src/main/python/ambari_server/setupHttps.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/ambari_server/setupHttps.py b/ambari-server/src/main/python/ambari_server/setupHttps.py
index c9fe421..2fb4680 100644
--- a/ambari-server/src/main/python/ambari_server/setupHttps.py
+++ b/ambari-server/src/main/python/ambari_server/setupHttps.py
@@ -408,6 +408,8 @@ def setup_https(args):
       client_api_ssl_port = DEFAULT_SSL_API_PORT if properties.get_property(SSL_API_PORT) in ("") \
             else properties.get_property(SSL_API_PORT)
       api_ssl = properties.get_property(SSL_API) in ['true']
+      client_api_ssl_port_old_value = properties.get_property(SSL_API_PORT)
+      api_ssl_old_value = properties.get_property(SSL_API)
       cert_was_imported = False
       cert_must_import = True
       if api_ssl:
@@ -438,6 +440,11 @@ def setup_https(args):
       f = open(conf_file, 'w')
       properties.store(f, "Changed by 'ambari-server setup-https' command")
 
+      if api_ssl_old_value != properties.get_property(SSL_API) \
+          or client_api_ssl_port_old_value != properties.get_property(SSL_API_PORT):
+        print "Ambari server URL changed. To make use of the Tez View in Ambari " \
+              "please update the property tez.tez-ui.history-url.base in tez-site"
+
       ambari_user = read_ambari_user()
       if ambari_user:
         adjust_directory_permissions(ambari_user)

http://git-wip-us.apache.org/repos/asf/ambari/blob/75da576d/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
index bf6f94b..ef74e29 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
@@ -935,6 +935,8 @@ class HDP22StackAdvisor(HDP21StackAdvisor):
                         {"config-name": 'tez.task.resource.memory.mb', "item": self.validatorLessThenDefaultValue(properties, recommendedDefaults, 'tez.task.resource.memory.mb')},
                         {"config-name": 'tez.runtime.io.sort.mb', "item": self.validatorLessThenDefaultValue(properties, recommendedDefaults, 'tez.runtime.io.sort.mb')},
                         {"config-name": 'tez.runtime.unordered.output.buffer.size-mb', "item": self.validatorLessThenDefaultValue(properties, recommendedDefaults, 'tez.runtime.unordered.output.buffer.size-mb')},]
+    if "tez.tez-ui.history-url.base" in recommendedDefaults:
+      validationItems.append({"config-name": 'tez.tez-ui.history-url.base', "item": self.validatorEqualsToRecommendedItem(properties, recommendedDefaults, 'tez.tez-ui.history-url.base')})
 
     tez_site = properties
     prop_name1 = 'tez.am.resource.memory.mb'

http://git-wip-us.apache.org/repos/asf/ambari/blob/75da576d/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 a1b9cac..9d23b39 100644
--- a/ambari-server/src/test/python/TestAmbariServer.py
+++ b/ambari-server/src/test/python/TestAmbariServer.py
@@ -1541,18 +1541,20 @@ class TestAmbariServer(TestCase):
     read_ambari_user_method.return_value = "user"
     #Case #1: if client ssl is on and user didnt choose
     #disable ssl option and choose import certs and keys
-    p.get_property.side_effect = ["key_dir", "5555", "6666", "true"]
+    p.get_property.side_effect = ["key_dir", "5555", "6666", "true", "5555", "true", "true", "5555"]
     get_YN_input_mock.side_effect = [False, True]
     get_validated_string_input_mock.side_effect = ["4444"]
     get_property_expected = "[call('security.server.keys_dir'),\n" + \
                             " call('client.api.ssl.port'),\n" + \
-                            " call('client.api.ssl.port'),\n call('api.ssl')]"
+                            " call('client.api.ssl.port'),\n call('api.ssl'),\n" + \
+                            " call('client.api.ssl.port'),\n call('api.ssl'),\n" + \
+                            " call('api.ssl'),\n call('client.api.ssl.port')]"
     process_pair_expected = "[call('client.api.ssl.port', '4444')]"
     set_silent(False)
     setup_https(args)
 
     self.assertTrue(p.process_pair.called)
-    self.assertTrue(p.get_property.call_count == 4)
+    self.assertTrue(p.get_property.call_count == 8)
     self.assertEqual(str(p.get_property.call_args_list), get_property_expected)
     self.assertEqual(str(p.process_pair.call_args_list), process_pair_expected)
     self.assertTrue(p.store.called)
@@ -1564,16 +1566,18 @@ class TestAmbariServer(TestCase):
     import_cert_and_key_action_mock.reset_mock()
 
     #Case #2: if client ssl is on and user choose to disable ssl option
-    p.get_property.side_effect = ["key_dir", "", "true"]
+    p.get_property.side_effect = ["key_dir", "", "true", "", "true", "false", ""]
     get_YN_input_mock.side_effect = [True]
     get_validated_string_input_mock.side_effect = ["4444"]
     get_property_expected = "[call('security.server.keys_dir'),\n" + \
-                            " call('client.api.ssl.port'),\n call('api.ssl')]"
+                            " call('client.api.ssl.port'),\n call('api.ssl'),\n" + \
+                            " call('client.api.ssl.port'),\n call('api.ssl'),\n" + \
+                            " call('api.ssl')]"
     process_pair_expected = "[call('api.ssl', 'false')]"
     setup_https(args)
 
     self.assertTrue(p.process_pair.called)
-    self.assertTrue(p.get_property.call_count == 3)
+    self.assertTrue(p.get_property.call_count == 6)
     self.assertEqual(str(p.get_property.call_args_list), get_property_expected)
     self.assertEqual(str(p.process_pair.call_args_list), process_pair_expected)
     self.assertTrue(p.store.called)
@@ -1586,16 +1590,18 @@ class TestAmbariServer(TestCase):
 
     #Case #3: if client ssl is off and user choose option
     #to import cert and keys
-    p.get_property.side_effect = ["key_dir", "", None]
+    p.get_property.side_effect = ["key_dir", "", None, "", None, None, ""]
     get_YN_input_mock.side_effect = [True, True]
     get_validated_string_input_mock.side_effect = ["4444"]
     get_property_expected = "[call('security.server.keys_dir'),\n" + \
-                            " call('client.api.ssl.port'),\n call('api.ssl')]"
+                            " call('client.api.ssl.port'),\n call('api.ssl'),\n" + \
+                            " call('client.api.ssl.port'),\n call('api.ssl'),\n" + \
+                            " call('api.ssl'),\n call('client.api.ssl.port')]"
     process_pair_expected = "[call('client.api.ssl.port', '4444')]"
     setup_https(args)
 
     self.assertTrue(p.process_pair.called)
-    self.assertTrue(p.get_property.call_count == 3)
+    self.assertTrue(p.get_property.call_count == 7)
     self.assertEqual(str(p.get_property.call_args_list), get_property_expected)
     self.assertEqual(str(p.process_pair.call_args_list), process_pair_expected)
     self.assertTrue(p.store.called)
@@ -1608,16 +1614,17 @@ class TestAmbariServer(TestCase):
 
     #Case #4: if client ssl is off and
     #user did not choose option to import cert and keys
-    p.get_property.side_effect = ["key_dir", "", None]
+    p.get_property.side_effect = ["key_dir", "", None, "", None]
     get_YN_input_mock.side_effect = [False]
     get_validated_string_input_mock.side_effect = ["4444"]
     get_property_expected = "[call('security.server.keys_dir'),\n" + \
+                            " call('client.api.ssl.port'),\n call('api.ssl'),\n" + \
                             " call('client.api.ssl.port'),\n call('api.ssl')]"
     process_pair_expected = "[]"
     setup_https(args)
 
     self.assertFalse(p.process_pair.called)
-    self.assertTrue(p.get_property.call_count == 3)
+    self.assertTrue(p.get_property.call_count == 5)
     self.assertEqual(str(p.get_property.call_args_list), get_property_expected)
     self.assertEqual(str(p.process_pair.call_args_list), process_pair_expected)
     self.assertFalse(p.store.called)
@@ -1629,16 +1636,17 @@ class TestAmbariServer(TestCase):
     import_cert_and_key_action_mock.reset_mock()
 
     #Case #5: if cert must be imported but didnt imported
-    p.get_property.side_effect = ["key_dir", "", "false"]
+    p.get_property.side_effect = ["key_dir", "", "false", "", "false"]
     get_YN_input_mock.side_effect = [True]
     import_cert_and_key_action_mock.side_effect = [False]
     get_validated_string_input_mock.side_effect = ["4444"]
     get_property_expected = "[call('security.server.keys_dir'),\n" + \
+                            " call('client.api.ssl.port'),\n call('api.ssl'),\n" + \
                             " call('client.api.ssl.port'),\n call('api.ssl')]"
     process_pair_expected = "[call('client.api.ssl.port', '4444')]"
     self.assertFalse(setup_https(args))
     self.assertTrue(p.process_pair.called)
-    self.assertTrue(p.get_property.call_count == 3)
+    self.assertTrue(p.get_property.call_count == 5)
     self.assertEqual(str(p.get_property.call_args_list), get_property_expected)
     self.assertEqual(str(p.process_pair.call_args_list), process_pair_expected)
     self.assertFalse(p.store.called)

http://git-wip-us.apache.org/repos/asf/ambari/blob/75da576d/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
index 86b73b5..41da868 100644
--- a/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
+++ b/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
@@ -3058,26 +3058,31 @@ class TestHDP22StackAdvisor(TestCase):
     recommendedDefaults = {'tez.task.resource.memory.mb': '1024',
                            'tez.runtime.io.sort.mb' : '256',
                            'tez.runtime.unordered.output.buffer.size-mb' : '256',
-                           'tez.am.resource.memory.mb' : '1024'}
+                           'tez.am.resource.memory.mb' : '1024',
+                           'tez.tez-ui.history-url.base' : 'https://host:8443/#/main/views/TEZ/0.7.0.2.3.0.0-2155/TEZ_CLUSTER_INSTANCE'}
 
     properties = {'tez.task.resource.memory.mb': '2050',
                   'tez.runtime.io.sort.mb' : '256',
                   'tez.runtime.unordered.output.buffer.size-mb' : '256',
-                  'tez.am.resource.memory.mb' : '2050'}
+                  'tez.am.resource.memory.mb' : '2050',
+                  'tez.tez-ui.history-url.base' : 'http://host:8080/#/main/views/TEZ/0.7.0.2.3.0.0-2155/TEZ_CLUSTER_INSTANCE'}
 
 
-    res_expected = [{'config-name': 'tez.am.resource.memory.mb',
-                 'config-type': 'tez-site',
-                 'level': 'WARN',
-                 'message': "tez.am.resource.memory.mb should be less than YARN max allocation size (2048)",
-                 'type': 'configuration',
-                 'level': 'WARN'},
+    res_expected = [{'config-name': 'tez.tez-ui.history-url.base',
+                     'config-type': 'tez-site',
+                     'level': 'WARN',
+                     'message': "It is recommended to set value https://host:8443/#/main/views/TEZ/0.7.0.2.3.0.0-2155/TEZ_CLUSTER_INSTANCE for property tez.tez-ui.history-url.base",
+                     'type': 'configuration'},
+                    {'config-name': 'tez.am.resource.memory.mb',
+                     'config-type': 'tez-site',
+                     'level': 'WARN',
+                     'message': "tez.am.resource.memory.mb should be less than YARN max allocation size (2048)",
+                     'type': 'configuration'},
                     {'config-name': 'tez.task.resource.memory.mb',
-                 'config-type': 'tez-site',
-                 'level': 'WARN',
-                 'message': "tez.task.resource.memory.mb should be less than YARN max allocation size (2048)",
-                 'type': 'configuration',
-                 'level': 'WARN'}]
+                     'config-type': 'tez-site',
+                     'level': 'WARN',
+                     'message': "tez.task.resource.memory.mb should be less than YARN max allocation size (2048)",
+                     'type': 'configuration'}]
 
     res = self.stackAdvisor.validateTezConfigurations(properties, recommendedDefaults, configurations, '', '')
     self.assertEquals(res, res_expected)