Browse Source

AMBARI-9840: Warning Alert for storm after enabling security (jluniya)

Jayush Luniya 10 năm trước cách đây
mục cha
commit
3b6d56da8e

+ 2 - 2
ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/alerts.json

@@ -39,8 +39,8 @@
           "uri": {
             "http": "{{falcon-env/falcon_port}}",
             "default_port": 15000,
-            "kerberos_keytab": "{{core-site/hadoop.http.authentication.kerberos.keytab}}",
-            "kerberos_principal": "{{core-site/hadoop.http.authentication.kerberos.principal}}"
+            "kerberos_keytab": "{{falcon-startup.properties/*.falcon.http.authentication.kerberos.keytab}}",
+            "kerberos_principal": "{{falcon-startup.properties/*.falcon.http.authentication.kerberos.principal}}"
           },
           "reporting": {
             "ok": {

+ 2 - 2
ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/alerts.json

@@ -62,8 +62,8 @@
           "type": "WEB",
           "uri": {
             "http": "{{storm-site/ui.port}}",
-            "kerberos_keytab": "{{core-site/hadoop.http.authentication.kerberos.keytab}}",
-            "kerberos_principal": "{{core-site/hadoop.http.authentication.kerberos.principal}}"
+           "kerberos_keytab": "{{storm-env/storm_ui_keytab}}",
+            "kerberos_principal": "{{storm-env/storm_ui_principal_name}}"
           },
           "reporting": {
             "ok": {

+ 5 - 4
ambari-server/src/test/python/custom_actions/TestCheckHost.py

@@ -40,7 +40,7 @@ else:
 
 
 class TestCheckHost(TestCase):
-
+  @patch.object(OSCheck, "os_distribution", new = MagicMock(return_value = os_distro_value))
   @patch("os.path.isfile")
   @patch.object(Script, 'get_config')
   @patch.object(Script, 'get_tmp_dir')
@@ -69,7 +69,7 @@ class TestCheckHost(TestCase):
     self.assertEquals(structured_out_mock.call_args[0][0], {'java_home_check': {"message": "Java home doesn't exist!",
                                                                                 "exit_code" : 1}})
 
-
+  @patch.object(OSCheck, "os_distribution", new = MagicMock(return_value = os_distro_value))
   @patch.object(Script, 'get_config')
   @patch.object(Script, 'get_tmp_dir')
   @patch("check_host.download_file")
@@ -179,7 +179,7 @@ class TestCheckHost(TestCase):
             'available on host. Please install it. Java home should be the same as on server. \n', 'exit_code': 1}})
 
 
-
+  @patch.object(OSCheck, "os_distribution", new = MagicMock(return_value = os_distro_value))
   @patch("socket.gethostbyname")
   @patch.object(Script, 'get_config')
   @patch.object(Script, 'get_tmp_dir')
@@ -219,7 +219,8 @@ class TestCheckHost(TestCase):
                     {'cause': (), 'host': u'!!!', 'type': 'FORWARD_LOOKUP'}], 
        'message': 'There were 5 host(s) that could not resolve to an IP address.', 
        'failed_count': 5, 'success_count': 0, 'exit_code': 0}})
-    
+
+  @patch.object(OSCheck, "os_distribution", new = MagicMock(return_value = os_distro_value))
   @patch.object(Script, 'get_config')
   @patch.object(Script, 'get_tmp_dir')
   @patch("resource_management.libraries.script.Script.put_structured_out")