Satellite will not sync against an external repository

Solution Unverified - Updated -

Environment

satellite 5.4

Issue

  • Satellite will not sync against an external repository
  • the reposync logs are empty on the satellite
  • spacewalk-repo-sync exists just after being started
  • getting a python error while running spacewalk-repo-sync

Resolution

  • contact the maintainer of the repository if you want to use this feature of satellite with that repository, they will need to add support for  yum to that repository.
  • download all the packages and push them to the satellite with rhn-push

Root Cause

the repository metadata is abscent from the repository, making it impossible for yum to use it.

Diagnostic Steps

  • the logs of the syncronization in /var/log/rhn/reposync/ are similar to this

    Sync started: Tue Aug 16 10:30:36 2011
    ['/usr/bin/spacewalk-repo-sync', '--channel', 'dell_svadmin', '-u', 'http://linux.dell.com/repo/hardware/latest/platform_independent/rh50_64/srvadmin-x86_64/']
    
  • when attempting a manual syncronization, you get the following traceback :

    # spacewalk-repo-sync --channel dell_svadmin -u http://linux.dell.com/repo/hardware/latest/platform_independent/rh50_64/srvadmin-x86_64/
    Traceback (most recent call last):
      File "/usr/bin/spacewalk-repo-sync", line 72, in ?
        sys.exit(abs(main() or 0))
      File "/usr/bin/spacewalk-repo-sync", line 66, in main
        sync.main()
      File "/usr/share/rhn/satellite_tools/reposync.py", line 103, in main
        self.import_packages(plugin, url)
      File "/usr/share/rhn/satellite_tools/reposync.py", line 135, in import_packages
        packages = plug.list_packages()
      File "/usr/share/rhn/satellite_tools/repo_plugins/yum_src.py", line 73, in list_packages
        sack.populate(repo, 'metadata', None, 0)
      File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 168, in populate
        if self._check_db_version(repo, mydbtype):
      File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 226, in _check_db_version
        return repo._check_db_version(mdtype)
      File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1226, in _check_db_version
        repoXML = self.repoXML
      File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1399, in <lambda>
        repoXML = property(fget=lambda self: self._getRepoXML(),
      File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1395, in _getRepoXML
        raise Errors.RepoError, msg
    yum.Errors.RepoError:
     Cannot retrieve repository metadata (repomd.xml) for repository: dell_svadmin. Please verify its path and try again
    
  • browsing the repository will show that there is no "repodata" folder at the given url

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments