Chapter 10. Recovering corrupted content
Resynchronize corrupted repositories on Satellite Server, verify checksums on Capsule Servers, and republish repository or content view metadata when the repository metadata no longer matches stored content.
Additional resources
10.1. Recovering a corrupted repository by using Satellite web UI Copy linkLink copied to clipboard!
Recover a corrupted repository with optimized or complete advanced sync, and optionally verify content checksums to confirm packages match upstream sources.
Procedure
- In the Satellite web UI, navigate to Content > Products.
- Select the product containing the corrupted repository.
- Select the name of a repository you want to synchronize.
- To perform optimized sync or complete sync, select Advanced Sync from the Select Action menu.
- Select the required option and click Sync.
- Optional: To verify the checksum for a Yum repository, click Verify Content Checksum from the Select Action menu.
Additional resources
10.2. Recovering a corrupted repository by using Hammer CLI Copy linkLink copied to clipboard!
Recover a corrupted repository by using optimized sync, complete sync, or validate-content synchronization when packages or metadata no longer match expected content.
Procedure
Obtain a list of repository IDs:
$ hammer repository list \ --organization "My_Organization"Synchronize a corrupted repository using the necessary option:
For the optimized synchronization:
$ hammer repository synchronize \ --id My_IDFor the complete synchronization:
$ hammer repository synchronize \ --id My_ID \ --skip-metadata-check trueFor validating content of a Yum repository:
$ hammer repository synchronize \ --id My_ID \ --validate-contents true
Additional resources
10.3. Recovering corrupted content on a Capsule Server by using Satellite web UI Copy linkLink copied to clipboard!
Verify checksums for a lifecycle environment or content view on your Capsule Server when hosts cannot consume content and you need to repair corrupted files on the Capsule Server.
Procedure
- In the Satellite web UI, navigate to Infrastructure > Capsules.
- Select your Capsule Server.
Recover corrupted content on your Capsule Server.
- To repair content in a lifecycle environment, click the options menu icon next to your lifecycle environment and select Verify Content Checksum.
- To repair content in a content view, click the options menu icon next to your content view and select Verify Content Checksum.
Verification
- In the Satellite web UI, navigate to Monitor > Satellite Tasks > Tasks.
-
Search for
Verify checksum for content. - Verify that the task completed successfully.
10.4. Recovering corrupted content on a Capsule Server by using CLI Copy linkLink copied to clipboard!
Verify checksums on your Capsule Server for a repository, content view, lifecycle environment, or all Capsule Server content when hosts cannot consume synchronized packages.
Prerequisites
- The lifecycle environment, content view, or repository that you want to repair is available on the Capsule Server.
Procedure
Display a list of all Capsules:
$ hammer capsule listNote the ID of your Capsule Server.
Recover corrupted content on your Capsule Server:
Repair content in a content view:
$ hammer capsule content verify-checksum \ --content-view-id My_Content_View_ID \ --id My_Capsule_Server_ID \ --organization-id My_Organization_IDRepair content in a lifecycle environment:
$ hammer capsule content verify-checksum \ --id My_Capsule_Server_ID \ --lifecycle-environment-id My_Lifecycle_Environment_ID \ --organization-id My_Organization_IDRepair content in a repository:
$ hammer capsule content verify-checksum \ --id My_Capsule_Server_ID \ --organization-id My_Organization_ID \ --repository-id My_Repository_IDRepair all content on your Capsule Server:
$ hammer capsule content verify-checksum \ --id My_Capsule_Server_ID
Verification
Verify that the task completed successfully:
$ hammer task list --search "Verify checksum for content"
10.5. Republishing repository metadata by using Satellite web UI Copy linkLink copied to clipboard!
Republish repository metadata when published metadata does not match repository contents.
Red Hat recommends a complete repository sync or publishing a new content view version to repair broken metadata instead.
Prerequisites
The mirroring policy of the repository is not set to Complete Mirroring. For more information, see Section 6.6, “Mirroring policies overview”.
This action is not available for repositories that use the Complete Mirroring policy because the metadata is copied verbatim from the upstream source of the repository.
Procedure
- In the Satellite web UI, navigate to Content > Products.
- Select the product that includes the repository for which you want to republish metadata.
- On the Repositories tab, select a repository.
- To republish metadata for the repository, click Republish Repository Metadata from the Select Action menu.
10.6. Republishing repository metadata by using CLI Copy linkLink copied to clipboard!
Republish repository metadata when published metadata does not match repository contents.
Red Hat recommends a complete repository sync or publishing a new content view version to repair broken metadata in favor of republishing repository metadata.
Prerequisites
The mirroring policy of the repository is not set to Complete Mirroring. For more information, see Section 6.6, “Mirroring policies overview”.
This action is not available for repositories that use the Complete Mirroring policy because the metadata is copied verbatim from the upstream source of the repository.
Procedure
Republish metadata for your repository:
$ hammer repository verify-checksum \ --name "My_Repository_Name" \ --organization-id My_Organization_ID \ --product "My_Product_Name"
Verification
Verify that the task completed successfully:
$ hammer task list --search "Metadata generate repository"
10.7. Republishing content view metadata by using Satellite web UI Copy linkLink copied to clipboard!
Republish content view version metadata when hosts report checksum mismatches. Satellite can regenerate metadata for repositories that do not use complete mirroring.
Republishing regenerates metadata for all repositories in the content view version that do not adhere to the Complete Mirroring policy.
Prerequisites
- The content view version includes repositories that do not use the Complete Mirroring policy.
Procedure
- In the Satellite web UI, navigate to Content > Lifecycle > Content Views.
- Select a content view.
- On the Versions tab, select a content view version.
- To republish metadata for the content view version, click Republish repository metadata from the options icon.
10.8. Republishing content view metadata by using CLI Copy linkLink copied to clipboard!
Republish content view version metadata when hosts report checksum mismatches. Satellite can regenerate metadata for repositories that do not use complete mirroring.
Republishing regenerates metadata for all repositories in the content view version that do not adhere to the Complete Mirroring policy.
Prerequisites
- The content view version includes repositories that do not use the Complete Mirroring policy.
Procedure
Republish metadata for your content view version:
$ hammer content-view version verify-checksum --id My_Content_View_Version_ID
Verification
Verify that the task completed successfully:
$ hammer task list --search "Verify checksum of repositories in"