[Satellite6] How to execute a Complete Capsule synchronization?
Environment
Red Hat Satellite 6
Issue
- A repository on a Capsule seems to be in a bad shape
- running the (default) Optimized Capsule Sync does not affect that repository
- how to forcefully synchronize that repository?
Resolution
A Complete Capsule sync can be triggered - optionally, it's possible to specify what Lifecycle Environment should be synchronized (hammer options --environment-id / --environment) in order to limit the complete sync of each and every repository on the Capsule.
- with WebUI -> Infrastructure -> Capsules -> select the Capsule -> Synchronize -> Complete Sync
- with hammer - configurable via option
--skip-metadata-check:false= Optimized Sync,true= Full Sync. Default isfalse, i.e. Optimized Capsule sync.
hammer -u <username> -p <password> capsule list
-
ID | NAME | URL | FEATURES
-|-|-|-
2 | example-capsule.usersys.redhat.com | https://example-capsule.usersys.redhat.com:9090 | Templates, Pulp Node, ...
1 | example.usersys.redhat.com | https://example.usersys.redhat.com:9090 | Pulp, TFTP, Puppet, Pu...
-|-|-|-
hammer -u <username> -p <password> capsule content synchronize --id <id from previous command> --skip-metadata-check true
For more KB articles/solutions related to Red Hat Satellite 6.x Capsule Sync Issues, please refer to the Consolidated Troubleshooting Article for Red Hat Satellite 6.x Capsule Sync Issues
Diagnostic Steps
The synchronization type from /var/log/foreman/production.log can be chosen with the following grep:
$ grep -A1 "Katello::Api::V2::CapsuleContentController#sync " /var/log/foreman/production.log
2018-03-20 12:38:14 265fd6ed [app] [I] Processing by Katello::Api::V2::CapsuleContentController#sync as JSON
2018-03-20 12:38:14 265fd6ed [app] [I] Parameters: {"id"=>"2-caps62-example-com", "skip_metadata_check"=>false, "api_version"=>"v2", "capsule_content"=>{"id"=>"2-caps62-example-com", "skip_metadata_check"=>false}}
--
2018-03-20 12:49:38 7186ebdd [app] [I] Processing by Katello::Api::V2::CapsuleContentController#sync as JSON
2018-03-20 12:49:38 7186ebdd [app] [I] Parameters: {"id"=>"2-caps62-example-com", "skip_metadata_check"=>true, "api_version"=>"v2", "capsule_content"=>{"id"=>"2-caps62-example-com", "skip_metadata_check"=>true}}
--
2018-03-20 13:35:53 4fc97b6e [app] [I] Processing by Katello::Api::V2::CapsuleContentController#sync as JSON
2018-03-20 13:35:53 4fc97b6e [app] [I] Parameters: {"api_version"=>"v2", "id"=>"2", "capsule_content"=>{}}
$
Check the settings of the skip_metadata_check parameter. From the above, the first and third Sync were Optimized, while the second was a Full Capsule Sync.
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.