Bug 1571973

Summary: Empty puppet facts are discarded by the Satellite
Product: Red Hat Satellite Reporter: Mihir Lele <mlele>
Component: PuppetAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED WONTFIX QA Contact: Peter Ondrejka <pondrejk>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2.10CC: oprazak
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-12-03 12:53:48 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 Mihir Lele 2018-04-25 20:41:31 UTC
Description of problem: 


Version-Release number of selected component (if applicable): 6.2.10

(Customer version 6.2.10, local reproducer version 6.2.12 and also 6.3.0 with puppet 3. )

How reproducible:  Always 


Steps to Reproduce:
1.  Create a rb file to report custom fact on a host registered with Satellite:

# cat /var/lib/puppet/facts/custom_fact.rb
Facter.add(:custom_fact) do
  setcode do
     Facter::Util::Resolution.exec('ls -1 /opt/acme/ | egrep \'dir\' | sort | tr \'\n\' \',\' | sed -e \'s/,$//g\'')
  end
end


2.  Create a directory under /opt/acme/

# mkdir -p /opt/acme/dir1

3.  Check the facter output on the host

[root@host72 ~]# facter -p | grep custom_fact
custom_fact => dir1

4. Run puppet agent to report the custom fact.

5. Check the hammer host facts output: (or the facts from the satellite webui for the same host)

[root@satellite ~]# hammer host facts --name host72.example.com | grep custom_fact
custom_fact                          | dir1  


6.  Remove the directory from the host

# rm -rf /opt/acme/dir1

7. Check facter output on the host. It should now report a null value.

[root@host72 ~]# facter -p | grep custom
custom_fact => 

8. Run puppet agent to report the custom fact


9. Check the hammer host facts output: (or the facts from the satellite webui for the same host)

[root@satellite ~]# hammer host facts --name host72.example.com | grep custom_fact
[root@satellite ~]


So the custom fact key:value gets completely discarded from the Satellite end.


Actual results:

custom facts get discarded completely 

Expected results:

Satellite should indicate that custom fact has a null value. Something like:


[root@satellite ~]# hammer host facts --name host72.example.com | grep custom_fact
custom_fact  |   null

Additional info:

Comment 2 Mihir Lele 2018-06-17 11:00:05 UTC
FYI: Tested on Sat 6.3.1,puppet 4: Issue is reproducible

Comment 3 Ondřej Pražák 2018-08-13 13:36:46 UTC
Created redmine issue http://projects.theforeman.org/issues/24595 from this bug

Comment 5 Bryan Kearney 2019-11-04 14:34:13 UTC
The Satellite Team is attempting to provide an accurate backlog of bugzilla requests which we feel will be resolved in the next few releases. We do not believe this bugzilla will meet that criteria, and have plans to close it out in 1 month. This is not a reflection on the validity of the request, but a reflection of the many priorities for the product. If you have any concerns about this, feel free to contact Red Hat Technical Support or your account team. If we do not hear from you, we will close this bug out. Thank you.

Comment 6 Bryan Kearney 2019-12-03 12:53:48 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and while we recognize that it is a valid request, we do not expect this to be implemented in the product in the foreseeable future. This is due to other priorities for the product, and not a reflection on the request itself. We are therefore closing this out as WONTFIX. If you have any concerns about this, please do not reopen. Instead, feel free to contact Red Hat Technical Support. Thank you.