Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

why ambari agent insist to create another repository file

avatar

we are installing the new hadoop version - **2.6.3.0** on ambari - **2.5.0.3**

from ambari agent log we see the following:

Writing File['/etc/yum.repos.d/ambari-hdp-51.repo'] because contents don't match

why ambari create the file - ambari-hdp-51.repo , ? ( under /etc/yum.repo.d )

is it possible to disable this action ? ( I mean how to configure amabri conf files / other , to not create this repo file ? )

it is very strange that ambari create this repo , and that because under /etc/yum.trepo.d , we already have the repo files for ambari & hadoop ,

so why ambari insist to create the file - ambari-hdp-51.repo **and how to disable** it?

vi /var/lib/ambari-agent/data/output-370.txt
2018-01-04 14:40:06,895 - Will install packages for repository version 2.6.3.0
2018-01-04 14:40:06,895 - Repository['HDP-2.6-repo-55'] {'append_to_file': False, 'base_url': 'http://master02.sys453.com/HDP/centos7/2.6.3.0-235', 'action': ['create'], 'components': [u'HDP', 'main'], 'repo_template': '[{{repo_id}}]\nname={{repo_id}}\n{% if mirror_list %}mirrorlist={{mirror_list}}{% else %}baseurl={{base_url}}{% endif %}\n\npath=/\nenabled=1\ngpgcheck=0', 'repo_file_name': 'ambari-hdp-55', 'mirror_list': None}
2018-01-04 14:40:06,939 - File['/etc/yum.repos.d/ambari-hdp-55.repo'] {'content': InlineTemplate(...)}
2018-01-04 14:40:06,941 - Writing File['/etc/yum.repos.d/ambari-hdp-55.repo'] because it doesn't exist
2018-01-04 14:40:06,942 - Repository['HDP-UTILS-1.1.0.21-repo-55'] {'append_to_file': True, 'base_url': 'http://master02.sys453.com/', 'action': ['create'], 'components': [u'HDP-UTILS', 'main'], 'repo_template': '[{{repo_id}}]\nname={{repo_id}}\n{% if mirror_list %}mirrorlist={{mirror_list}}{% else %}baseurl={{base_url}}{% endif %}\n\npath=/\nenabled=1\ngpgcheck=0', 'repo_file_name': 'ambari-hdp-55', 'mirror_list': None}
2018-01-04 14:40:06,950 - File['/etc/yum.repos.d/ambari-hdp-51.repo'] {'content': '[HDP-2.6-repo-51]\nname=HDP-2.6-repo-51\nbaseurl=http://master02.ipmassanalyt71.com/HDP/centos7/2.6.3.0-235\n\npath=/\nenabled=1\ngpgcheck=0\n[HDP-UTILS-1.1.0.21-repo-51]\nname=HDP-UTILS-1.1.0.21-repo-51\nbaseurl=http://master02.ipmassanalyt71.com/\n\npath=/\nenabled=1\ngpgcheck=0'}
2018-01-04 14:40:06,951 - Writing File['/etc/yum.repos.d/ambari-hdp-51.repo'] because contents don't match
Michael-Bronson
1 ACCEPTED SOLUTION

avatar

@Michael Bronson: In Ambari GUI , Navigate to Admin --> Stack and Versions --> Versions --> Click the versions listed there. You should be able to see the repo urls. If you want to make any changes to repo you can change it there and ambari will take care of distributing it.

56385-screen-shot-2018-01-19-at-111650-am.png

View solution in original post

8 REPLIES 8

avatar
@Michael Bronson

, Any Reason why you want to manage it separately, You just need to update the repo in ambari UI and rest will be taken care by Ambari (like distributing/updating the repo in all the agents). In this way you Ambari will be able to manage the repo file consistently across all the agents.

avatar

hi the problem was on the ambari.repo and hadoop repo under /etc/yum.repo.d folder, you said that repo also defined in the ambari GUI ? , this is new for me can you show me how you access the repo from ambari GUI ?

Michael-Bronson

avatar
New Contributor

Is there any way for me to change the "base_url" without using the GUI?

Tried to do this, but it doesn't work:

curl -H "X-Requested-By: ambari" -X PUT -u admin:<<password>> http://<HOST>:8080/api/v1/stacks/HDP/versions/2.6/operating_systems/redhat7/repositories/HDP-UTILS-1... -d @payload

Payload:

{
    "Repositories": {
        "base_url": "http://notavalidurljusttocheckifitsgotreplaced.org/HDP-UTILS-1.1.0.20/repos/centos6",
        "verify_base_url": false
    }
}

I'm going to hook this action to a Jenkins job, thus I don't have the luxury to do this through GUI.

avatar

hi, the problem is that this API not works on HDP - 2.6.4 , and ambari 2.6.1 , we installed many clusters but when we try this API on mentions version , then API not set the repo from some unclear reason

Michael-Bronson

avatar
New Contributor

hi , any solution for this? i face the same issue.

avatar

Did you check the repo path on ambari GUI? , if not created by API and you not see any repo PATH on ambari GUI , you can create the repo manual on ambari GUI , go to admin --> stack and version --> versions --> manage version and click on the version link then you get repo window

Michael-Bronson

avatar

@Michael Bronson: In Ambari GUI , Navigate to Admin --> Stack and Versions --> Versions --> Click the versions listed there. You should be able to see the repo urls. If you want to make any changes to repo you can change it there and ambari will take care of distributing it.

56385-screen-shot-2018-01-19-at-111650-am.png

avatar
New Contributor

2018-12-04 06:01:04,253 - Repository[None] {'action': ['create']} 2018-12-04 06:01:04,254 - File['/tmp/tmp941BIk'] {'content': '[HDP-3.0-repo-101]\nname=HDP-3.0-repo-101\nbaseurl=http://public-repo-1.hortonworks.com/HDP/centos7/3.x/updates/3.0.1.0\n\npath=/\nenabled=1\ngpgcheck=0\n[HDP-UTILS-1.1.0.22-repo-101]\nname=HDP-UTILS-1.1.0.22-repo-101\nbaseurl=http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.22/repos/centos7\n\npath=/\nenabled=1\ngpgcheck=0'} 2018-12-04 06:01:04,254 - Writing File['/tmp/tmp941BIk'] because contents don't match 2018-12-04 06:01:04,254 - File['/tmp/tmpq8_Itc'] {'content': StaticFile('/etc/yum.repos.d/ambari-hdp-101.repo')} 2018-12-04 06:01:04,255 - Writing File['/tmp/tmpq8_Itc'] because contents don't match 2018-12-04 06:01:04,255 - Rewriting /etc/yum.repos.d/ambari-hdp-101.repo since it has changed. 2018-12-04 06:01:04,255 - File['/etc/yum.repos.d/ambari-hdp-101.repo'] {'content': StaticFile('/tmp/tmp941BIk')} 2018-12-04 06:01:04,256 - Writing File['/etc/yum.repos.d/ambari-hdp-101.repo'] because contents don't match

everytime the repo is overriden/generating new file due to which i cannot use my proxy to access public repository.
i have already set proxy and port in ambari environment.
pelase advise how to get rid of this to proceed with installation.

Thank you in Advance.

,

Hi ,

i am using proxy to access HDP repo, but due to below issue , ambari is using new repo everytime due to which installation is failing .

018-12-04 06:01:04,255 - Writing File['/tmp/tmpq8_Itc'] because contents don't match 2018-12-04 06:01:04,255 - Rewriting /etc/yum.repos.d/ambari-hdp-101.repo since it has changed.

I have already set proxyname and port in ambari environment .

please advise , how to instruct ambari to use existing repo without generating/overriding everytime.

Thank you,