关于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