Description of problem: See discussion in https://bugzilla.redhat.com/show_bug.cgi?id=2184278 Regenerating repository metadata is dangerous for repositories that use the 'mirror_complete' mirroring policy because it will generate metadata locally, which means your repository is no longer completely mirrored. The previous BZ addresses this in the web UI. However, you can still regenerate repository metadata for 'mirror_complete' repositories using the API or Hammer. We need to harden the backend code to 1. Refuse to do this for repositories that use complete mirroring 2. When regenerating metadata for CV version repositories, skip repos that use complete mirroring.
Created redmine issue https://projects.theforeman.org/issues/36453 from this bug
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/36453 has been resolved.
Created and synced 2 repositories one with complete_mirror policy and the other with content_only policy # hammer repository republish --id=1 --force=1 Could not republish the repository.: Metadata republishing is not allowed on repositories with the 'Complete Mirroring' mirroring policy. # hammer repository republish --id=3 --force=1 [....................................................................................................................................................................] [100%] Verified that the force parameter has been deprecated # hammer repository republish --id=1 --help Usage: hammer repository republish [OPTIONS] Options: .... --force BOOLEAN Force metadata regeneration to proceed. (Deprecated) .... Added both repositories to a content view and published. Followed that with hammer content-view version republish --id=6 [....................................................................................................................................................................] [100%] Noticed the content only repo's metadata got re-generated and the complete mirror one was ignored.