Bug 1434609 - clean_backend_objects doesn't handle nil subscription_facet uuids properly
Summary: clean_backend_objects doesn't handle nil subscription_facet uuids properly
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Infrastructure
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: Unspecified
Assignee: Justin Sherrill
QA Contact: jcallaha
Depends On:
TreeView+ depends on / blocked
Reported: 2017-03-21 22:16 UTC by Justin Sherrill
Modified: 2019-06-13 21:25 UTC (History)
4 users (show)

Fixed In Version: rubygem-katello-
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1446718 (view as bug list)
Last Closed: 2017-06-20 17:23:25 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 18972 0 Normal Closed clean_backend_objects doesn't handle nil subscription_facet uuids properly 2020-11-23 08:11:09 UTC
Red Hat Product Errata RHBA-2017:1553 0 normal SHIPPED_LIVE Satellite 6.2.10 Async Bug Release 2017-06-20 21:19:07 UTC

Description Justin Sherrill 2017-03-21 22:16:47 UTC
Currently the rake katello:clean_backend_objects does not remove the host if its uuid is nil on subscription-facet

Comment 1 Justin Sherrill 2017-03-21 22:16:51 UTC
Created from redmine issue http://projects.theforeman.org/issues/18972

Comment 2 Justin Sherrill 2017-03-21 22:16:54 UTC
Upstream bug assigned to jsherril

Comment 4 Satellite Program 2017-03-23 20:12:48 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/18972 has been resolved.

Comment 6 jcallaha 2017-05-25 20:01:25 UTC
Verified in Satellite 6.2.10 Snap 1.

In the foreman-rake console run the following commands
1. sub = Host.find(ID).subscription_facet
2. sub.uuid = nil
3. sub.save

Then run the rake command

-bash-4.2# foreman-rake katello:clean_backend_objects COMMIT=true
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_theme_satellite-0.1.43/app/models/concerns/satellite_packages.rb:4: warning: already initialized constant Katello::Ping::PACKAGES
/opt/theforeman/tfm/root/usr/share/gems/gems/katello- warning: previous definition of PACKAGES was here
Host 2 docker2  is partially missing.  Un-registering
Host 3 docker3  is partially missing.  Un-registering
Host 5 docker4  is partially missing.  Un-registering
Host 108 docker108  is partially missing.  Un-registering
1 orphaned consumer id(s) found.

When visiting the content host page for that host, you see the following message:
"This Host is not currently registered with subscription-manager. Click here for registration information."

Comment 8 errata-xmlrpc 2017-06-20 17:23:25 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, and where to find the updated
files, follow the link below.

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


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