Bug 1446718

Summary: clean_backend_objects doesn't handle nil subscription_facet uuids properly
Product: Red Hat Satellite Reporter: Satellite Program <pm-sat>
Component: InfrastructureAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Jitendra Yejare <jyejare>
Severity: high Docs Contact:
Priority: medium    
Version: 6.2.0CC: adprice, bbuckingham, bkearney, jcallaha, jsherril, jyejare, mmccune, pm-sat
Target Milestone: UnspecifiedKeywords: PrioBumpField, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1434609 Environment:
Last Closed: 2018-02-21 16:54:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Comment 3 Jitendra Yejare 2017-12-20 08:57:06 UTC
Verified !

@ Satellite 6.3 snap 29

Steps:

As per steps in the original bug(https://bugzilla.redhat.com/show_bug.cgi?id=1434609#c6) of this bug.

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

then run the rake command,

# foreman-rake katello:clean_backend_objects COMMIT=true
=> Host 69 dockhost1 is partially missing subscription information.  Un-registering
1 orphaned consumer id(s) found in candlepin.
0 orphaned consumer id(s) found in pulp


Observation:

Visiting ContentHost page in Satellite says,
```
This Host is not currently registered with subscription-manager. Click here for registration information.
```

Hence changing the state to verified !

Comment 4 Satellite Program 2018-02-21 16:54:37 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.
> > 
> > https://access.redhat.com/errata/RHSA-2018:0336