Bug 1650127

Summary: Custom boolean facts with false value are not managed by Satellite.
Product: Red Hat Satellite Reporter: Raashika Raghuwanshi <rraghuwa>
Component: PuppetAssignee: Marek Hulan <mhulan>
Status: CLOSED ERRATA QA Contact: Vladimír Sedmík <vsedmik>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.4CC: egolov, lhellebr, mhulan
Target Milestone: 6.6.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: foreman-1.21.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-22 19:51:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Raashika Raghuwanshi 2018-11-15 11:56:45 UTC
Description of problem:
Custome Boolean Puppet facts with value False are not on the WebUI, Hammer output or with REST API. Only facts with value True are shown/stored.

Version-Release number of selected component (if applicable):
Satellite 6.4
Puppet 5

How reproducible:
Always

Steps to Reproduce:
In /opt/puppetlabs/puppet/cache/lib/facter 

# cat temp.rb
require 'facter'

Facter.add("always_true") do
  confine :kernel => "Linux"
  setcode do
    true
  end
end

Facter.add("always_false") do
  confine :kernel => "Linux"
  setcode do
    false
  end
end

Actual results:
- False value is not displayed
# hammer fact list --search "name=always_true"
----------------------|-------------|------
HOST                  | FACT        | VALUE
----------------------|-------------|------
lvmpig03 | always_true | true
----------------------|-------------|------

Expected results:
- False value should be displayed
# hammer fact list --search "name=always_false"
----------------------|-------------|------
HOST                  | FACT        | VALUE
----------------------|-------------|------
lvmpig03 | always_false | false
lvmpig03 | always_true | true
----------------------|-------------|------

Comment 1 Marek Hulan 2018-11-16 13:32:01 UTC
reproduced, valid bug

Comment 2 Marek Hulan 2018-11-16 13:32:32 UTC
Created redmine issue https://projects.theforeman.org/issues/25483 from this bug

Comment 4 Satellite Program 2018-12-06 21:13:27 UTC
Upstream bug assigned to mhulan

Comment 5 Satellite Program 2018-12-06 21:13:30 UTC
Upstream bug assigned to mhulan

Comment 6 Satellite Program 2018-12-22 13:11:57 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25483 has been resolved.

Comment 9 Bryan Kearney 2019-10-22 19:51:23 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-2019:3172