Bug 1488415 - [Improvement] clean_backend_objects to remove pulp consumers not associated to any Content Host
Summary: [Improvement] clean_backend_objects to remove pulp consumers not associated t...
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hosts - Content
Version: 6.2.11
Hardware: x86_64
OS: Linux
medium vote
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Stephen Wadeley
Depends On:
TreeView+ depends on / blocked
Reported: 2017-09-05 10:36 UTC by Pavel Moravec
Modified: 2020-12-14 09:52 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-05-02 18:52:55 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 21053 0 Normal New clean_backend_objects to remove pulp consumers not associated to any Content Host 2019-12-12 02:21:48 UTC

Description Pavel Moravec 2017-09-05 10:36:51 UTC
Description of problem:
Currently clean_backend_objects removes Content Hosts that miss either pulp or candlepin counterpart. There are cases when the opposite is required, i.e. when pulp or candlepin consumer exists for non-existing Content Host.

We shall have a mechanism to remove such pulp/candlepin consumers to make those DBs aligned with foreman (Content) Hosts db.

It can be achieved either by extending clean_backend_objects script (preffered from user-point of view, could be problematic due to current implementation), or implementing a new one.

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

How reproducible:

Steps to Reproduce:
1. Have some pulp or candlepin consumer without associated Content Host (i.e. (re)create a pulp/candlepin consumer manually, e.g. by 1) registering a host, 2) taking pulp and candlepin DB backups, 3) unregistering the host, 4) reverting pulp/candlepin DBs prior unregister)
2. foreman-rake katello:clean_backend_objects
3. Check if pulp/candlepin consumers match the foreman Content Hosts

Actual results:
extra pulp/candlepin consumer exists

Expected results:
no such orphaned consumer present

Additional info:

Comment 2 Pavel Moravec 2017-09-05 11:28:05 UTC
Just pulp consumers can be orphaned, since


finds the "in candlepin but not in katello" hosts and the rake script cleans them properly.

The pitty is this method uses


that has no equivalent for pulp, to enhance the rake script easily.

Comment 4 Brad Buckingham 2017-09-21 14:50:34 UTC
Created redmine issue http://projects.theforeman.org/issues/21053 from this bug

Comment 5 Bryan Kearney 2019-04-01 12:13:16 UTC
The Satellite Team is attempting to provide an accurate backlog of bugzilla requests which we feel will be resolved in the next few releases. We do not believe this bugzilla will meet that criteria, and have plans to close it out in 1 month. This is not a reflection on the validity of the request, but a reflection of the many priorities for the product. If you have any concerns about this, feel free to contact Red Hat Technical Support or your account team. If we do not hear from you, we will close this bug out. Thank you.

Comment 6 Bryan Kearney 2019-05-02 18:52:55 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and while we recognize that it is a valid request, we do not expect this to be implemented in the product in the foreseeable future. This is due to other priorities for the product, and not a reflection on the request itself. We are therefore closing this out as WONTFIX. If you have any concerns about this, please do not reopen. Instead, feel free to contact Red Hat Technical Support. Thank you.

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