Repository: ambari Updated Branches: refs/heads/branch-2.5 c2a897199 -> 72617ce73
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/72617ce7 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/72617ce7 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/72617ce7 Branch: refs/heads/branch-2.5 Commit: 72617ce7339dc0859aa0508d9f7a3d50a477ac3a Parents: c2a8971 Author: Alejandro Fernandez <[email protected]> Authored: Tue Sep 13 15:22:27 2016 -0700 Committer: Alejandro Fernandez <[email protected]> Committed: Tue Sep 13 15:22:27 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/72617ce7/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,
