cobbler 无法同步到 repo 我添加了

cobbler 无法同步到 repo 我添加了

我将 centos 基础仓库添加到 cobbler 中:

cobbler repo add --arch=x86_64 --name=Centos-Base --mirror=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra

但运行 cobbler reposync 失败:

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

答案1

这样做不行,因为 Cobbler 无法处理镜像列表功能。该--mirror选项必须指定要从中下载存储库的特定 URL。

相关内容