Bug 1650127

Summary: Custom boolean facts with false value are not managed by Satellite.
Product: Red Hat Satellite 6 Reporter: Raashika Raghuwanshi <rraghuwa>
Component: PuppetAssignee: Marek Hulan <mhulan>
Status: ON_QA --- 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: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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 pm-sat@redhat.com 2018-12-06 21:13:27 UTC
Upstream bug assigned to mhulan@redhat.com

Comment 5 pm-sat@redhat.com 2018-12-06 21:13:30 UTC
Upstream bug assigned to mhulan@redhat.com

Comment 6 pm-sat@redhat.com 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.