Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 a71d673d0 -> 86be23374


AMBARI-18368. Atlas web UI alert after performing stack upgrade to HDP 2.5 and 
adding Atlas Service (alejandro)


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

Branch: refs/heads/branch-2.4
Commit: 86be233746595a49c4ef1f734d9891fc3692428e
Parents: a71d673
Author: Alejandro Fernandez <[email protected]>
Authored: Tue Sep 13 15:27:02 2016 -0700
Committer: Alejandro Fernandez <[email protected]>
Committed: Tue Sep 13 15:27:02 2016 -0700

----------------------------------------------------------------------
 .../ATLAS/0.1.0.2.3/package/scripts/metadata.py      | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/86be2337/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 0c07018..a568cb7 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
@@ -17,9 +17,11 @@ See the License for the specific language governing 
permissions and
 limitations under the License.
 
 """
+import os
+
 from resource_management import Package
 from resource_management import StackFeature
-from resource_management.core.resources.system import Directory, File
+from resource_management.core.resources.system import Directory, File, Execute
 from resource_management.core.source import StaticFile, InlineTemplate, 
Template
 from resource_management.core.exceptions import Fail
 from resource_management.libraries.functions.format import format
@@ -94,6 +96,17 @@ def metadata(type='server'):
            mode=0755,
            content=InlineTemplate(params.metadata_env_content)
       )
+ 
+      files_to_chown = [format("{conf_dir}/policy-store.txt"), 
format("{conf_dir}/users-credentials.properties")]
+      for file in files_to_chown:
+        if os.path.exists(file):
+          Execute(('chown', format('{metadata_user}:{user_group}'), file),
+                  sudo=True
+                  )
+          Execute(('chmod', '644', file),
+                  sudo=True
+                  )
+
       if params.metadata_solrconfig_content:
         File(format("{conf_dir}/solr/solrconfig.xml"),
              mode=0644,

Reply via email to