操作系统: CentOS:6.5
cobbler 版本:2.4.0
问题说明 :cobbler reposync 同步epel 和updates 源的时候报错
错误信息:
received on stderr:
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 169, in sync
return self.yum_sync(repo)
File "/usr/lib/python2.6/site-packages/cobbler/action_reposync.py", line 402, in yum_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
Exception occured: <class 'cobbler.cexceptions.CX'>
Exception value: 'reposync failed, retry limit reached, aborting'
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: 'reposync failed, retry limit reached, aborting'
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 251, in runner
name=None, 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 147, in run
utils.die(self.logger,"reposync failed, retry limit reached, aborting")
File "/usr/lib/python2.6/site-packages/cobbler/utils.py", line 137, in die
raise CX(msg)
!!! TASK FAILED !!!
解决方法:
上述错误网上搜索可能是cobbler的bug,下面的方法只是绕过这个问题
把修改epel 和updates 的协议换成rsync,源地址更换为中科大的地址(国内源地址中,163和sohu不支持rsync协议),
cobbler repo edit --name=centos6.5-x86_64-epel --mirror=rsync://mirrors.ustc.edu.cn/epel/6/x86_64/ --arch=x86_64 --breed=rsync cobbler repo edit --name=centos6.5-x86_64-updates --mirror=rsync://mirrors.ustc.edu.cn/centos/6/updates/x86_64/ --arch=x86_64 --breed=rsync