我正在使用此命令向cobbler添加回购:
cobbler repo add \
--name=Centos7-EPEL \
--mirror=http://www.mirrorservice.org/sites/download.fedora.redhat.com/pub/epel/7/x86_64/ \
--priority=50 \
--createrepo-flags="-c cache"
这可以按预期工作,但是当我发出命令时:
cobbler reposync --only="Centos7-EPEL"
重新同步失败(请参阅查询底部的完整语法)。我相信这是因为镜像地址的rpm位于A-Z的附加文件夹而不是指定的地址。 我得出这个结论的原因是因为当我使用与EPEL-6相同的方法(即而不是EPEL-7)时,所有的rpm都在同一页上,所以当我在这个链接中添加repo替换时:
http://www.mirrorservice.org/sites/download.fedora.redhat.com/pub/epel/6/x86_64/
重新同步过程有效。
你认为我的假设是正确的,如果是的话,我该怎么做才能解决这个问题?
完整错误:
hello, reposync
run, reposync, run!
running: rsync -rltDv --copy-unsafe-links --delete-after -e ssh --delete --exclude-from=/etc/cobbler/rsync.exclude http://www.mirrorservice.org/sites/download.fedora.redhat.com/pub/epel/7/x86_64/ /var/www/cobbler/repo_mirror/Centos7-EPEL
received on stdout:
received on stderr: ssh: Could not resolve hostname http: Name or service not known
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(600) [receiver=3.0.6]
Exception occured: <class 'cobbler.cexceptions.CX'>
Exception value: 'cobbler reposync failed'
Exception Info:
File "/usr/lib/python2.6/site-packages/cobbler/utils.py", line 129, in die
raise CX(msg)
Exception occured: <class 'cobbler.cexceptions.CX'>
Exception value: 'cobbler reposync failed'
Exception Info:
File "/usr/lib/python2.6/site-packages/cobbler/action_reposync.py", line 125, in run
self.sync(repo)
File "/usr/lib/python2.6/site-packages/cobbler/action_reposync.py", line 173, in sync
return self.rsync_sync(repo)
File "/usr/lib/python2.6/site-packages/cobbler/action_reposync.py", line 247, in rsync_sync
utils.die(self.logger,"cobbler reposync failed")
File "/usr/lib/python2.6/site-packages/cobbler/utils.py", line 137, in die
raise CX(msg)
reposync failed, tries left: 0
reposync failed, retry limit reached, skipping
running: chown -R root:apache /var/www/cobbler/repo_mirror/Centos7-EPEL
received on stdout:
received on stderr:
running: chmod -R 755 /var/www/cobbler/repo_mirror/Centos7-EPEL
received on stdout:
received on stderr:
Exception occured: <class 'cobbler.cexceptions.CX'>
Exception value: 'overall reposync failed, at least one repo failed to synchronize'
Exception Info:
File "/usr/lib/python2.6/site-packages/cobbler/utils.py", line 129, in die
raise CX(msg)
Exception occured: <class 'cobbler.cexceptions.CX'>
Exception value: 'overall reposync failed, at least one repo failed to synchronize'
Exception Info:
File "/usr/lib/python2.6/site-packages/cobbler/remote.py", line 89, in run
rc = self._run(self)
File "/usr/lib/python2.6/site-packages/cobbler/remote.py", line 248, in runner
3), name=name, nofail=nofail, logger=self.logger)
File "/usr/lib/python2.6/site-packages/cobbler/api.py", line 808, in reposync
return reposync.run(name)
File "/usr/lib/python2.6/site-packages/cobbler/action_reposync.py", line 154, in run
utils.die(self.logger,"overall reposync failed, at least one repo failed to synchronize")
File "/usr/lib/python2.6/site-packages/cobbler/utils.py", line 137, in die
raise CX(msg)
!!! TASK FAILED !!!
答案 0 :(得分:1)
将品种标志添加到命令并指定yum。请参阅以下epel的工作示例
cobbler repo add \
--mirror=https://dl.fedoraproject.org/pub/epel/7/x86_64/ \
--name=epel \
--arch=x86_64 \
--breed=yum