Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1489113 - [RFE] RHUI 3 repo_importers not configured for remove_missing
[RFE] RHUI 3 repo_importers not configured for remove_missing
Status: CLOSED ERRATA
Product: Red Hat Update Infrastructure for Cloud Providers
Classification: Red Hat
Component: Tools (Show other bugs)
3.0.0
Unspecified Unspecified
unspecified Severity urgent
: 3.0.5
: 3.0.x
Assigned To: Milan Kubík
Radek Bíba
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-09-06 13:41 EDT by Craig Donnelly
Modified: 2018-09-05 13:04 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-09-05 13:04:27 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:2649 None None None 2018-09-05 13:04 EDT

  None (edit)
Description Craig Donnelly 2017-09-06 13:41:29 EDT
Description of problem:
Pulp has the capability to ensure that we do not keep around RPMs that are no longer published in a repository or to recover from other issues with the consumed repositories based on repodata changes or otherwise.

This feature is called 'remove_missing'.

In Satellite 6.2, this is defaulted to on for all individual repositories that are enabled within pulp.

There is the ability to signify this on a per-repository basis, or globally via pulp server configuration.

I believe this should be in place here to handle changes that will/are occurring on the CDN that could result in customers filesystems filling up or otherwise filling in MongoDB with unnecessary data (as well as the shared storage).

Version-Release number of selected component (if applicable):
RHUI 3

Steps to Reproduce:
1. Sync any repo.
2. Check config output of any repo in mongo:
  # mongodb pulp_server
  > db.repo_importers.findOne()
3. See that there is no config statement for remove_missing.

Actual results:
When syncing repositories where the repodata checksum changes, or where Red Hat has removed packages from being published due to issues, RHUI does not clean these up or remove unused items. Instead, it duplicates the synced content.

Expected results:
We should make remove_missing the default for all enabled repositories, or set it globally.

Additional info:
To set remove_missing globally within a pulp instance, you can modify /etc/pulp/server/plugins.conf.d/yum_importer.json to include:

"remove_missing": true,

( a la: sed -i 's/{/{ "remove_missing": true,/' /etc/pulp/server/plugins.conf.d/yum_importer.json )

This goes inside the same json block that is containing the proxy configs.
Placing it here will enforce the setting across all repositories.
Comment 4 Radek Bíba 2017-09-07 02:13:19 EDT
> 2. Check config output of any repo in mongo:
>   # mongodb pulp_server

Did you mean # mongo pulp_database?
Comment 5 Craig Donnelly 2017-09-07 10:07:24 EDT
Radek,

You are correct, sorry about that.
Comment 6 Radek Bíba 2017-09-07 10:19:45 EDT
No worries. Just making sure we've got the right reproducer. Thanks!
Comment 7 Milan Kubík 2018-07-23 08:54:36 EDT
Hello Craig,

you mention that Satellite 6.2 solved that issue, did they set the global option in the configuration file
or was it by passing an option when creating a repository?

Second, what would you have us do with already existing instances? Should we attempt to rewrite the configuration
on pulp rpm update or, which I think is better, clearly document that only new instances will have the option on
and describe the option in the erratum docs. This way we do not change something the customer may want to use (i.e. the current absent default)
Comment 8 Craig Donnelly 2018-07-23 19:42:52 EDT
Milan,

The standard in Satellite 6.2 was to create the repositories with that trait - or to set it true/false when a user modified the 'Mirror-on-Sync' setting within Satellite on a per-repository basis.
Comment 9 Radek Bíba 2018-07-30 06:05:46 EDT
Actually, what's the use case in RHUI? RHUI can only sync repos from Red Hat CDN (*), and AFAIK we don't remove packages from CDN; we don't take back what we've once shipped. Therefore, it doesn't seem necessary to remove missing stuff as nothing should become missing.

(*) OK, RHUI can also sync Docker containers and OSTree contents, but that's done outside of yum_importer, isn't it? Likewise, you can upload packages from a local directory to a custom repo, but that's not syncing per se.
Comment 16 errata-xmlrpc 2018-09-05 13:04:27 EDT
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, 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/RHBA-2018:2649

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