Repository: ambari Updated Branches: refs/heads/trunk 1b4a38dde -> fc10afbce
AMBARI-18368. Atlas web UI alert after performing stack upgrade to HDP 2.5 and adding Atlas Service (afernandez) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fc10afbc Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fc10afbc Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fc10afbc Branch: refs/heads/trunk Commit: fc10afbce791e01679e51305218363e9eef2822f Parents: 1b4a38d Author: Alejandro Fernandez <[email protected]> Authored: Mon Sep 12 18:50:07 2016 -0700 Committer: Alejandro Fernandez <[email protected]> Committed: Tue Sep 13 15:20:47 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/fc10afbc/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,
