Isso não funciona assim, já que o Cobbler é incapaz de lidar com a funcionalidade da lista de espelhos. A opção --mirror
deve especificar um URL específico do qual você deseja fazer o download do repo.
Eu adicionei o repo da base centos ao cobbler:
cobbler repo add --arch=x86_64 --name=Centos-Base --mirror=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
mas a execução do reposync do cobbler falhou:
received on stderr: Traceback (most recent call last):
File "/usr/bin/reposync", line 343, in <module>
main()
File "/usr/bin/reposync", line 175, in main
my.doRepoSetup()
File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 681, in doRepoSetup
return self._getRepos(thisrepo, True)
File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 721, in _getRepos
self._repos.doSetup(thisrepo)
File "/usr/lib/python2.7/site-packages/yum/repos.py", line 157, in doSetup
self.retrieveAllMD()
File "/usr/lib/python2.7/site-packages/yum/repos.py", line 88, in retrieveAllMD
dl = repo._async and repo._commonLoadRepoXML(repo)
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1470, in _commonLoadRepoXML
result = self._getFileRepoXML(local, text)
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1248, in _getFileRepoXML
size=102400) # setting max size as 100K
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1037, in _getFile
raise e
yum.Errors.NoMoreMirrorsRepoError: failure: repodata/repomd.xml from Centos-Base: [Errno 256] No more mirrors to try.
http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock/repodata/repomd.xml: [Errno -1] Error importing repomd.xml for Centos-Base: Damaged repomd.xml file
Tags repository linux centos redhat cobbler