How to forcefully regenerate metadata of a content view or repository on Red Hat Satellite 6?

Solution Verified - Updated -

Environment

  • Red Hat Satellite 6

Issue

  • How to recreate metadata of a Content View or Repository?
  • Unable to update package(s) and the below error is faced:

    https://satellite.lab.example.com/pulp/repos/Organization/Library/RHEL7_Baseline/content/dist/rhel/server/7/7Server/x86_64/os/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
    

Resolution

  • To forcefully regenerate metadata of a Content View or Repository, the below steps need to be followed on the Red Hat Satellite WebUI:

    • For a Content View:

      • Go to Content -> Content Views -> Select the particular Content View -> Click on Publish New Version -> Check mark the box of Force Yum Metadata Regeneration -> Save.
    • For an existing version of Content View:

      • Go to Content -> Content Views -> Select the content view -> Click Versions tab -> Click in Actions column beside Promote drop down arrow -> Regenerate Repository Metadata
    • For a particular repository:

      • Go to Content -> Products -> Select the Product -> Click on the particular repository -> Select Action -> Republish Repository Metadata.
    • Via hammer:

      # hammer content-view version republish-repositories --content-view-id 4  --version 2.0
      

      Replace 4 and 2.0 according to your environment.

          # hammer content-view list    ==> this gives the content-view-id for the concerned content view
          # hammer content-view info --id=4    ==> this gives the version of that content view. [ replace 4 by the id from previous command ]
      
  • For pulp-3 / since Satellite 6.10, follow this solution and hammer command like:

hammer content-view version republish-repositories --id 23 --force true

to forcefully republish a given Content View version.

For more KB articles/solutions related to Red Hat Satellite 6.x Content View Issues, please refer to the Red Hat Satellite Consolidated Troubleshooting Article for Red Hat Satellite 6.x Content View Issues

Root Cause

  • The repodata of a Content View or Repository is unavailable or corrupted.

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