Project

General

Profile

Bug #21053

clean_backend_objects to remove pulp consumers not associated to any Content Host

Added by Brad Buckingham over 1 year ago. Updated 11 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Hosts
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1488415

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):
tfm-rubygem-katello-3.0.0.144-1.el7sat.noarch

How reproducible:
100%

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

History

#1 Updated by Justin Sherrill over 1 year ago

  • Subject changed from clean_backend_objects to remove pulp consumers not associated to any Content Host to clean_backend_objects to remove pulp consumers not associated to any Content Host
  • Legacy Backlogs Release (now unused) set to 114

Also available in: Atom PDF