瀏覽代碼

AMBARI-11691. Hive Start with non-root ambari-agent fail (aonishuk)

Andrew Onishuk 10 年之前
父節點
當前提交
cc6f4a6820

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

@@ -253,6 +253,7 @@ def hive(name=None):
 
   File(format("/usr/lib/ambari-agent/{check_db_connection_jar_name}"),
        content = DownloadSource(format("{jdk_location}{check_db_connection_jar_name}")),
+       mode = 0644,
   )
 
   if name == 'metastore':

+ 2 - 0
ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_client.py

@@ -95,6 +95,7 @@ class TestHiveClient(RMFTestCase):
                               )
     self.assertResourceCalled('File', '/usr/lib/ambari-agent/DBConnectionVerification.jar',
         content = DownloadSource('http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar'),
+        mode = 0644,
     )
     self.assertNoMoreResources()
 
@@ -170,6 +171,7 @@ class TestHiveClient(RMFTestCase):
                               )
     self.assertResourceCalled('File', '/usr/lib/ambari-agent/DBConnectionVerification.jar',
         content = DownloadSource('http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar'),
+        mode = 0644,
     )
     self.assertNoMoreResources()
 

+ 5 - 1
ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_metastore.py

@@ -220,6 +220,7 @@ class TestHiveMetastore(RMFTestCase):
     )
     self.assertResourceCalled('File', '/usr/lib/ambari-agent/DBConnectionVerification.jar',
         content = DownloadSource('http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar'),
+        mode = 0644,
     )
     self.assertResourceCalled('File', '/tmp/start_metastore_script',
                               content = StaticFile('startMetastore.sh'),
@@ -323,6 +324,7 @@ class TestHiveMetastore(RMFTestCase):
     )
     self.assertResourceCalled('File', '/usr/lib/ambari-agent/DBConnectionVerification.jar',
         content = DownloadSource('http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar'),
+        mode = 0644,
     )
     self.assertResourceCalled('File', '/tmp/start_metastore_script',
                               content = StaticFile('startMetastore.sh'),
@@ -449,7 +451,9 @@ class TestHiveMetastore(RMFTestCase):
         mode = 0644)
 
     self.assertResourceCalled('File', '/usr/lib/ambari-agent/DBConnectionVerification.jar',
-        content = DownloadSource('http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar'))
+        content = DownloadSource('http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar'),
+        mode = 0644,
+    )
 
     self.assertResourceCalled('File', '/tmp/start_metastore_script',
                               content = StaticFile('startMetastore.sh'),

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

@@ -421,6 +421,7 @@ class TestHiveServer(RMFTestCase):
     self.assertResourceCalled('File', '/usr/lib/ambari-agent/DBConnectionVerification.jar',
                               content=DownloadSource('http://c6401.ambari.apache.org:8080/resources'
                                                      '/DBConnectionVerification.jar'),
+                              mode=0644,
     )
     self.assertResourceCalled('File', '/tmp/start_hiveserver2_script',
                               content=Template('startHiveserver2.sh.j2'),
@@ -596,6 +597,7 @@ class TestHiveServer(RMFTestCase):
     self.assertResourceCalled('File', '/usr/lib/ambari-agent/DBConnectionVerification.jar',
                               content=DownloadSource(
                                 'http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar'),
+                              mode=0644,
     )
     self.assertResourceCalled('File', '/tmp/start_hiveserver2_script',
                               content=Template('startHiveserver2.sh.j2'),

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

@@ -239,6 +239,7 @@ class TestHiveMetastore(RMFTestCase):
     )
     self.assertResourceCalled('File', '/usr/lib/ambari-agent/DBConnectionVerification.jar',
         content = DownloadSource('http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar'),
+        mode = 0644,
     )
     self.assertResourceCalled('File', '/tmp/start_metastore_script',
                               content = StaticFile('startMetastore.sh'),
@@ -334,6 +335,7 @@ class TestHiveMetastore(RMFTestCase):
     )
     self.assertResourceCalled('File', '/usr/lib/ambari-agent/DBConnectionVerification.jar',
         content = DownloadSource('http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar'),
+        mode = 0644,
     )
     self.assertResourceCalled('File', '/tmp/start_metastore_script',
                               content = StaticFile('startMetastore.sh'),