ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject [10/16] ambari git commit: AMBARI-21588: MetadataServer start fails if Atlas service is started with custom service user (Vishal Suvagia via mugdha)
Date Mon, 31 Jul 2017 14:01:34 GMT
AMBARI-21588: MetadataServer start fails if Atlas service is started with custom service user
(Vishal Suvagia via mugdha)


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

Branch: refs/heads/branch-2.6
Commit: b1438eea9a67eb0284c43c18e86176fbda084c58
Parents: 0a78cea
Author: Vishal Suvagia <vishalsuvagia@yahoo.com>
Authored: Fri Jul 28 18:40:11 2017 +0530
Committer: Mugdha Varadkar <mugdha@apache.org>
Committed: Fri Jul 28 20:25:22 2017 +0530

----------------------------------------------------------------------
 .../ATLAS/0.1.0.2.3/package/scripts/metadata.py                | 6 ++++++
 .../src/test/python/stacks/2.3/ATLAS/test_metadata_server.py   | 6 +++---
 .../src/test/python/stacks/2.5/ATLAS/test_atlas_server.py      | 2 +-
 3 files changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b1438eea/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
index 6b5f562..0305b82 100644
--- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
+++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
@@ -214,6 +214,12 @@ def metadata(type='server'):
         mode=0644
       )
 
+    Directory(format('{metadata_home}/'),
+      owner = params.metadata_user,
+      group = params.user_group,
+      recursive_ownership = True,
+    )
+
 def upload_conf_set(config_set, jaasFile):
   import params
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/b1438eea/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py b/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
index d1d8b7f..5d99867 100644
--- a/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
+++ b/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
@@ -334,7 +334,7 @@ class TestMetadataServer(RMFTestCase):
                               content=Template("atlas_hbase_setup.rb.j2"))
 
     self.assertResourceCalled('File', str(self.conf_dir+"/hdfs-site.xml"),action = ['delete'],)
-
+    self.assertResourceCalled('Directory',self.stack_root + '/current/atlas-server/', owner
= 'atlas', group = 'hadoop', recursive_ownership = True, )
     self.assertNoMoreResources()
 
   def test_configure_secure(self):
@@ -355,7 +355,7 @@ class TestMetadataServer(RMFTestCase):
 
     self.assertResourceCalled('File', str(self.conf_dir+"/hdfs-site.xml"),action = ['delete'],)
 
-
+    self.assertResourceCalled('Directory',self.stack_root + '/current/atlas-server/', owner
= 'atlas', group = 'hadoop', recursive_ownership = True, )
     self.assertNoMoreResources()
 
   def test_start_default(self):
@@ -374,7 +374,7 @@ class TestMetadataServer(RMFTestCase):
                               content=Template("atlas_hbase_setup.rb.j2"))
 
     self.assertResourceCalled('File', str(self.conf_dir+"/hdfs-site.xml"),action = ['delete'],)
-
+    self.assertResourceCalled('Directory',self.stack_root + '/current/atlas-server/', owner
= 'atlas', group = 'hadoop', recursive_ownership = True, )
 
     self.assertResourceCalled('Execute', 'source {0}/atlas-env.sh ; {1}/current/atlas-server/bin/atlas_start.py'.format(self.conf_dir,self.stack_root),
                               not_if = 'ls /var/run/atlas/atlas.pid >/dev/null 2>&1
&& ps -p `cat /var/run/atlas/atlas.pid` >/dev/null 2>&1',

http://git-wip-us.apache.org/repos/asf/ambari/blob/b1438eea/ambari-server/src/test/python/stacks/2.5/ATLAS/test_atlas_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.5/ATLAS/test_atlas_server.py b/ambari-server/src/test/python/stacks/2.5/ATLAS/test_atlas_server.py
index 539bef5..0d5eb2a 100644
--- a/ambari-server/src/test/python/stacks/2.5/ATLAS/test_atlas_server.py
+++ b/ambari-server/src/test/python/stacks/2.5/ATLAS/test_atlas_server.py
@@ -182,5 +182,5 @@ class TestAtlasServer(RMFTestCase):
                               content=Template("atlas_hbase_setup.rb.j2"))
 
     self.assertResourceCalled('File', '/usr/hdp/current/atlas-server/conf/hdfs-site.xml',action
= ['delete'],)
-
+    self.assertResourceCalled('Directory','/usr/hdp/current/atlas-server/', owner = 'atlas',
group = 'hadoop', recursive_ownership = True, )
     self.assertNoMoreResources()


Mime
View raw message