I'm using this command to add a repo to 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"
This works as expected, but when I issue the command:
cobbler reposync --only="Centos7-EPEL"
The reposync fails (see full syntax at bottom of query). I believe this is because the rpm's at the mirror address are in additional folders from A-Z rather than at the specified address. The reason i have come to this conclusion is because when I follow the same method with EPEL-6 (i.e. rather than EPEL-7) all of the rpm's are on the same page so when I add the repo substituting in this link:
http://www.mirrorservice.org/sites/download.fedora.redhat.com/pub/epel/6/x86_64/
the reposync process works.
Do you think my assumption is correct, and if so what could I do to resolve this?
Full error:
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 !!!
Add the breed flag to the command and specify yum. see below working example for epel