浏览代码

AMBARI-13133. Hive Metastore did not start when Kerberized (rlevas)

Robert Levas 10 年之前
父节点
当前提交
7bc58ac7c7

+ 0 - 4
ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py

@@ -78,10 +78,6 @@ def hive_service(name, action='start', rolling_restart=False):
         import os
         import os
         hadoop_home = format("/usr/hdp/{version}/hadoop")
         hadoop_home = format("/usr/hdp/{version}/hadoop")
         hive_bin = os.path.join(params.hive_bin, hive_bin)
         hive_bin = os.path.join(params.hive_bin, hive_bin)
-
-    if params.security_enabled:
-      hive_kinit_cmd = format("{kinit_path_local} -kt {hive_server2_keytab} {hive_principal}; ")
-      Execute(hive_kinit_cmd, user=params.hive_user)
       
       
     Execute(daemon_cmd, 
     Execute(daemon_cmd, 
       user = params.hive_user,
       user = params.hive_user,

+ 1 - 0
ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/status_params.py

@@ -95,6 +95,7 @@ else:
     # this is NOT a typo.  HDP-2.3 configs for hcatalog/webhcat point to a
     # this is NOT a typo.  HDP-2.3 configs for hcatalog/webhcat point to a
     # specific directory which is NOT called 'conf'
     # specific directory which is NOT called 'conf'
     webhcat_conf_dir = '/usr/hdp/current/hive-webhcat/etc/webhcat'
     webhcat_conf_dir = '/usr/hdp/current/hive-webhcat/etc/webhcat'
+    hive_conf_dir = hive_server_conf_dir
 
 
   hive_config_dir = hive_client_conf_dir
   hive_config_dir = hive_client_conf_dir
   if 'role' in config and config['role'] in ["HIVE_SERVER", "HIVE_METASTORE"]:
   if 'role' in config and config['role'] in ["HIVE_SERVER", "HIVE_METASTORE"]:

+ 0 - 3
ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_metastore.py

@@ -105,9 +105,6 @@ class TestHiveMetastore(RMFTestCase):
                        target = RMFTestCase.TARGET_COMMON_SERVICES
                        target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     )
     self.assert_configure_secured()
     self.assert_configure_secured()
-    self.assertResourceCalled('Execute', '/usr/bin/kinit -kt /etc/security/keytabs/hive.service.keytab hive/c6401.ambari.apache.org@EXAMPLE.COM; ',
-                              user = 'hive',
-                              )
     self.assertResourceCalled('Execute', '/tmp/start_metastore_script /var/log/hive/hive.out /var/log/hive/hive.log /var/run/hive/hive.pid /etc/hive/conf.server /var/log/hive',
     self.assertResourceCalled('Execute', '/tmp/start_metastore_script /var/log/hive/hive.out /var/log/hive/hive.log /var/run/hive/hive.pid /etc/hive/conf.server /var/log/hive',
         environment = {'HADOOP_HOME': '/usr',
         environment = {'HADOOP_HOME': '/usr',
            'HIVE_BIN': 'hive',
            'HIVE_BIN': 'hive',

+ 0 - 4
ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py

@@ -241,10 +241,6 @@ class TestHiveServer(RMFTestCase):
     )
     )
 
 
     self.assert_configure_secured()
     self.assert_configure_secured()
-    self.assertResourceCalled('Execute',
-                              '/usr/bin/kinit -kt /etc/security/keytabs/hive.service.keytab hive/c6401.ambari.apache.org@EXAMPLE.COM; ',
-                              user='hive',
-    )
     self.assertResourceCalled('Execute', '/tmp/start_hiveserver2_script /var/log/hive/hive-server2.out /var/log/hive/hive-server2.log /var/run/hive/hive-server.pid /etc/hive/conf.server /var/log/hive',
     self.assertResourceCalled('Execute', '/tmp/start_hiveserver2_script /var/log/hive/hive-server2.out /var/log/hive/hive-server2.log /var/run/hive/hive-server.pid /etc/hive/conf.server /var/log/hive',
         environment = {'HADOOP_HOME': '/usr',
         environment = {'HADOOP_HOME': '/usr',
            'HIVE_BIN': 'hive',
            'HIVE_BIN': 'hive',

+ 0 - 4
ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py

@@ -139,10 +139,6 @@ class TestHiveMetastore(RMFTestCase):
     )
     )
 
 
     self.assert_configure_secured()
     self.assert_configure_secured()
-    self.assertResourceCalled('Execute', '/usr/bin/kinit -kt /etc/security/keytabs/hive.service.keytab hive/c6401.ambari.apache.org@EXAMPLE.COM; ',
-                              user = 'hive',
-                              )
-
     self.assertResourceCalled('Execute', '/tmp/start_metastore_script /var/log/hive/hive.out /var/log/hive/hive.log /var/run/hive/hive.pid /etc/hive/conf.server /var/log/hive',
     self.assertResourceCalled('Execute', '/tmp/start_metastore_script /var/log/hive/hive.out /var/log/hive/hive.log /var/run/hive/hive.pid /etc/hive/conf.server /var/log/hive',
         environment = {'HADOOP_HOME': '/usr',
         environment = {'HADOOP_HOME': '/usr',
            'HIVE_BIN': 'hive',
            'HIVE_BIN': 'hive',