How to forcefully regenerate metadata for a particular repository on Red Hat Satellite 6?
Environment
- Red Hat Satellite 6.x
- Metadata re-generation for a particular Repository.
Issue
- How to forcefully regenerate metadata for a particular repository?
- Unable to list the packages under RHEL7 repo after successful synchronization of repositories.
- System registered to Satellite server fails with an error message during
yumexecution. - Red Hat Satellite is not regenerating repodata.
# yum repolist
...
Setting up Install Process
https://satellite.example.com/pulp/repos/GSSLAB_ORG/Library/content/dist/rhel/server/6/6Server/x86_64/os/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Resolution
To regenerate metadata for a repository, follow the below steps:-
- Login to the Satellite WEB UI and navigate to Content --> Products.
- Click on the Product Name to which the repository belongs to and this would list all the available repositories for the Product.
- Now click on the repository name for which metadata needs to be re-generated, this will show more details of the repository.
- In Satellite 6.5-6.10, click to "Select Action" button on top right, and select "Republish Repository Metadata". Wait until the task is completed and you are done.
- Since Satellite 6.11, the WebUI action is gone so a manual command must be executed. Let apply the below steps instead. The opened repository URL would list the
repo_id&product_idfor this repository.
https://satellite.example.com/products/89/repositories/12345
where in the above url : `12345` is the `repo_id` and `89` is the product_id.
- run this command from Satellite shell - replace
12345by your repository ID:
echo "ForemanTasks.async_task(Actions::Katello::Repository::MetadataGenerate, Katello::Repository.find(12345))" | foreman-rake console
- Wait until the task is completed.
For more KB articles/solutions related to Red Hat Satellite 6.x Repository Issues, please refer to the Red Hat Satellite Consolidated Troubleshooting Article for Red Hat Satellite 6.x Repository Issues.
SBR
Product(s)
Components
Category
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.