Return-Path: X-Original-To: apmail-ambari-dev-archive@www.apache.org Delivered-To: apmail-ambari-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AFA0918347 for ; Wed, 24 Jun 2015 16:53:43 +0000 (UTC) Received: (qmail 25143 invoked by uid 500); 24 Jun 2015 16:53:38 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 25111 invoked by uid 500); 24 Jun 2015 16:53:38 -0000 Mailing-List: contact dev-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list dev@ambari.apache.org Received: (qmail 25096 invoked by uid 99); 24 Jun 2015 16:53:38 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Jun 2015 16:53:38 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 745AAA9B97; Wed, 24 Jun 2015 16:53:37 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============7217399093611740691==" MIME-Version: 1.0 Subject: Re: Review Request 35831: RU: install version fails with non-root + umask 027 From: "Vitalyi Brodetskyi" To: "Jayush Luniya" Cc: "Andrew Onischuk" , "Vitalyi Brodetskyi" , "Ambari" Date: Wed, 24 Jun 2015 16:53:37 -0000 Message-ID: <20150624165337.3113.39880@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: "Vitalyi Brodetskyi" X-ReviewGroup: Ambari X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/35831/ X-Sender: "Vitalyi Brodetskyi" References: <20150624165250.20383.66611@reviews.apache.org> In-Reply-To: <20150624165250.20383.66611@reviews.apache.org> Reply-To: "Vitalyi Brodetskyi" X-ReviewRequest-Repository: ambari --===============7217399093611740691== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/35831/#review89189 ----------------------------------------------------------- Ship it! Ship It! - Vitalyi Brodetskyi On Червень 24, 2015, 4:52 після полудня, Andrew Onischuk wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/35831/ > ----------------------------------------------------------- > > (Updated Червень 24, 2015, 4:52 після полудня) > > > Review request for Ambari and Jayush Luniya. > > > Bugs: AMBARI-12127 > https://issues.apache.org/jira/browse/AMBARI-12127 > > > Repository: ambari > > > Description > ------- > > Ambari 2.1.0 build #1234 > hdp 2.2.6 > non-root server, non-root agent, umask 027 > > Registered hdp 2.3, fails to install version: > > > > > stderr: /var/lib/ambari-agent/data/errors-61.txt > > 2015-06-24 13:52:38,589 - Cannot distribute repositories. Error: [Errno 13] Permission denied: '/etc/yum.repos.d/HDP-2.3.0.0.repo' > Traceback (most recent call last): > File "/var/lib/ambari-agent/cache/custom_actions/scripts/install_packages.py", line 93, in actionexecute > repo_name, repo_file = self.install_repository(url_info, append_to_file) > File "/var/lib/ambari-agent/cache/custom_actions/scripts/install_packages.py", line 304, in install_repository > components = ubuntu_components, # ubuntu specific > File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 157, in __init__ > self.env.run() > File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 152, in run > self.run_action(resource, action) > File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 118, in run_action > provider_action() > File "/usr/lib/python2.6/site-packages/resource_management/libraries/providers/repository.py", line 49, in action_create > with open(repo_file_path, 'a') as repo_file: > IOError: [Errno 13] Permission denied: '/etc/yum.repos.d/HDP-2.3.0.0.repo' > Traceback (most recent call last): > File "/var/lib/ambari-agent/cache/custom_actions/scripts/install_packages.py", line 338, in > InstallPackages().execute() > File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 216, in execute > method(env) > File "/var/lib/ambari-agent/cache/custom_actions/scripts/install_packages.py", line 113, in actionexecute > raise Fail("Failed to distribute repositories/install packages") > resource_management.core.exceptions.Fail: Failed to distribute repositories/install packages > > stdout: /var/lib/ambari-agent/data/output-61.txt > > 2015-06-24 13:52:38,347 - Will install packages for repository version 2.3.0.0 > 2015-06-24 13:52:38,347 - Repository['HDP-2.3.0.0'] {'append_to_file': False, 'base_url': 'http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.3.0.0-2458/', 'action': ['create'], 'components': ['HDP', 'main'], 'repo_template': 'repo_suse_rhel.j2', 'repo_file_name': 'HDP-2.3.0.0', 'mirror_list': None} > 2015-06-24 13:52:38,377 - File['/etc/yum.repos.d/HDP-2.3.0.0.repo'] {'content': Template('/usr/lib/ambari-server/lib/resource_management/libraries/providers/../data/repo_suse_rhel.j2')} > 2015-06-24 13:52:38,544 - Writing File['/etc/yum.repos.d/HDP-2.3.0.0.repo'] because it doesn't exist > 2015-06-24 13:52:38,581 - Repository['HDP-UTILS-2.3.0.0'] {'append_to_file': True, 'base_url': 'http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/centos6/', 'action': ['create'], 'components': ['HDP-UTILS', 'main'], 'repo_template': 'repo_suse_rhel.j2', 'repo_file_name': 'HDP-2.3.0.0', 'mirror_list': None} > 2015-06-24 13:52:38,589 - Cannot distribute repositories. Error: [Errno 13] Permission denied: '/etc/yum.repos.d/HDP-2.3.0.0.repo' > Traceback (most recent call last): > File "/var/lib/ambari-agent/cache/custom_actions/scripts/install_packages.py", line 93, in actionexecute > repo_name, repo_file = self.install_repository(url_info, append_to_file) > File "/var/lib/ambari-agent/cache/custom_actions/scripts/install_packages.py", line 304, in install_repository > components = ubuntu_components, # ubuntu specific > File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 157, in __init__ > self.env.run() > File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 152, in run > self.run_action(resource, action) > File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 118, in run_action > provider_action() > File "/usr/lib/python2.6/site-packages/resource_management/libraries/providers/repository.py", line 49, in action_create > with open(repo_file_path, 'a') as repo_file: > IOError: [Errno 13] Permission denied: '/etc/yum.repos.d/HDP-2.3.0.0.repo' > > > But the non-root user can't read/write the HDP-2.3.0.0.repo is created. > > > > > [root@c6401 ~]# cd /etc/yum.repos.d/ > [root@c6401 yum.repos.d]# ls > ambari.repo CentOS-Debuginfo.repo CentOS-Vault.repo HDP.repo > CentOS-Base.repo CentOS-Media.repo HDP-2.3.0.0.repo HDP-UTILS.repo > [root@c6401 yum.repos.d]# ls -l > total 32 > -rw-r--r-- 1 root root 282 Jun 24 12:25 ambari.repo > -rw-r--r--. 1 root root 1926 Feb 25 2013 CentOS-Base.repo > -rw-r--r--. 1 root root 638 Feb 25 2013 CentOS-Debuginfo.repo > -rw-r--r--. 1 root root 630 Feb 25 2013 CentOS-Media.repo > -rw-r--r--. 1 root root 3664 Feb 25 2013 CentOS-Vault.repo > -rw-r----- 1 root root 148 Jun 24 13:52 HDP-2.3.0.0.repo > -rw-r----- 1 root root 116 Jun 24 13:13 HDP.repo > -rw-r----- 1 root root 151 Jun 24 13:13 HDP-UTILS.repo > [root@c6401 yum.repos.d]# > > > Diffs > ----- > > ambari-common/src/main/python/resource_management/libraries/providers/repository.py 139cd68 > > Diff: https://reviews.apache.org/r/35831/diff/ > > > Testing > ------- > > mvn clean test > > > Thanks, > > Andrew Onischuk > > --===============7217399093611740691==--