为cobbler自动化安装系统工具添加epel源

关于cobbler的安装及部署,参考:CentOS 6.5自动化运维之基于cobbler服务的自动化安装操作系统详解http://blog.csdn.net/reblue520/article/details/51398512


本地源资源有限,可以添加epel源
# cobbler repo add --name=centos6.5-x86_64-epel --mirror=http://epel.mirrors.arminco.com/6Server/x86_64/ --arch=x86_64 --breed=yum


# cobbler reposync

报错:
task started: 2016-05-05_173249_reposync
task started (id=Reposync, time=Thu May  5 17:32:49 2016)
hello, reposync
run, reposync, run!
running: rsync -rltDv --copy-unsafe-links --delete-after -e ssh --delete --exclude-from=/etc/cobbler/rsync.exclude http://epel.mirrors.arminco.com/6Server/x86_64/ /var/www/cobbler/repo_mirror/centos6.5-x86_64-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: unexplained error (code 255) 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 126, 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 126, in run
    self.sync(repo)
   File "/usr/lib/python2.6/site-packages/cobbler/action_reposync.py", line 174, in sync
    return self.rsync_sync(repo)
   File "/usr/lib/python2.6/site-packages/cobbler/action_reposync.py", line 275, in rsync_sync
    utils.die(self.logger,"cobbler reposync failed")
   File "/usr/lib/python2.6/site-packages/cobbler/utils.py", line 134, 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 126, 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 87, in run
    rc = self._run(self)
   File "/usr/lib/python2.6/site-packages/cobbler/remote.py", line 250, in runner
    name=None, nofail=nofail, logger=self.logger)
   File "/usr/lib/python2.6/site-packages/cobbler/api.py", line 820, in reposync
    return reposync.run(name)
   File "/usr/lib/python2.6/site-packages/cobbler/action_reposync.py", line 148, in run
    utils.die(self.logger,"reposync failed, retry limit reached, aborting")
   File "/usr/lib/python2.6/site-packages/cobbler/utils.py", line 134, in die
    raise CX(msg)


!!! TASK FAILED !!!



通过cobbler repo add --help 可以看出breed支持wget、yum、rsync协议,换成wget后ok

# yum install -y wget
# cobbler repo add --name=centos6.5-x86_64-epel --mirror=http://epel.mirrors.arminco.com/6Server/x86_64/ --arch=x86_64 --breed=wget


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值