[ 
https://issues.apache.org/jira/browse/AMBARI-12127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14599998#comment-14599998
 ] 

Hudson commented on AMBARI-12127:
---------------------------------

FAILURE: Integrated in Ambari-trunk-Commit #2992 (See 
[https://builds.apache.org/job/Ambari-trunk-Commit/2992/])
AMBARI-12127. RU: install version fails with non-root + umask 027 (aonishuk) 
(aonishuk: 
http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=440a45906cabb53dc8dbe289e67017a67821be6f)
* 
ambari-common/src/main/python/resource_management/libraries/providers/repository.py


> RU: install version fails with non-root + umask 027
> ---------------------------------------------------
>
>                 Key: AMBARI-12127
>                 URL: https://issues.apache.org/jira/browse/AMBARI-12127
>             Project: Ambari
>          Issue Type: Bug
>            Reporter: Andrew Onischuk
>            Assignee: Andrew Onischuk
>             Fix For: 2.1.0
>
>
> 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 <module>
>         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]# 
>     



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to