Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2208535 - Prevent regenerating metadata for repositories that use complete mirroring
Summary: Prevent regenerating metadata for repositories that use complete mirroring
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Repositories
Version: 6.12.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.14.0
Assignee: Samir Jha
QA Contact: Partha Aji
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-05-19 12:56 UTC by Jeremy Lenz
Modified: 2023-11-08 14:19 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-11-08 14:19:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 36453 0 Normal Ready For Testing Prevent regenerating metadata for repositories that use complete mirroring 2023-06-01 13:22:54 UTC
Red Hat Issue Tracker SAT-17848 0 None None None 2023-05-22 13:19:07 UTC
Red Hat Product Errata RHSA-2023:6818 0 None None None 2023-11-08 14:19:39 UTC

Description Jeremy Lenz 2023-05-19 12:56:55 UTC
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.

Comment 4 Samir Jha 2023-05-30 14:10:12 UTC
Created redmine issue https://projects.theforeman.org/issues/36453 from this bug

Comment 6 Bryan Kearney 2023-06-09 00:03:19 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/36453 has been resolved.

Comment 7 Partha Aji 2023-07-03 20:27:19 UTC
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.

Comment 10 errata-xmlrpc 2023-11-08 14:19:23 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Satellite 6.14 security and bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:6818


Note You need to log in before you can comment on or make changes to this bug.