Bug 1386430

Summary: subscription-manager facts are not updated in candlepin
Product: Red Hat Satellite Reporter: Tom McKay <tomckay>
Component: Hosts - ContentAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: Brad Buckingham <bbuckingham>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2.0CC: bbuckingham, bkearney, jcallaha
Target Milestone: UnspecifiedKeywords: 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: Environment:
Last Closed: 2018-02-21 16:51:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Tom McKay 2016-10-18 23:49:07 UTC
I created a custom fact on a registered host:
<pre>
$ cat /etc/rhsm/facts/override.facts
{
  "custom.fact": "2222"
}
$ subscription-manager facts --update
Successfully updated the system facts.
</pre>
This fact, while it shows up in the UI on the facts page, does not persist itself into candlepin. I would guess that non-custom fact updates are similarly ignored.

Facts sent to either /rhsm/facts or /api/hosts/facts need to be persisted to candlepin, where applicable.

Comment 1 Tom McKay 2016-10-18 23:49:11 UTC
Created from redmine issue http://projects.theforeman.org/issues/17002

Comment 3 Bryan Kearney 2016-10-19 20:05:45 UTC
Upstream bug assigned to jsherril

Comment 4 Bryan Kearney 2016-11-07 17:05:12 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/17002 has been resolved.

Comment 5 Brad Buckingham 2017-08-09 13:06:27 UTC
Verified on Satellite 6.3 SNAP 10: satellite-6.3.0-16.0.beta.el7sat.noarch, tfm-rubygem-katello-3.4.4-1.el7sat.noarch


- registered client
-created /etc/rhsm/facts/override.facts containing:

{
  "custom.fact": "2222",
  "custom.fact2": "3333"
}

# subscription-manager facts --update
Successfully updated the system facts.

#subscription-manager facts

...
cpu.topology_source: kernel /sys cpu sibling lists
custom.fact: 2222
custom.fact2: 3333
...


- also confirmed that the dynflow task included Actions::Candlepin::Consumer::Update to update the facts

Comment 6 Bryan Kearney 2018-02-21 16:45:18 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

Comment 7 Satellite Program 2018-02-21 16:51:07 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